Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Install Nginx under CentOS7

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Step 1: download the file: Nginx download URL

Step 2: upload to the relevant directory and decompress tar-zxvf nginx.tar.gz (after download, change the name to nginx.tar.gz, basically with the version number)

Step 3:. / configure [--prefix] specifies the file directory, and no specified directory is installed under the system directory by default.

Error messages that may occur when executing the above command:

Checking for OS

Linux 2.6.32-431.el6.x86_64 x861464

Checking for C compiler... Not found

You need to execute the following command:

* * yum-y install gcc gcc-c++ autoconf automake make**

When executing. / configure [--prefix], 2 appears

The pcre package is required to compile and install nginx. If it is not installed, you will be prompted as follows:

. / configure: error: the HTTP rewrite module requires the PCRE library.

You can either disable the module by using-without-http_rewrite_module

Option, or install the PCRE library into the system, or build the PCRE library

Statically from the source with nginx by using-- with-pcre= option.

Need to install pcre's devel package, pcre-devel. Use yum to install: (the following command also has dependent installations such as ssl, zlib, etc.)

* * yum-y install zlib zlib-devel openssl openssl--devel pcre pcre-devel**

Step 4: make & & make install

Execute commands to start and stop commands for testing

Sbin/nginx./nginx-s stop

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report