This article describes how to install php7 + nginx environment under centos6.6. Share with you for your reference, the details are as follows: 1. Install necessary dependency libraries
2. Download the PHP source package http://php.net/downloads.php The file name is: php-7.0.4.tar.gz 3. Unzip the source package > tar -zxvf php-7.0.4.tar.gz 4. Enter the directory and configure ./configure --prefix=/data/nmp/php \ --with-curl \ --with-freetype-dir \ --with-gd \ --with-gettext \ --with-iconv-dir \ --with-kerberos \ --with-libdir=lib \ --with-libxml-dir \ --with-mysqli=mysqlnd \ --with-openssl \ --with-pcre-regex \ --with-pdo-mysql=mysqlnd \ --with-pdo-sqlite \ --with-pear \ --with-png-dir \ --with-xmlrpc \ --with-xsl \ --with-zlib \ --enable-mysqlnd \ --enable-fpm \ --enable-bcmath \ --enable-libxml \ --enable-inline-optimization \ --enable-gd-native-ttf \ --enable-mbregex \ --enable-mbstring \ --enable-opcache \ --enable-pcntl \ --enable-shmop \ --enable-soap \ --enable-sockets \ --enable-sysvsem \ --enable-xml \ --enable-zip \ --enable-pthreads \ --enable-maintainer-zts \ --enable-fileinfo 5. make && make install > make && make install 6. Configuration File > cp php.ini-development /data/nmp/php/lib/php.ini > cp /data/nmp/php/etc/php-fpm.conf.default /data/nmp/php/etc/php-fpm.conf > cp /data/nmp/php/etc/php-fpm.d/www.conf.default /data/nmp/php/etc/php-fpm.d/www.conf > cp -R ./sapi/fpm/php-fpm /data/nmp/php/etc/init.d/php-fpm (*Need to create init.d directory) 7. Startup > /data/nmp/php/etc/init.d/php-fpm 8. Nginx integration with PHP >vi /data/nmp/nginx/conf/nginx.conf server { listen 80; server_name localhost; charset utf-8; #root website directory location / { root /data/wwwroot; index index.html index.htm index.php; } location ~ \.php$ { #Website directory root /data/wwwroot; #phpcgi port, default 9000 fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; #document_root points to the website directory fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } 9. Reload nginx > /data/nmp/nginx/sbin/nginx -s reload I hope this article will help you configure your CentOS environment. You may also be interested in:
|
<<: MySQL quickly obtains the table instance code without primary key in the library
>>: Bootstrap+Jquery to achieve calendar effect
1. Create a new configuration file docker_nginx.c...
After the user logs out, if the back button on the...
Because li is a block-level element and occupies ...
<!doctype html> <html xmlns="http:/...
1. Introduction to Animate.css Animate.css is a r...
Table of contents 1. Change the 2375 port of Dock...
Table of contents Preface analyze Initial Renderi...
For Windows User Using openGauss in Docker Pull t...
When we use the like % wildcard, we often encount...
In web design, we often use arrows as decoration ...
Virtual machines are very convenient testing soft...
When using MySQL, we often sort and query a field...
Update: Now you can go to the MySQL official webs...
MySQL installation instructions MySQL is a relati...
Table of contents Preface 1. unknown vs any 2. Th...