【环境搭建】Nginx For CentOS6.3


[root@localhost Desktop]# rpm -aq | grep nginx
#查询是否存在nginx包
#返回空

[root@localhost Desktop]# rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
#从官网获取nginx的rpm包

[root@localhost Desktop]# yum install nginx
Is this ok [y/N]: y
#yum安装nginx

[root@localhost Desktop]# service nginx start
#启动nignx服务

[root@localhost Desktop]# whereis nginx
nginx: /usr/sbin/nginx /etc/nginx /usr/share/nginx
#查询nginx目录

[root@localhost nginx]# vi /etc/nginx/nginx.conf
#编辑配置文件