>php教程 >php手册 >php7和nginx1.9安装

php7和nginx1.9安装

WBOY
WBOY원래의
2016-06-07 11:36:141111검색

具体细节不解释,直接运行每行代码,一般不会出错,centos6.4完美运行,如果有过环境搭建的基础,相比是极好的!!!!!!!
useradd www<br> yum install epel-* -y<br> yum install -y wget unzip gcc gcc-c++  make zlib zlib-devel pcre pcre-devel  libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers<br> <br> wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz<br> tar zxf libiconv-1.14.tar.gz<br> cd libiconv-1.14<br> ./configure --prefix=/usr<br> make<br> make install<br> cd ..<br> <br> wget http://php.net/distributions/php-7.0.0.tar.bz2<br> tar -jxvf php-7.0.0.tar.bz2<br> cd php-7.0.0<br> #./configure --prefix=/usr/local/php70 --sysconfdir=/usr/local/php70/etc --with-config-file-scan-dir=/usr/local/php70/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-mbstring --enable-sockets --enable-pcntl --enable-pdo --enable-mysqlnd --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-sysvshm --enable-shmop  --with-jpeg-dir=/usr --with-freetype-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-gd --with-openssl --enable-opcache --enable-zip --enable-bcmath --enable-pcntl --enable-ftp --with-curl<br> ./configure --prefix=/usr/local/php70 --sysconfdir=/usr/local/php70/etc --with-config-file-scan-dir=/usr/local/php70/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-mbstring --enable-sockets --enable-pcntl --enable-pdo --enable-mysqlnd --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-sysvshm --enable-shmop  --with-jpeg-dir=/usr --with-freetype-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-iconv=/usr/lib --with-gd --with-openssl --enable-opcache=no --enable-zip --enable-bcmath --enable-pcntl --enable-ftp --with-curl<br> make<br> make install<br> cp php.ini-production /usr/local/php70/etc/php.ini<br> cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm <br> cp sapi/fpm/php-fpm.conf /usr/local/php70/etc/php-fpm.conf  <br> cp sapi/fpm/www.conf /usr/local/php70/etc/php-fpm.d/www.conf<br> cd ..<br> <br> sed -i 's#short_open_tag = Off#short_open_tag = On#g' /usr/local/php70/etc/php.ini<br> chmod +x /etc/init.d/php-fpm<br> <br> wget http://nginx.org/download/nginx-1.9.7.tar.gz<br> tar -zxvf nginx-1.9.7.tar.gz<br> cd nginx-1.9.7<br> ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module<br> make;make install<br> cd ..<br> <br> vi /usr/local/nginx/conf/nginx.conf<br> ...<br>         location ~ \.php$ {<br>             root           html;<br>             fastcgi_pass   127.0.0.1:9000;<br>             fastcgi_index  index.php;<br>             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>             include        fastcgi_params;<br>         }

AD:真正免费,域名+虚机+企业邮箱=0元

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.