一、安装环境准备
1、系统环境:
cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
关闭防火墙及selinux
[root@zabbix ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@zabbix ~]# systemctl stop firewalld.service
[root@zabbix ~]# systemctl disable firewalld.service
[root@zabbix ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
[root@zabbix ~]# grep SELINUX=disabled /etc/selinux/config
SELINUX=disabled
[root@zabbix ~]# setenforce 0
setenforce: SELinux is disabled
二、安装Nginx
1、下载Nginx
[root@zabbix ~]# mkdir /data/tools
[root@zabbix ~]# cd /data/tools/
[root@zabbix tools]# wget http://nginx.org/download/nginx-1.12.0.tar.gz
[root@zabbix tools]# ls
nginx-1.12.0.tar.gz
2、创建Nginx用户
[root@zabbix tools]# groupadd nginx
[root@zabbix tools]# useradd -s /sbin/nologin -g nginx -M nginx
3、安装依赖
[root@zabbix tools]# yum install gc gcc gcc-c++ pcre-devel zlib-devel openssl-devel -y
4、解压
[root@zabbix tools]# tar -zxf nginx-1.12.0.tar.gz
[root@zabbix tools]# cd nginx-1.12.0/
5、编译
[root@zabbix nginx-1.12.0]#