This demo is in
CentOS6.5/' target= ' _blank ' >
CentOS6. 5Install Nginx under operating system
Operating system:CentOS6. 5/' target= ' _blank ' >CentOS6. 5-x86-64
Nginx Version: nginx-release-centos-6-0.el6.ngx.noarch.rpm
Nginx Download Address: http://nginx.org/en/linux_packages.html#stable
Epel version: epel-release-6-8.noarch.rpm
Epel Package Download Address: http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Epel source image address: http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/
1. Install Epel Package
Because the installation nginx need to configure Epel source, so first install Epel RPM package, to epel-release-6-8.noarch.rpm directory, install Epel:
[Root@localhost tmp]# RPM-IVH epel-release-6-8.noarch.rpmwarning:epel-release-6-8.noarch.rpm:headerv3 RSA/SHA256 Signature, key ID 0608b895:nokeypreparing ... ########################################### [100%] 1:epel-release ##################################### ###### [100%]
2. Configure Epel Source
Therefore, the demo does not have a network, so nginx needs to download the Epel source files, and to do the source configuration:
[Root@localhost tmp]# VI /ETC/YUM.REPOS.D/EPEL.REPO
Modified: (The Epel source package required here is placed under the/tmp/epel directory)
Baseurl=file:///tmp/epel
Comments:
#mirrorlist
Attached: This is the installation of Nginx required Epel source files (/tmp/epel directory)
(Mirror address: http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/)
Install Nginx under CentOS65 ">
3. Installing Nginx
1) Install the Nginx RPM package
[Root@localhost tmp]# RPM-IVH nginx-release-centos-6-0.el6.ngx.noarch.rpmwarning: Nginx-release-centos-6-0.el6.ngx.noarch.rpm:header V4 rsa/sha1 Signature, KeyID 7bd9bf62:nokeypreparing ... ########################################### [100%] 1:nginx-release-centos ############################# ############## [100%]
2) Delete Nginx source
[Root@localhost yum.repos.d]# pwd/etc/yum.repos.d[root@localhost yum.repos.d]# rm nginx.reporm:remove Regular file ' Nginx.repo '? Y
3) Install Nginx
[Root@localhost yum.repos.d]# yum install nginxloaded plugins:fastestmirror, securityloading mirror speeds from cached ho Stfilesetting up Install processresolving dependencies--> Running Transaction Check---> Package nginx.x86_ 640:1.0.15-12.el6 'll be installed--> processing Dependency:nginx-filesystem = 1.0.15-12.el6 for package: nginx-1.0.15-12.el6.x86_64--> processing Dependency:nginx-filesystem for package:nginx-1.0.15-12.el6.x86_64-- > Processing dependency:gd forpackage:nginx-1.0.15-12.el6.x86_64--> processing Dependency:geoip forpackage: Nginx-1.0.15-12.el6.x86_64--> processing dependency:libgd.so.2 () (64bit) for package:nginx-1.0.15-12.el6.x86_64- -Processing dependency:libgeoip.so.1 () (64bit) for package:nginx-1.0.15-12.el6.x86_64--> Running transaction Check---> Package geoip.x86_64 0:1.6.5-1.el6will is installed--> processing dependency:geoipupdatefor package: Geoip-1.6.5-1.el6.x86_64--> Processing Dependency:geoip-datafor Package: GEOIP-1.6.5-1.EL6.X86_64---> Package gd.x86_64 0:2.0.35-11.el6will is installed--> processing Dependency: Libxpm.so.4 () (64bit) for package:gd-2.0.35-11.el6.x86_64---> Package nginx-filesystem.noarch0:1.0.15-12.el6 would Be installed--> Running Transaction Check---> Package geoip-geolite-data.noarch0:2015.04-2.el6 'll be installed--> processing Dependency:geoip-geolite-data-extra = 2015.04-2.el6 for package: Geoip-geolite-data-2015.04-2.el6.noarch---> Package geoipupdate.x86_640:2.2.1-2.el6 'll be installed---> Package libxpm.x86_640:3.5.10-2.el6 'll be installed--> Running transaction Check---> Packagegeoip-geolite-data-extra.noarch 0:2015.04-2.el6 'll be installed--> finished Dependency Resolution Dependencies Resolved ========================================================================================== ====== package Arch Version Repository size===================== ===========================================================================installing:nginx x86_64 1.0.15- 12.el6 Epel 404 kinstalling for Dependencies:geoip x86_64 1.6.5- 1.el6 Epel 113 k geoip-geolite-data Noarch 2015.04-2.el6 Epel 343 k Geoip-geolite-data-extra Noarch 2015.04-2.el6 Epel-M GD x86_64 2.0.35-11.el6 Base 142 k geoipupdate x86_64 2.2.1-2.el6 Epel k libxpm x86_64 3.5.10-2.el6 Base Wuyi k nginx-filesystem Noarch 1.0.15-12.el6 Epel 8.1 k T Ransaction summary============================================================================================= ===install 8 Package (s) total Download size:24 minstalled size:50 MIs This ok [y/n]: ydownloading Packages:------------------------------------------ ------------------------------------------------------Total M b/S | MB 00:00 warning:rpmts_HdrFromFdno:Header v3rsa/sha256 Signature, key ID 0608b895:nokeyretrieving key Fromfil E:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6importing GPG KEY 0x0608b895:userid:epel (6)
Package:epel-release-6-8.noarch (installed) from:/etc/pki/rpm-gpg/rpm-gpg-key-epel-6is this OK [Y/N]: yRunning rpm_c Heck_debugrunning Transaction testtransaction Test succeededrunning Transactionwarning:rpmdb altered outside of Yum. Installing:geoip-geolite-data-extra-2015.04-2.el6.noarch 1/8 installing:geoip-geolite-d Ata-2015.04-2.el6.noarch 2/8 installing:geoipupdate-2.2.1-2.el6.x86_64 3/8 installing:geoip-1.6.5-1.el6.x86_64 4/8 installing:libxpm-3.5.10-2.el6.x86_64 5/8 installing:gd-2.0. 35-11.el6.x86_64 6/8 Installing:nginx-filesystem-1.0.15-12.el6.noarc H 7/8 installing:nginx-1.0.15-12.el6.x86_64 8/8 Verifying: Nginx-filesystem-1.0.15-12.el6.noarch 1/8 verifying:geoip-1.6.5-1.el6.x86_64 2/8 Verifying:geoip-geolite-data-2015.04-2.el6.noarch 3/8 verifying:libxpm-3.5.10-2.el6.x86_64 4/8 Verifyin g:geoipupdate-2.2.1-2.el6.x86_64 5/8 verifying:geoip-geolite-data-extra- 2015.04-2.el6.noarch 6/8 verifying:nginx-1.0.15-12.el6.x86_64 7/8 verifying:gd-2.0.35-11.el6.x86_64 8/8 Inst alled:nginx.x86_64 0:1.0.15-12.el6 Dependency installed: geoip.x86_64 0:1.6.5-1.el6 geoip-geolite-data.noarch 0:2015.04-2.el6 Geoip-geolite-data-extra.noar Ch 0:2015.04-2.el6 gd.x86_64 0:2.0.35-11.el6 geoipupdate.x86_64 0:2.2.1-2.el6 libxpm.x86_640:3.5.10-2.el6 Nginx-filesystem.noarch 0:1.0.15-12.el6 complete!
4) Operation and inspection Nginx
[Root@localhost yum.repos.d]# nginx [root@localhost yum.repos.d]# whereis Nginxnginx:/usr/sbin/nginx/etc/nginx/usr/ Share/nginx/usr/share/man/man8/nginx.8.gz/usr/share/man/man3/nginx.3pm.gz
5) Nginx version
[Root@localhost yum.repos.d]#/usr/sbin/nginx-vnginx version:nginx/1.0.15
4, Login to view, success
Install Nginx under CentOS65 ">
The above describes the installation of Nginx CentOS65, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.