访问nginx官方站点,根据系统版本和需求下载nginx的Linux packages
wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm rpm –ivh ./nginx-release-centos-6-0.el6.ngx.noarch.rpm yum install nginx /etc/init.d/nginx start chkconfig nginx on
安装完成后设置防火墙允许80端口例外以便能正常对外提供web服务。