CentOS installation Nginx 1.7.4

Source: Internet
Author: User
Tags install openssl openssl centos
I. Installation and preparation

First, because some of Nginx's modules rely on Lib libraries, these Lib libraries must be installed before installing Nginx, which are mainly g++, GCC, Openssl-devel, Pcre-devel, and zlib-devel, so install the following command

[HTML] View plaincopy $ yum Install gcc-c++ $ yum Install pcre pcre-devel $ yum install zlib zlib-devel $ yu M install OpenSSL Openssl--devel

Second, install Nginx

Before installing, it's a good idea to check to see if nginx [HTML] View Plaincopy $ find-name is installed Nginx

If the system already has Nginx installed, then uninstall the [HTML] view plaincopy $ yum Remove Nginx

First enter the/usr/local directory [HTML] view Plaincopy $ cd/usr/local

Download the latest version of Nginx [HTML] View plaincopy $ wget http://nginx.org/download/nginx-1.7.4.tar.gz from the website

Extract Nginx compressed package [HTML] View plaincopy $ tar-zxvf nginx-1.7.4.tar.gz

will produce a nginx-1.7.4 directory, then enter the nginx-1.7.4 directory [HTML] view plaincopy $ cd nginx-1.7.4

Next install, use the--prefix parameter to specify Nginx installed directory, make, make install install [HTML] View Plaincopy $./configure $ default installed in/usr/local/nginx $ ma Ke $ make install

If there is no error, after the successful completion, it is best to look at the Nginx installation directory [HTML] view plaincopy $ whereis nginx

After installation, enter the post installation directory (/usr/local/nginx) to start or stop it.

To this end, the use of CentOS installation Nginx has been completed, in fact, it is quite simple to see.

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.