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

Centos7 installs nginx and handles error messages

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

1 download the installation package of nginx through wget

Download connection can go to the nginx official website to obtain www.nginx.org

Here is a downloadable link http://120.52.51.15/nginx.org/download/nginx-1.14.2.tar.gz

The linux command console enters the command wget http://120.52.51.15/nginx.org/download/nginx-1.14.2.tar.gz.

FAQ: if you prompt wget to install incorrectly, use the command yum install wget

2 unpack the installation package

Tar-xvzf nginx-1.14.2.tar.gz

3 enter the decompressed folder

Cd nginx-1.14.2

Execute the installation command. / configure

FAQ if an error is reported at this time. / configure: error: C compiler cc is not found

Run the program yum-y install gcc gcc-c++ autoconf automake make

Continue with yum-y install zlib zlib-devel openssl openssl--devel pcre pcre-devel installation. / configure

4 if make & & make install is executed after. / configure runs without error.

Through the above 4 steps, the installation is complete.

5 enable nginx

Execute the command: / usr/local/nginx/sbin/nginx

Execute command: netstat-tnlp | grep nginx to see if nginx is running

6. Close nginx

You can close kill 9 33654-33654 pid for nginx by killing the process.

7 centos7 view open ports through the firewall-cmd command

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