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
nginx+php5&php7安装
最新推荐文章于 2021-04-13 15:46:06 发布