Home  >  Article  >  Operation and Maintenance  >  Use yum to install nginx service

Use yum to install nginx service

王林
王林forward
2020-09-30 16:28:153112browse

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

Use yum to install nginx service

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!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete