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

Tutorials for Nginx installation

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

Share

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

This article mainly introduces "Nginx installation tutorials". In daily operation, I believe many people have doubts about Nginx installation tutorials. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "Nginx installation tutorials". Next, please follow the editor to study!

1. Install gcc (it usually comes with centos 7 and can be installed after the failure of step 6)

Yum install gcc gcc-c++

two。 Install pcre

Yum install-y pcre pcre-devel

3. Install zlib

Yum install-y zlib zlib-devel

4. Install openssl

Yum install-y openssl openssl-devel

5. Download and extract Nginx (then go to the Nginx directory)

Wget http://nginx.org/download/nginx-1.12.2.tar.gz

6. Compile Nginx (load common modules such as ssl)

. / configure-prefix=/usr/local/nginx-with-http_stub_status_module-with-http_gzip_static_module-with-http_ssl_module

7. Install Nginx

Make & & make install

8. Start

/ usr/local/nginx/sbin/nginx

9. Stop it

/ usr/local/nginx/sbin/nginx-s stop (reload means restart)

10. The browser accesses the IP of the machine where Nginx resides, and verifies that Nginx starts successfully.

Http://yourhost/

Note: Nginx profile location

/ usr/local/nginx/conf/nginx.conf

At this point, the study on the "tutorial for Nginx installation" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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