**1.配置文件** ~~~ cp /usr/local/src/php-7.2.6/php.ini-development /usr/local/php/etc/php.ini ~~~ **2.配置文件语法检测** ~~~ /usr/local/php/sbin/php-fpm -t ~~~ **3.服务管理** 1)启动 ~~~ /usr/local/php/sbin/php-fpm ~~~ 2)关闭 ~~~ pkill php-fpm ~~~ 3)重载 ~~~ pkill -USR2 php-fpm ~~~ **4.开机启动** ~~~ vi /etc/rc.local /usr/local/php/sbin/php-fpm ~~~ **5.nginx与php结合** ~~~ #bbs.linux.com虚拟主机 server{ listen 80; server_name bbs.linux.com; access_log logs/bbs.access.log main; location / { root html/bbs; index index.php index.html index.htm; } location ~ \.php(.*)$ { fastcgi_index index.php; fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #nginx支持tp fastcgi_param PATH_INFO $1; include fastcgi_params; } } ~~~