Preface
It's a tough time to play. In addition to the compiler using Yum installation, all others are compiled manually. Hum ~
Seemingly on Nginx, PHP, MySQL three east, but they are too much to rely on others.
There is no way to use them to be honest with them to provide the things they want.
Some of the first modules depend on some Lib libraries,
If you are lazy, just follow the instructions below and enter them separately. Then look directly at the configuration chapter. (But this is not the latest version of the installation of Yo)
Directory
First, Centos7 from zero compile Nginx+php+mysql
Second, Centos7 from zero configuration nginx+php+mysql
Third, Centos7 from the zero compiler configuration memcached
First, the preparatory work
1.1 Installing VIM
# yum Install vim
Second, start configuration (Nginx article)
2.1 Modifying Nginx.conf
# Vim Nginx.conf
2.2 Find the following and remove the red marked characters
# Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root htm l; # Fastcgi_pass 127.0.0.1:9000; # Fastcgi_index index.php; # Fastcgi_param script_filename /scripts$fastcgi_script_name; # include fastcgi_params; #}
2.3 Modification Complete
# Pass the PHP scripts to FastCGI server listening in 127.0.0.1:9000 # location ~ \.php$ { root html; Fastcgi_pass 127.0.0.1:9000; Fastcgi_index index.php; Fastcgi_param script_filename $document _root$fastcgi_script_name; Include fastcgi_params; }
2.4 Output Phpinfo File
echo "<?php echo phpinfo ();?>" >/lnmp/nginx/html/index.php
2.5 Start Nginx
/lnmp/nginx/sbin/nginx
Small summary:
The above modification allows Nginx to forward the PHP dynamic script request.
However, it is not possible to open the PHP file yet because PHP-FPM has not been opened yet.
We continue to look down.
Three, start configuration (PHP-FPM)
3.1 Copy default configuration file
# cd/source/php-7.0.2# CP php.ini-development/lnmp/php/etc/php.ini# cd/lnmp/php/etc# CP Php-fpm.conf.default php-fpm.conf# cd/lnmp/php/etc/php-fpm.d/# CP Www.conf.default www.conf
3.2 Running PHP-FPM
#/lnmp/php/sbin/php-fpm-c/lnmp/php/etc/php.ini
Ii. Common Commands
Nginx Common Commands
Start Nginx
#/lnmp/nginx/sbin/nginx
Re-start Nginx
#/lnmp/nginx/sbin/nginx-s Reload
Close Nginx
#/lnmp/nginx/sbin/nginx-s Stop
PHP-FPM Common Commands
Start PHP-FPM
#/lnmp/php/sbin/php-fpm-c/lnmp/php/etc/php.ini
Restart PHP-FPM
# KILL-SIGUSR2 ' Cat/lnmp/php/var/run/php-fpm.pid '
Close PHP-FPM
# kill-sigint ' Cat/lnmp/php/var/run/php-fpm.pid '
Signal Interpretation:
SIGINT, SIGTERM immediately terminate.
Sigquit Smooth Termination
SIGUSR1 Reopen log file
SIGUSR2 smoothly overloads all worker processes and reloads the configuration and binary modules
Reprint: Centos7 from zero compilation Nginx+php+mysql two