Centos7搭建Nginx 服务
将Nginx放到yum repo库中
[root@localhost ~]# rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
Retrieving http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
warning: /var/tmp/rpm-tmp.xaRtaf: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:nginx-release-centos-7-0.el7.ngx ################################# [100%]
[root@localhost ~]#
查看Nginx信息
[root@localhost ~]# yum info nginx
Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
epel/x86_64/metalink | 5.8 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 2.9 kB 00:00:00
nginx | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/5): extras/7/x86_64/primary_db | 225 kB 00:00:00
(2/5): updates/7/x86_64/primary_db | 5.6 MB 00:00:00
(3/5): epel/x86_64/updateinfo | 1.0 MB 00:00:00
(4/5): nginx/x86_64/primary_db | 59 kB 00:00:01
epel/x86_64/primary_db FAILED
http://epel.mirror.angkasa.id/pub/epel/7/x86_64/repodata/e7c7b7c33794b4745a116eac1b71e3f987dd0f1f9a924c1241a36a09db2dffbe-primary.sqlite.bz2: [Errno 12] Timeout on http://epel.mirror.angkasa.id/pub/epel/7/x86_64/repodata/e7c7b7c33794b4745a116eac1b71e3f987dd0f1f9a924c1241a36a09db2dffbe-primary.sqlite.bz2: (28, 'Connection timed out after 30000 milliseconds')
Trying other mirror.
(5/5): epel/x86_64/primary_db | 6.9 MB 00:00:00
Determining fastest mirrors
* base: mirrors.bfsu.edu.cn
* epel: mirror.sjtu.edu.cn
* extras: mirrors.bfsu.edu.cn
* updates: mirrors.bfsu.edu.cn
Available Packages
Name : nginx
Arch : x86_64
Epoch : 1
Version : 1.18.0
Release : 2.el7.ngx
Size : 769 k
Repo : nginx/x86_64
Summary : High performance web server
URL : http://nginx.org/
License : 2-clause BSD-like license
Description : nginx [engine x] is an HTTP and reverse proxy server, as well as