CentoOs安装nginx
本文不涉及太多配置项管理,只是针对小白用户的最快安装手册
服务器信息:Linux centos 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
nginx版本:1.10.1
主要分几步:
1 配置CentoOS的YUM的nginx仓库
进入/etc/yum.repos.d目录下面,新建nginx.repo。内容如下
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
2 安装Nginx的仓库
wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
3 安装Nginx的WEB SERVER
yum install nginx
完成截图
nginx setup4 启动nginx
service nginx start
完成截图
其它相关命令:
# service nginx start
# service nginx stop
# service nginx restart
# service nginx status
# service nginx reload
参考链接:
http://www.cyberciti.biz/faq/install-nginx-centos-rhel-6-server-rpm-using-yum-command/
https://www.nginx.com/resources/wiki/start/topics/tutorials/install/#