Home  >  Article  >  Operation and Maintenance  >  How to install nginx under linux

How to install nginx under linux

藏色散人
藏色散人Original
2019-08-27 10:59:227092browse

How to install nginx under linux

How to install nginx under linux?

First we need to put the nginx installation package under the /usr/local/software directory of linux, as shown in the figure below

How to install nginx under linux

Connect Next, install the dependency packages of nginx through the yum install command, as shown in the figure below. The dependency packages include pcre, pcre-devel, zlib, zlib-devel

How to install nginx under linux

Then we will nginx Unzip the installation package, as shown in the figure below. When decompressing tar, match the zxvf parameter

How to install nginx under linux

After decompression, we can see the folder as shown in the figure below in the directory. This It contains the installation command

How to install nginx under linux

Next we enter the decompressed file and execute the configure command to compile the installation file, as shown in the figure below

How to install nginx under linux

After compilation, execute the two commands make and make install to install nginx, as shown in the figure below

How to install nginx under linux

After the installation is completed, we can see As shown in the nginx directory as shown below, the startup file here is under the sbin folder

How to install nginx under linux

Next we start nginx through the /usr/local/nginx/sbin/nginx command Server, as shown in the figure below

How to install nginx under linux

Finally, we execute the ps -ef | grep nginx command to check whether nginx starts successfully. The record shown in the figure below indicates that the startup is successful

How to install nginx under linux

The above is the detailed content of How to install nginx under linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn