Nginx(-) 环境确认

服务器:aliyun  环境:CentOS7.2 64

1.opt 目录下创建文件夹 app  backup  download  logs  work

[root@smoker-linux opt]# ls
app  backup  download  logs  work

app 存放代码及应用
backup 存放对应备份文件
download 存放下载的相关的文件
logs 日志
work 工作空间

2.确认环境

查看已安装的yum包(服务器已安装)
#rpm -qa|grep yum
查看是否安装gcc(服务器已安装)
#yum list|grep gcc
查看iptables规则
[root@smoker-linux opt]# iptables -L
[root@smoker-linux opt]# iptables -t nat -L
关闭iptables规则
[root@smoker-linux opt]# iptables -F
[root@smoker-linux opt]# iptables -t nat -F
查看SELinux状态(服务器禁用状态)
[root@smoker-linux opt]# getenforce
Disabled
如果是启用状态关闭
[root@smoker-linux opt]# setenforce 0
setenforce: SELinux is disabled
以上服务器环境基本确认完毕.

接下来安装一些基本依赖
[root@smoker-linux opt]# yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake
安装一些相关的包
[root@smoker-linux opt]# yum -y install wget httpd-tools vim

 CentOS扩展(CentOS7)

启动一个服务:systemctl start firewalld.service

关闭一个服务:systemctl stop firewalld.service

重启一个服务:systemctl restart firewalld.service

显示一个服务的状态:systemctl status firewalld.service

在开机时启用一个服务:systemctl enable firewalld.service

在开机时禁用一个服务:systemctl disable firewalld.service

查看服务是否开机启动:systemctl is-enabled firewalld.service;echo $?

查看已启动的服务列表:systemctl list-unit-files|grep enabled

 

posted @ 2018-07-10 13:54  smokerBig  阅读(101)  评论(0)    收藏  举报