2:安装 php 7.2 以及 zabbix 所需的 php 扩展???br> 安装 php 第三方源
yum install epel-release.noarch -y
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
安装 nginx、php7.2 和所需 php 扩展???/p>
yum install nginx php72w-cli php72w-fpm php72w-common php72w-mysqlnd php72w-mbstring php72w-gd php72w-bcmath php72w-ldap php72w-xml -y
注意:webtatic 源在国外,容易失败
修改 php 的配置文件
vim /etc/php-fpm.d/www.conf
user = apache
group = apache
修改为
user = nginx
group = nginx
修改 nginx 的配置文件
vim /etc/nginx/nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root /html;
index index.php index.html index.htm;
}
location ~ \.php$ {
root /html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /html$fastcgi_script_name;
include fastcgi_params;
}
}
}
启动 nginx 和 php-fpm
systemctl start nginx
systemctl enable nginx
systemctl start php-fpm
systemctl enable php-fpm
3:安装 zabbix-web
cd /opt/
下载源码包
wget https://cdn.zabbix.com/zabbix/sources/stable/5.0/zabbix-5.0.4.tar.gz
tar xf zabbix-5.0.4.tar.gz
mkdir /html
拷贝zabbix-web到站点目录
cp -a zabbix-5.0.4/ui/* /html
修改站点目录属主和属组
chown -R nginx:nginx /html
使用浏览器访问 http://<你的 ip>