yum方式安装nginx
[root@huhu yum.repos.d]# rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
Retrieving http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
warning: /var/tmp/rpm-tmp.AKQkrL: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY
Preparing... ########################################### [100%]
1:nginx-release-centos ########################################### [100%]
[root@huhu yum.repos.d]# ll
total 16
-rw-r--r--. 1 root root 1926 Jul 3 2011 CentOS-Base.repo
-rw-r--r--. 1 root root 637 Jul 3 2011 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 626 Jul 3 2011 CentOS-Media.repo
-rw-r--r--. 1 root root 113 Oct 14 2011 nginx.repo
[root@huhu ~]# yum info nginx
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirrors.yun-idc.com
* extras: mirrors.yun-idc.com
* updates: mirrors.yun-idc.com
Available Packages
Name : nginx
Arch : i386
Version : 1.4.1
Release : 1.el6.ngx
Size : 317 k
Repo : nginx
Summary : nginx is a 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
: a mail proxy server
# yum install nginx -y
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirrors.yun-idc.com
* extras: mirrors.yun-idc.com
* updates: mirrors.yun-idc.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nginx.i386 0:1.4.1-1.el6.ngx set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================
Installing:
nginx i386 1.4.1-1.el6.ngx nginx 317 k
Transaction Summary
===============================================================================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 317 k
Installed size: 734 k
Downloading Packages:
[root@huhu ~]# which nginx
/usr/sbin/nginx
[root@huhu ~]# /usr/sbin/nginx -v
nginx version: nginx/1.4.1
[root@huhu ~]# ps aux|grep nginx
root 15399 0.0 0.0 4308 724 pts/0 S+ 11:15 0:00 grep nginx
[root@huhu ~]# service nginx start
Starting nginx: [ OK ]
[root@huhu ~]# ps aux|grep nginx
root 15410 0.0 0.0 7196 772 ? Ss 11:15 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 15411 0.0 0.0 7336 1132 ? S 11:15 0:00 nginx: worker process
root 15414 0.0 0.0 4308 724 pts/0 S+ 11:15 0:00 grep nginx