centos apache nginx php,centos mysql + apache+nginx+php的配置记录

setup:

yum install setuptool ntsysv system-config-network system-config-keyboard ntp crontabs wget vim-enhanced

wget:

yum install wget

scp:

yum install openssh-clients

ntpdate:

yum install ntpdate

gcc:

yum install gcc

make:

yum -y install gcc automake autoconf libtool make

pcre:

yum install pcre pcre-devel

apache:

./configure --prefix=/server/apache --with-apr --with-apr-util --enable-cache --enable-file-cache --enable-mem-cache --enable-disk-cache --with-mpm=worker --disable-ipv6 --enable-nonportable-atomics --enable-threads --enable-other-child --enable-ssl --enable-so --enable-maintainer-mode --enable-ssl --enable-http --enable-info --enable-deflate --enable-proxy --enable-rewrite --with-included-apr --enable-proxy --enable-proxy-http --enable-proxy-connect --enable-headers

error: mod_deflate has been requested but can not be built due to prerequisite failures

yum install zlib zlib-devel

error: mod_ssl has been requested but can not be built due to prerequisite failures

yum install openssl openssl-devel

nginx:

./configure --prefix=/server/nginx --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module --with-http_stub_status_module --with-pcre

mysql:

apache-php:

./configure --enable-shared --prefix=/server/apache/php --with-openssl --with-curl --with-curlwrappers --with-mcrypt=/server/libmcrypt --with-mhash --enable-bcmath --enable-sockets --enable-mbstring --enable-soap --with-iconv --with-zlib --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-mysql=/server/mysql --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --with-apxs2=/server/apache/bin/apxs --enable-mbregex --enable-inline-optimization --disable-rpath --with-libxml-dir --enable-xml --with-mysqli=/server/mysql/bin/mysql_config --with-pdo-mysql=mysqlnd --enable-dba --disable-phar --with-mysqli

Sorry, I cannot run apxs. Possible reasons follow:

1. Perl is not installed

2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs

3. Apache was not built using --enable-so (the apxs usage page is displayed)

The output of /usr/local/apache/bin/apxs follows:./configure: /usr/local/apache/bin/apxs: not found

configure: error: Aborting

yum -y install perl perl-devel

#vi /usr/local/apache/bin/apxs

第一行的#!/replace/with/path/to/perl/interpreter -w,找到你perl的安装位置,如果不清楚,可以用which perl找到,一般在/usr/bin/perl ,于是将第一行改为:#!/usr/bin/perl -w. 再运行php的configure, 一切正常!

configure: error: xml2-config not found. Please check your libxml2 installation.

yum install libxml2 libxml2-devel

configure: error: Please reinstall the libcurl distribution -

easy.h should be in /include/curl/

yum -y install curl curl-devel

configure: error: jpeglib.h not found.

yum -y install libjpeg libjpeg-devel

configure: error: png.h not found.

You have new mail in /var/spool/mail/root

yum -y install libpng libpng-devel

configure: error: freetype.h not found.

yum -y install freetype freetype-devel

error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

make[1]: *** [install-pear-installer] Error 127

make: *** [install-pear] Error 2

ln -s /server/mysql/lib/libmysqlclient.so.18 /usr/lib64/

nginx-php:

./configure --enable-shared --prefix=/server/nginx/php --with-openssl --with-curl --with-curlwrappers --with-mcrypt=/server/libmcrypt --with-mhash --enable-bcmath --enable-sockets --enable-mbstring --enable-soap --with-iconv --with-zlib --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-mysql=/server/mysql --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-fpm --enable-mbregex --enable-inline-optimization --disable-rpath --with-libxml-dir --enable-xml --with-xsl --with-mysqli=/server/mysql/bin/mysql_config --with-pdo-mysql=mysqlnd --enable-dba --disable-phar

configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution

yum -y install libxslt libxslt-devel

mrtg:

yum install gd gd-devel

yum -y install net-snmp

./configure --prefix=/server/mrtg --with-gd --with-z --with-png

cd /server/mrtg/

mkdir cfg

bin/cfgmaker --global 'WorkDir: /www/mrtg' --global 'Options[_]: bits,growright' --output /server/mrtg/cfg/mrtg.cfg public@localhost

mkdir /www/mrtg

bin/indexmaker --output=/www/mrtg/index.html /server/mrtg/cfg/mrtg.cfg

env LANG=C /server/mrtg/bin/mrtg /server/mrtg/cfg/mrtg.cfg

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值