赞
踩
上面的部分都是 源码安装的 我们直接拉到下面
1: 是进行 yum 工具的安装 复制粘贴 去安装就行
sudo yum install yum-utils
2: 部分翻译过来就是:
那就按照要求建立文件:
vi /etc/yum.repos.d/nginx.repo
然后 把他要求的内容复制进去:
输入指令查看:
yum list|grep nginx
失败的话:
成功的话:(他们前面几个 没有 rh-这个前缀)
sudo yum install nginx
nginx -v
启动 systemctl start nginx
停止 systemctl stop nginx
重启 syatemctl restart nginx
检查是否启动:
systemctl status nginx
依次输入:
防火墙开启80端口访问
firewall-cmd --zone=public --add-port=80/tcp --permanent
防火墙重启命令 : firewall-cmd --reload
然后在浏览器 输入 ip:80 即可
yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
http://downloads.sourceforge.net/project/pcre/pcre/8.37/pcre-8.37.tar.gz
下载后 解压:
tar -xvf pcre-8.37.tar.gz
进入到 目录
执行:
./configure
再执行:
make && make install
查看是否成功:
pcre-config --version
然后解压:
进入目录:
一样的操作
./configure
make && make install
这个目录 会出现个nginx 目录
cd /usr/local
cd /usr/local/nginx/sbin
然后:
启动
./nginx
停止:
./nginx -s stop
如果启动了 浏览器 没有访问到 请看yum安装的第10步
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。