Linux nginx installation step details, linuxnginx details

Source: Internet
Author: User

Linux nginx installation step details, linuxnginx details

1. Run rpm-qa | grep gcc to check whether gcc is installed. If not, install gcc first.

Yum install gcc-c ++

2. Install nginx dependent modules

Yum-y install zlib-devel openssl -- devel pcre-devel

3. Go to the installation directory and download the nginx installation package from the network.

Cd/opt

Wget https://nginx.org/download/nginx-1.8.0.tar.gz

4. decompress the nginx installation package and modify it to the folder.

Tar-xzvf nginx-1.8.0.tar.gz

Cd nginx-1.8.0

5. Check the dependency environment and configuration, set the installation directory parameters, and set the dependency mode.

./Configure -- prefix =/srv/nginx -- with-http_stub_status_module -- with-http_ssl_module -- with-http_realip_module

Note: "/srv/nginx" is the installation path, and "-- with" is the dependent module.

6. Compile

Make

7. Installation

Make install

8. Start

Cd/srv/nginx/sbin

./Nginx

9. query the process

Ps-ef | grep nginx

10. view the port

Netstat-ntlp

11. Verify the configuration file and reload it

./Nginx-t

./Nginx-s stop (quit, reload)

12. Kill processes

Kill-9 process id

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.