Linux installation Nginx

Source: Internet
Author: User

1, first to install the Nginx module's dependency package

Yum install gcc-c++  yum install pcre pcre-devel  yum install zlib zlib-devel  

2, check whether it has been installed with Nginx

3, if the system has installed Nginx, the first uninstall

Yum Remove Nginx

4. Enter the/usr/local directory

Cd/usr/local

5. Download the latest stable version of Nginx from official website

wget http://nginx.org/download/nginx-1.6.2.tar.gz  

6. Decompression

TAR-ZXVF nginx-1.6.2.tar.gz

7. Enter the catalogue

CD  nginx-1.6.2

8, next installation, use the--prefix parameter to specify the Nginx installation directory, configuration configure, compile make, installation make install

./configure  $ default installation on/usr/local/nginx   make  

9, installation complete, view the installation directory

Whereis Nginx

10. Enter the installation directory

CD  /usr/local/nginx/sbin./nginx-t

Effect:

11. Start Nginx

[Email protected] sbin]#./nginx

12. View port number

[Email protected] sbin]# NETSTAT-NTLP

13. Open Browser access (default port 80)

Linux installation Nginx

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.