Nginx学习笔记-《环境准备》

一、环境调试确认
四项准备
1、确认系统网络
ping www.baidu.com
2、确认yum可用
yum list|grep gcc
3、确认关闭iptables规则
iptables -L --查看iptables状态
iptables -F --关闭iptables
4、确认停用selinux
getenforce --查看selinux状态
setenforce 0 --停用selinux状态
二项安装
安装gcc套件
yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake
安装常用工具
yum -y install wget httpd-tools vim
一次初始化
cd /opt;mkdir app download logs work backup
二、nginx安装
nginx官网http://nginx.org
在这里插入图片描述
1、选择稳定的版本stable version
在这里插入图片描述
2、centos执行命令 vim /etc/yum.repos.d/nginx.repo
将截图上面的内容复制到里面
[nginx]
name=nginx repo baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/

gpgcheck=0
enabled=1
将os替换为你的操作系统,比如是centos 7以上的版本,则改为baseurl=http://nginx.org/packages/centos/7/$basearch/
3、安装nginx
yum install nginx
4、nginx安装目录详解
rpm -ql nginx -查看ngnix安装目录
在这里插入图片描述
转载https://www.cnblogs.com/liang-io/p/9340335.html

猜你喜欢

转载自blog.csdn.net/u014519722/article/details/86621692