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

Installation method and common commands of Nginx

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly explains "the installation method and common commands of Nginx". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "Nginx installation methods and common commands" bar!

To install Nginx, you need to install the related dependencies: gcc pcre-devel zlib-devel openssl-devel

1. Install compilation tools and related library files

Yum-y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel

Equivalent to:

Yum install zlib zlib-devel

Yum install gcc

Yum install openssl openssl-devel

two。 Install the PCRE library (Perl Compatible Regular Expressions, perl language compatible with regular expressions), PCRE is to make Nginx support Rewrite functionality.

Yum install pcre-devel

3. Download the installation package for Nginx, extract it, and install it.

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

Tar-zxvf nginx-1.13.11.tar.gz

Then go to the nginx-1.13.11 directory and execute:

. / configure (default without parameters)

. / configure-- prefix=/soft/nging-h6-- sbin-path=/soft/nginx-h6/nginx (specify installation directory and script startup directory)

Make & & make install

This is installed by default to the / usr/local directory

Then start Nginx and go to the / usr/local/nginx/sbin directory:

. / nginx

You can check whether the process of Nginx has been started through the ps command

Then you can open the browser and type IP to see the interface where Nginx welcomes you.

At this point, I believe you have a deeper understanding of the "installation methods and common commands of Nginx". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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

Internet Technology

Wechat

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

12
Report