Linux installation Nginx

Source: Internet
Author: User
Tags install openssl openssl

1. Verify that the GCC g++ Development class Library is installed, by default.
The UBUBTU platform compilation environment can use the following directives
Apt-get Install Build-essential
Apt-get Install Libtool
The CentOS Platform compilation environment uses the following directives
Install Make:
Yum-y install gcc automake autoconf libtool make
 
2. Installation dependencies
One-click installation of four dependencies
Yum install gcc or yum install gcc gcc-c++
Yum Install Pcre-devel
Yum Install zlib Zlib-devel
Yum Install OpenSSL Openssl-devel
Yum-y install gcc zlib zlib-devel pcre-devel OpenSSL openssl-devel
3. Select the installation file directory
Can select any directory, this article select CD/USR/LOCAL/SRC
Cd/usr/local/src
4, install Pcre library ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Download the latest pcre source package, download the compile and install the Pcre package using the command below:
Cd/usr/local/src
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz
TAR-ZXVF pcre-8.37.tar.gz
CD pcre-8.34
./configure
Make
Make install
5, install zlib library http://zlib.net/zlib-1.2.11.tar.gz Download the latest zlib source package, download the compile and install the zlib package using the command below:
Cd/usr/local/src
wget http://zlib.net/zlib-1.2.11.tar.gz
TAR-ZXVF zlib-1.2.11.tar.gz
CD zlib-1.2.11
./configure
Make
Make install
6. Installing OpenSSL
Cd/usr/local/src
wget https://www.openssl.org/source/openssl-1.0.1t.tar.gz
TAR-ZXVF openssl-1.0.1t.tar.gz
7. Installing Nginx
cd/usr/local/
mkdir Nginx
CD Nginx
wget http://nginx.org/download/nginx-1.13.7.tar.gz
TAR-ZXVF nginx-1.13.7.tar.gz
CD nginx-1.13.7
./configure
Make
Make install
Here to run may error, see the specific error installation dependent program can be
8. Start Nginx
Cd/usr/local/nginx/sbin
./nginx
9.nginx Restart, shutdown, start
Start/usr/local/nginx/sbin/nginx-c/usr/local/nginx/nginx-1.13.7/conf/nginx.conf
Stop it:
1. View the process
Ps-ef|grep Nginx
2. Kill the Process
Kill-quit Process Number
Kill-int Process Number
Force Stop pkill-9 Nginx
Restart:

10. Successful Access

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.