zabbix需要nginx+php+mysql环境
#下载nginx
1、https://nginx.org/en/download.html?_ga=2.163156028.1417077246.1565310048-1198126668.1565310048
#安装依赖库
2、yum install gcc gcc-c++ make automake autoconf libtool pcre* zlib openssl openssl-devel
#编译并安装
3、./configure --prefix=/usr/local/nginx
4、make && make install
#设置使用systemctl管理服务
5、vim /usr/lib/systemd/system/nginx.service
[Unit]
Description=nginx
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/nginx/sbin/nginx
[install]
WantedBy=multi-user.target
#设置环境变量
6、vim /etc/profileexport PATH=$PATH:/usr/local/nginx/sbin/
#关闭selinux和防火墙
vim /etc/selinux/config
改为disables
systemctl stop firewalld.service
systemctl disable firewalld.service
#安装完成
原文地址:https://blog.51cto.com/ahaqwz/2427946
时间: 2024-11-12 18:21:02