Home > Article > Operation and Maintenance > How to set nginx to start automatically on boot in linux
Method: 1. Use the "yum -y install nginx" command to install Nginx; 2. Use the "server nginx start" command to verify whether the service is available; 3. Use the "chkconfig nginx on" command to add the service to the server Start; 4. Restart for testing.
The operating environment of this tutorial: centos7 system, nginx version 1.16.1, thinkpad t480 computer.
1. Use yum to install nginx:
yum -y install nginx
2. After installation, verify whether the service can be used
server nginx start
3. Add the service to self-start
chkconfig nginx on
4. Restart for testing
Visit the homepage to see if nginx starts normally
(Recommended study: linux tutorial)
The above is the detailed content of How to set nginx to start automatically on boot in linux. For more information, please follow other related articles on the PHP Chinese website!