Centos7 configures nginx and php to start automatically

Check the permissions of the rc.local file
ll /etc/rc.d/rc.local
Insert picture description here
If the permissions have been elevated, you do not need to perform the second step and proceed directly to the third step.

Increase rc.local file permissions
chmod +x /etc/rc.d/rc.local
Insert picture description here

Write the program startup path in the rc.local file
/usr/local/nginx/nginx
/usr/local/php/sbin/php-fpm
Insert picture description here
Restart the server and check the port
reboot Restart the server After the
server starts, check the port ss -ant
Insert picture description here

Guess you like

Origin blog.csdn.net/JineD/article/details/111594551