How to quickly install Nginx server on CentOS 6.6

王林
Release: 2023-05-17 19:18:05
forward
1169 people have browsed it

1. Download nginx

Download the latest version of nginx from the official website of nginx (http://nginx.org/en/download.html), here I download it The one is nginx-1.9.12.

CentOS 6.6快速安装Nginx服务器的方法

After the download is completed, you will get a compressed package as shown below

CentOS 6.6快速安装Nginx服务器的方法

Upload nginx tar package to the linux server, as shown below:

CentOS 6.6快速安装Nginx服务器的方法

2. Install nginx

2.1. Installation prerequisites

Before installing nginx, you need to ensure that the system has g, gcc, openssl-devel, pcre-devel and zlib-devel software installed.

 1. Install the necessary software: yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel

The installation process is as shown below:

CentOS 6.6快速安装Nginx服务器的方法

CentOS 6.6快速安装Nginx服务器的方法

## 2.2. Install nginx dependency packages: yum install geoip gd libxpm libxslt


Installation process As shown in the figure below:


CentOS 6.6快速安装Nginx服务器的方法

CentOS 6.6快速安装Nginx服务器的方法

##2.2. Unzip and install nginx


Enter the directory where the nginx installation package is located and decompress the nginx compressed package, as shown in the following figure:

CentOS 6.6快速安装Nginx服务器的方法 After decompression is completed, there is an additional nginx-1.9.12 directory, enter nginx Check the contents in the -1.9.12 directory, as shown below:


CentOS 6.6快速安装Nginx服务器的方法 The installation of source code generally consists of three steps: configure (configure), compile (make ), install (make install)


 1. Execute ./configure


CentOS 6.6快速安装Nginx服务器的方法

# . The /configure command was executed successfullyCentOS 6.6快速安装Nginx服务器的方法

 2. Execute the make operation, as shown in the following figure:


CentOS 6.6快速安装Nginx服务器的方法

## make The operation is completed.

CentOS 6.6快速安装Nginx服务器的方法

 3. Execute the make install command to install.


2.3. Verify whether the nginx installation is successful

1. Check the nginx installation path (whereis nginx)


## 2. Start nginx

CentOS 6.6快速安装Nginx服务器的方法


Enter http://centos server IP in the browser to access nginx. For example, my server IP address is: 115.159.95.35. Enter http://115.159.95.35/ to access the installed nginx. The access results are as shown below. Show:

CentOS 6.6快速安装Nginx服务器的方法

The above is the detailed content of How to quickly install Nginx server on CentOS 6.6. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template