yum install -y httpd
systemctl start httpd
访问http://172.29.128.54/
若是nginx,配置文件为:
yum install -y php*
cat 1.php
<?php phpinfo(); ?>
systemctl start php-fpm systemctl restart httpd
访问 http://172.29.128.54/1.php
yum install -y mariadb mariadb-server
systemctl start mariadb
初始化密码为空
mysql -uroot -p
update mysql.user set password=password("123456") where user='root' and host='localhost';
delete from mysql.user where password=""; select user,host,password from mysql.user;
create database zabbix character set utf8 collate utf8_bin; grant all on zabbix.* to 'gzb'@'%' identified by '123456';
flush privileges;
换源 [aliyun-os] name=aliyun-os baseurl=https://mirrors.aliyun.com/centos/7/os/x86_64/ enabled=1 gpgcheck=0 [aliyun-epel] name=aliyun-epel baseurl=https://mirrors.aliyun.com/epel/7/x86_64/ enabled=1 gpgcheck=0 [aliyun-extra] name=aliyun-extra baseurl=https://mirrors.aliyun.com/centos/7/extras/x86_64/ enabled=1 gpgcheck=0
[zabbix] name=Zabbix Official Repository - $basearch baseurl=http://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/ enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591 [zabbix-non-supported] name=Zabbix Official Repository non-supported - $basearch baseurl=http://repo.zabbix.com/non-supported/rhel/7/x86_64/ enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX gpgcheck=0
yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-get
yum install -y zabbix-agent
cd /usr/share/doc/zabbix-server-mysql-4.4.10/ zcat create.sql.gz | mysql -ugzb -p123456 -h 172.29.128.54 zabbix
mysql -ugzb -p123456 -h 172.29.128.54 use zabbix; show tables;
vim /etc/zabbix/zabbix_server.conf
grep -vE "^$|#" /etc/zabbix/zabbix_server.conf
systemctl restart httpd systemctl start zabbix-server
netstat -nlpt
访问 http://172.29.128.54/zabbix
时区错误修复:
vim /etc/php.ini
date.timezone = Asia/Shanghai
cd /etc/httpd/conf.d/ vim zabbix.conf
php_value date.timezone Asia/Shanghai
systemctl restart httpd
输入用户名:Admin 密码:zabbix
grep -vE "^$|#" /etc/zabbix/zabbix_agentd.conf
解决中文乱码问题
cd /usr/share/zabbix/assets/fonts
vi /usr/share/zabbix/include/defines.inc.php
报警媒介类型
systemctl status sendmail
systemctl status postfix systemctl stop postfix systemctl disable postfix
yum install -y mailx.x86_64
配置mailx vim /etc/mail.rc
set from=983509376@qq.com set smtp=smtp.qq.com set smtp-auth-user=983509376@qq.com set smtp-auth-password=hoxlfysxdoqmbbdj set smtp-auth=login
echo "test test内容" | mailx -s "test标题" guo_zhibin@ymsl.com.cn
查看zabbix版本号 /usr/sbin/zabbix_server -V
标签:etc,zabbix,systemctl,aliyun,mysql,zabbix4.4,com,搭建 From: https://www.cnblogs.com/gzb891/p/16880112.html