在nginx官网上找到支持信息:
Currently, nginx packages are available for the following distributions and versions:
RHEL/CentOS:
pse: collapse; max-width: 100%; border-spacing: 0px; background-color: transparent;">
Version Supported Platforms 5.x x86_64, i386 6.x x86_64, i386 7.x x86_64
Debian:
Version Codename Supported Platforms 6.x squeeze x86_64, i386 7.x wheezy x86_64, i386 8.x jessie x86_64, i386
Ubuntu:
Version Codename Supported Platforms 10.04 lucid x86_64, i386 12.04 precise x86_64, i386 14.04 trusty x86_64, i386, aarch64/arm64 14.10 utopic x86_64, i386
SLES:
To enable automatic updates of Linux packages set up the yum repository for the RHEL/CentOS distributions, the apt repository for the Debian/Ubuntu distributions, or the zypper repository for SLES.
看到是支持CentOS通过yum安装的,直接上命令:
# rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
# yum -y install nginx
就成功安装了,然后开启服务,报端口冲突。(由于事先安装了apache占用了80端口)
# service nginx start
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
[FAILED]
于是找到nginx的配置文件
# vim /etc/nginx/nginx.conf
看到里面有一句”include /etc/nginx/conf.d/*.conf;”,于是又找到/etc/nginx/conf.d/default.conf这个文件
vim /etc/nginx/conf.d/default.conf
打开后把listen 80改成listen 8080,然后启动nginx。
1
# service nginx restart
打开浏览器 输入http://localhost:8080/,就可以看到出现如下内容。
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.
茶杯头甜蜜终章dlc 官方手机版v1.0.0.3
下载火柴人传说暗影格斗内置菜单 最新版v3.0.1
下载荒野乱斗测试服 安卓版v61.10.3
下载荒野乱斗彩虹服 安卓版v61.10.3
下载寒霜启示录 安卓版v1.25.10
寒霜启示录是一款生存模拟游戏,不少玩家可能对于末日都有着自己
末日城堡免广告版 安卓最新版v0.7.1
末日城堡免广告版是一款非常好玩的模拟经营类游戏,内部可以不看
甜蜜人生模拟器 最新版v1.4.5
甜蜜人生模拟器是一款非常好玩的模拟恋爱手游,玩家在这里能够对
武器锻造师内置功能菜单 v10.4
武器锻造师内置菜单版是游戏的破解版本,在该版本中为玩家提供了
开放空间overfield 安卓版v1.0.5
开放空间Overfield是一款箱庭养成经营手游,让你在广阔