This demonstration is to install Nginx under CentOS6.5/' target='_blank'>CentOS6.5Operating system:
CentOS6.5/' target='_blank'> CentOS6.5-x86-64Nginx 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 mirror address: http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/
1. Install the EPEL package
Because installing nginx requires configuring the EPEL source. So first install the EPEL rpm package, go to the directory of epel-release-6-8.noarch.rpm, and install EPEL:
1 2 3 4 5 |
|
2. Configure the EPEL source
Since this demonstration is not connected to the Internet, nginx needs the EPEL source You need to download the file yourself and configure the source:
1 |
|
Modification: (The EPEL source package required here is placed in the /tmp/epel directory)
baseurl=file:///tmp/epel
Note:
#mirrorlist
Attachment: This is the EPEL source file required to install nginx (under the /tmp/epel directory)
(Mirror address: http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/)
[root@localhost tmp]# rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm
warning:nginx-release-centos-6-0.el6.ngx.noarch.rpm: Header V4 RSA/SHA1 Signature, keyID 7bd9bf62: NOKEY
Preparing... ########################################### [100%]
1:nginx-release-centos ########################################### [100%]</p>
<p></p>2) Delete nginx source<br><div class="code" style="position:relative; padding:0px; margin:0px;"><pre name="code">[root@localhost yum.repos.d]# pwd
/etc/yum.repos.d
[root@localhost yum.repos.d]# rm nginx.repo
rm: remove regular file `nginx.repo'? y
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
1 2 3 4 5 6 |
|
1 2 3 |
|
4. Log in to view , Successful