Linux installation configuration Nginx

Source: Internet
Author: User

1 Nginx Introduction
Nginx ("Engine X") is a high-performance HTTP and reverse proxy server, also a IMAP/POP3/SMTP proxy server. Nginx was developed by Igor Sysoev for the second rambler.ru site of Russian traffic, and the first public version 0.1.0 was released on October 4, 2004. It publishes the source code in the form of a BSD license, known for its stability, rich feature set, sample configuration files, and consumption of low system resources

In the CentOS installation software, there may be a lack of support library, and error. Here first installs the system common support library. Then the installation will reduce the number of errors that occur

[Email protected]_4dbde0 conf]#  Yum install-y gcc gdb strace gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-de Vel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel NC Urses Ncurses-devel Curl curl-devel e2fsprogs patch e2fsprogs-devel krb5-devel libidn libidn-devel openldap-devel Nss_lda P openldap-clients openldap-servers libevent-devel libevent uuid-devel uuid Mysql-devel

Installing nginx requires checking to see if Linux has the Linux Common prerequisite Support library installed. Check if g++, GCC is installed. Rpm-qa | grep gcc needs to appear after 3 packages as shown. If it does not appear. Need to install g++, gcc.

If the image does not appear, use the command to install the support library

[Email protected]_4dbde0 conf]#  Yum Install gcc-c++

Determine if the system is installing Zlib-devel. If it is not installed. Using commands

[Email protected]_4dbde0 pcre-8.00]# Yum install-y zlib-devel

Determine if the Openssl-devel is installed in the system and the installation can use the encryption service

Installation commands

[Email protected]_4dbde0 local]# Yum Install openssl-devel-y

After the installation is complete, download additional support components

#正则表达式库下载 [[Email protected]_4dbde0 conf]# wget https://ftp.pcre.org/pub/pcre/pcre-8.00.tar.gz  

  

#解压 [[Email protected]_4dbde0 conf]# CD/usr/local/[email protected]_4dbde0 local]# pwd/usr/local[[email protected]_4dbde0 local]# lsbin etc include JDK1.7LIB64 logs nexus-2.11.2-Genevapcre-8.00Sbin sonatype-work TOMCAT7 zookeeper-3.3.6Dubbo-governance.log Games index.html Lib Libexec mysql-5.7. -nginx-1.8.0pcre-8.00. tar.gz share src tomcat7_2[[email protected]_4dbde0 local]# tar-ZXVF pcre-8.00
#编译安装 [[Email protected]_4dbde0 pcre-8.00]#./Configure [email protected]_4dbde0 pcre- 8.00 ]# make[[email protected]_4dbde0 pcre-8.00]# make install

Installing Nginx

  #下载Nginx and unzip [[Email protected]_4dbde0 Pcre - 8.00 ] # Cd/usr/local/[[email protected]_4dbde0 local]# wget http:  // nginx.org/download/nginx-1.8.0.tar.gz  [[email  Protected]_4dbde0 local]# tar-zxvf nginx-1.8 . 0  .tar.gz[[email protected]_4dbde0 local]# cd nginx - 1.8 . 0 /
[Email protected]_4dbde0 local]#/configure--user=www--group=www--prefix=/usr/local/nginx-1.8. 0/--with-http_stub_status_module--with-http_ssl_module--with-http_realip_module[[email protected]_ 4dbde0 local]# make[[email protected]_4dbde0 local]# make install

Check if the installation is successful

[Email protected]_4dbde0 local]# cd/usr/local/nginx-1.8. 0/sbin/[[Email protected]_4dbde0 sbin]#. /nginx-t

Linux installation configuration 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.