Home > Article > Operation and Maintenance > Use yum to install nginx service
1. Preparation before installation:
(Recommended tutorial: nginx tutorial)
yum install yum-utils
2. Add source
Go to the cd /etc/yum.repos.d/ directory
Create a new vim nginx.repo file
Enter the following information
3. Install Nginx
Use yum search nginx to see if the source has been added successfully. If successful, execute the following command to install nginx.
yum install nginx
After installation, rpm -qa | grep nginx View
Start nginx: systemctl start nginx
Add to boot: systemctl enable nginx
View The status of nginx: systemctl status nginx
The above is the detailed content of Use yum to install nginx service. For more information, please follow other related articles on the PHP Chinese website!