CentOS 6.5 Installation Nginx 1.7.8 tutorial

Source: Internet
Author: User
Tags install openssl

http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=29791971&id=4702007

Nginx is a lightweight Web server/reverse proxy server and e-mail (IMAP/POP3) proxy Server, developed by the Russian program designer Igor Sysoev, which is characterized by a small amount of memory, high concurrency capability, The first public version of 0.1.0 was released on October 4, 2004, and the latest version is released on December 2, 2014 at 1.7.8.

Today in the Ttlsa Web site learning Nginx installation method, tested in the virtual machine, and then installed on the server again, I'll summarize the installation process.

Linux Systems: Centos 6.5 x64
nginx Version: 1.7.8

1, install Prce (redirect support) and OpenSSL (HTTPS support, if you do not need HTTPS can not be installed. )

    1. Yum-y Install pcre*
    1. Yum-y Install openssl*

CentOS 6.5 i installed the "basic server", the default two packages are not installed all, so both run the installation.

2. Download Nginx 1.7.8

    1. wget http://nginx.org/download/nginx-1.7.8.tar.gz

3, unzip the installation of the compilation

    1. TAR-ZXVF nginx-1.7.8.tar.gz

Then go to directory compilation installation

    1. CD nginx-1.7.8
    1. ./configure--prefix=/usr/local/nginx-1.5.1 \
    2. --with-http_ssl_module--with-http_spdy_module \
    3. --with-http_stub_status_module--with-pcre

If there is no error message, you can perform the following installation:

    1. Make
    2. Make install

4. Open Nginx Process

    1. /usr/local/nginx-1.7.8/sbin/nginx

To restart or close a process:

    1. /usr/local/nginx-1.7.8/sbin/nginx-s Reload
    2. /usr/local/nginx-1.7.8/sbin/nginx-s stop

5. Close the firewall or add a firewall rule to test it.

    1. Service Iptables Stop

or edit the configuration file:

    1. Vi/etc/sysconfig/iptables

Add such an open 80-port rule after saving:

    1. -A input-m state--state new-m tcp-p TCP--dport 80-j ACCEPT

To restart the service:

      1. Service Iptables Restart

CentOS 6.5 Installation Nginx 1.7.8 tutorial

Related Article

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.