CentOS 7 Installing nginx-1.9.12
First, installation environment :CentOS 7 Linux version 3.10.0-229.el7.x86_64
Nginx-1.9.12
Second, installation steps :
2 . 1 shutting down the firewall
Because the Centos 7 Firewall is turned on by default, the firewall is turned off and the boot is disabled
Command:systemctl stop Firewalld.service # firewall off
systemctl Disable firewalld.service # Disable boot start
Related to the following
650) this.width=650; "title=" 1-firewall "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 1- Firewall "src=" http://s3.51cto.com/wyfs02/M01/7F/82/wKioL1chdQniHs_lAAAaFDRY91w577.jpg "height="/>
2.2 Installing pcre and OpenSSL
command 1: Yum Install pcre*
650) this.width=650; "title=" 2-pcre "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2-pcre "src=" http:// S3.51cto.com/wyfs02/m02/7f/82/wkiol1chdqqxybm6aaanrpevras118.jpg "height="/>
The results shown indicate that the installation is complete.
650) this.width=650; "title=" 3-pcre "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 3-pcre "src=" http:// S3.51cto.com/wyfs02/m00/7f/82/wkiol1chdqzaayb1aaalh7idjwy641.jpg "height=" 137 "/>
Command 2: Yum Install openssl*
650) this.width=650; "title=" 4-openssl "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" 4-openssl "Src=" http://s3.51cto.com/wyfs02/M00/7F/84/wKiom1chdELBp-qkAAA1d3oalE4987.jpg "height=" 134 "/>
The results shown indicate that the installation is complete.
650) this.width=650; "title=" 5-openssl "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" 5-openssl "Src=" http://s3.51cto.com/wyfs02/M00/7F/82/wKioL1chdQ_TTxMGAAAhw86CboM446.jpg "height="/>
2.3 Download nginx-1.9.12
command: wget http://nginx.org/download/nginx-1.9.12.tar.gz
650) this.width=650; "title=" 2016-04-10 23-50-24 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2016-04-10 23-50-24 "src=" http://s3.51cto.com/wyfs02/M02/7F/84/wKiom1chdEWRunFKAAASnHuJflA527.jpg "height=" 52 "/ >
2.4 Unzip
command: cd/usr/local/src
TAR–ZXF nginx-1.9.12.tar.gz
650) this.width=650; "title=" 6-tar "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 6-tar "src=" http:// S3.51cto.com/wyfs02/m01/7f/82/wkiol1chdrkyun-jaaasyydadum379.jpg "height=" 111 "/>
2 . 5 Configuring nginx
command: CD nginx-1.9.12
./configure--prefix=/usr/local/nginx-1.9.12--with-http_ssl_module--with-pcre
--prefix=/usr/local/nginx-1.9.12 # installation directory
--with-http_ssl_module # support HTTPS
--with-pcre # support rewrite features
The results shown indicate that the installation was successful.
650) this.width=650; "title=" 8-configure "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 8- Configure "src=" Http://s3.51cto.com/wyfs02/M00/7F/84/wKiom1chdEii4NfTAAAwXbyX5S8057.jpg "height=" 137 "/>
2.6 Compiling
command: Make
650) this.width=650; "title=" 9-make "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 9-make "src=" http:// S3.51cto.com/wyfs02/m00/7f/82/wkiol1chdrwgikbmaaax4zfptz8475.jpg "height="/>
2.7 Installation
command: Make Install
650) this.width=650; "title=" 10-makeinstall "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 10- Makeinstall "src=" http://s3.51cto.com/wyfs02/M02/7F/82/wKioL1chdRfwZ8ihAAA3K0l_4r8688.jpg "height=" 133 "/>
2.8 Start, close, restart nginx service
Command:/usr/local/nginx-1.9.12/sbin/nginx # Boot
/usr/local/nginx-1.9.12/sbin/nginx–s Stop # Close
/usr/local/nginx-1.9.12/sbin/nginx–s Reload # Restart
The results shown indicate that the nginx service started successfully.
650) this.width=650; "title=" 11-servicestart "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 11- Servicestart "src=" http://s3.51cto.com/wyfs02/M01/7F/82/wKioL1chdRiR1fVdAAAXKGW94a0836.jpg "height="/>
You can also enter the IP address of the installation server in the Web page, showing the result, indicating that the service installation was successful.
650) this.width=650; "title=" 12-web "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 12-web "src=" http:// S3.51cto.com/wyfs02/m01/7f/84/wkiom1chde3doum1aaaulzawoag934.jpg "height="/>
2.9 Create a log file to prepare for installation of Zabbix
Command:
Mkdir/data
Mkdir/data/logs
Mkdir/data/logs/nginx
This article is from the "Bit Technology" blog, please be sure to keep this source http://tryrus.blog.51cto.com/10914693/1768483
CentOS 7 Installation nginx-1.9.12