centos服务器下yum安装nginx
Ubuntu下安装nginx,直接apt-get install nginx就行了,很方便。但是今天装了CentOS6.5,直接yum install nginx不行,要先处理下源,下面是安装完整流程,也十分简单:1、CentOS 6,先执行:rpm -ivh http://nginx.org/packages/centos ... .el6.ngx.noarch.rpm
2,查看yum的nginx信息Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirrors.cn99.com
* extras: mirrors.cn99.com
* updates: mirrors.cn99.com
Installed Packages
Name : nginx
Arch : x86_64
Version : 1.10.2
Release : 1.el6.ngx
Size : 2.1 M
Repo : installed
From repo : nginx
Summary : High performance web server
URL : http://nginx.org/
License : 2-clause BSD-like license
Description : nginx is an HTTP and reverse proxy server, as well as
: a mail proxy server.
3,安装并启动nignx# yum install nginx# service nginx startStarting nginx: [ OK ]
4,然后进入浏览器,输入http://192.168.129.128/测试,如果看到
恭喜你,你成功了!
如果不能连接到nginx,原因很多,但是可以先检查 1,nginx服务是否真的起来了;2,linux服务器防火墙是否打开;3,selinux有没有关闭
页:
[1]