yum安装nginx

先安装nginx的yum源,http://nginx.org/en/linux_packages.html#stable 找到链接,安装:
rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm

查看:
yum info nginx

安装:
yum install nginx

运行
service nginx start