nginx+php5&php7安装

1、Nginx编译安装
yum -y install epel-release  ftp ypbind bind-* net-snmp net-snmp-libs net-snmp-utils libxml2 libxml2-devel libmcrypt libmcrypt-devel mcrypt mhash lrzsz libtool-ltdl-devel libgcrypt puppet vsftpd ncurses-devel ntp gcc gcc-c++ gcc-devel gcc-c++-devel ssl ssl-devel libxml2 libxml2-devel autoconf make aclocal libtool expat-devel libxml2-devel openssl openssl-devel zlib zlib-devel bzip2 bzip2-devel gd gd-devel libmcrypt libmcrypt-devel libXpm-devel  curl-devel libgd-devel gd-devel openldap-devel 
wget http://nginx.org/download/nginx-1.5.2.tar.gz
tar -zxf nginx-1.5.2.tar.gz
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.tar.gz
tar -zxf pcre-8.21.tar.gz
wget http://labs.frickle.com/files/ngx_cache_purge-2.1.tar.gz
tar -zxf ngx_cache_purge-2.1.tar.gz
cd nginx-1.5.2
./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/nginx/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --error-log-path=/usr/local/nginx/log/error.log --http-log-path=/usr/local/nginx/log/access.log --pid-path=/usr/local/nginx/run/nginx.pid    --user=www --group=www --with-http_ssl_module --with-http_flv_module --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --http-client-body-temp-path=/usr/local/nginx/tmp/client --http-proxy-temp-path=/usr/local/nginx/tmp/proxy/ --http-fastcgi-temp-path=/usr/local/nginx/tmp/fcgi/ --add-module=../ngx_cache_purge-2.1 --with-pcre=../pcre-8.21
make 
make install 


2、PHP5.4编译安装:
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql --with-mysqli --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-ssl --enable-mbstring --with-mcrypt=/usr/local/mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --with-pear --enable-pdo --with-pdo-mysql --with-gettext --enable-exif --enable-wddx --enable-calendar --enable-ftp --enable-dba --enable-sysvmsg --enable-sysvshm --enable-debug --enable-maintainer-zts --enable-embed --with-pcre-regex --enable-gd-jis-conv --with-fpm-user=www --with-fpm-group=www --enable-sockets
#出现:configure: error: Cannot find ldap libraries in /usr/lib.执行下面命令
#cp -frp /usr/lib64/libldap* /usr/lib/
#wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz
#安装libmcrypt
make
make install


3、PHP7编译安装:
./configure --prefix=/usr/local/php7 --with-config-file-path=/usr/local/php7/etc --with-mysql --with-mysqli --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-ssl --enable-mbstring --with-mcrypt=/usr/local/mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --with-pear --enable-pdo --with-pdo-mysql --with-gettext --enable-exif --enable-wddx --enable-calendar --enable-ftp --enable-dba --enable-sysvmsg --enable-sysvshm --enable-debug --enable-maintainer-zts --enable-embed --with-pcre-regex --enable-gd-jis-conv --with-fpm-user=www --with-fpm-group=www --enable-sockets
#出现:configure: error: Cannot find ldap libraries in /usr/lib.执行下面命令
#cp -frp /usr/lib64/libldap* /usr/lib/
#wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz
#安装libmcrypt
make
make install

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值