其他系统优化为前提
1、添加yum源
rpm -ivh http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
2、安装软件
yum install -y httpd php mariadb-server zabbix-server-mysql zabbix-web-mysql
3、第一个密码
vi /etc/zabbix/zabbix_server.conf
DBPassword=密码
4、
vi /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai#取消注释改变城市
5、启动服务
systemctl start mariadb.service
6、导入数据库
mysql
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
zcat /usr/share/doc/zabbix-server-mysql-4.0.0/create.sql.gz|mysql -uzabbix -pzabbix zabbix
#zabbix-server-mysql-4.0.33 zabbix-server-mysql-4.0.0 是不一样的,自己选择自己的
7、设置自动重启
systemctl start zabbix-server.service httpd mariadb.service
systemctl enable zabbix-server.service httpd mariadb.service
8、设置登录页面
http://ip/zabbix/setup.php
9、登录、密码哪个我也忘了
用户名Admin 密码 passwd
只是服务端的配置