Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Analysis of simple installation example of Nginx under centos6.5

Shulou Source: shulou.com Published: 2022-05-31 12:31:47 09月23日 Update

This article mainly explains "Analysis of simple installation examples of Nginx under centos6.5". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "simple installation example Analysis of Nginx under centos6.5".

1. Configure the yum source:

Create a file: / etc/yum.repos.d/nginx.repo

Touch / etc/yum.repos.d/nginx.repo

Edit the file

Vi / etc/yum.repos.d/nginx.repo

Write the following:

[nginx] name=nginx repobaseurl= http://nginx.org/packages/centos/$releasever/$basearch/gpgcheck=0enabled=1

Save to this yum source configuration is complete.

You can check whether the Yum source is configured correctly with the following instructions

Yum list | grep nginx

The output is as follows:

Indicates that the Yum source is configured correctly.

2. Install nginx through yum

Execute the following instructions to install yum:

Yum-y install nginx

Execute the following instructions to check that nginx is installed successfully:

Rpm-Q nginx

3. Start nginx

Service nginx start

It indicates that the startup is successful as shown in the figure:

4. Check the nginx installation directory and the directory where the configuration file (nginx.conf) is located

Ps-aef | grep nginx

The output is as follows:

At this point, I believe you have a deeper understanding of the "Analysis of simple installation examples of Nginx under centos6.5". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Configuration content instance case analysis analysis instruction file success directory learning inspection output practical deeper interested practical practical location simple operation method Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Technology Microsoft NVidia Apple