CentOS 7 Nginx Installation

Source: Internet
Author: User
Tags install openssl openssl centos

1. Before installing, do the preparation work, configure the Nginx environment and some class library.

$   Yum Install gcc-c++  
$   yum install pcre pcre-devel  
$   yum install zlib zlib-devel  
$   Yum Install OpenSSL Openssl--devel 

2. Select a directory to install
Before installing, it is advisable to check if Nginx is installed

$ find-name Nginx  

If the system has Nginx installed, first uninstall the

$ yum Remove Nginx  

Download the latest version of Nginx from official website

$   wget http://nginx.org/download/nginx-1.7.4.tar.gz  

Unzip the Nginx compression pack

$   TAR-ZXVF nginx-1.7.4.tar.gz  

will produce a nginx-1.7.4 directory, then enter the nginx-1.7.4 directory

$   CD  nginx-1.7.4  

Next install, use the –prefix parameter to specify the Nginx installation directory, make, make install installation

$   ./configure  $ default installation in/usr/local/nginx   
$   make  
$ make   Install      

If there is no error, after the successful completion, it is best to look at the Nginx installation directory

$   Whereis Nginx  

Enter path to start or close nginx after installation is complete

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.