Centos7下ZABBIX安装全记录
安装之前务必关闭SELINUX
Install Repository with MySQL database
: rpm -i https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM*
rpm -i https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
Install Zabbix server, frontend, agent
:yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-sender
安装DB centos自带的mariadb也可 mysql 也可
:yum install mysql -y
mysql_secure_installation (初始化)
进入DB 创建zabbix数据库
mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql>create user 'user'@'%' identified by 'password';
mysql> grant all privileges on zabbix.* to 'user'@'%' identified by 'password';
mysql> FLUSH PRIILEGES
修改时区
vi /etc/httpd/conf.d
data.timezone 改成需要的时区
导入数据库zabbix数据库
cd /us/share/doc/zabbix-server-mysql-3.xxx/
gzip -d create.sql.gz
mysql -uuser -ppassword zabbix < create.sql
修改ZABBIX配置文件连接的数据库
vi /etc/zabbix/zabbix_server.conf
启动HTTP ZABBIX-SERVER ZABBIX-AGENT 开机启动
systemctl start httpd\zabbix-server\zabbix-agent
systemctl enabled httpd\zabbix-server\zabbix-agent
最后到网页端设置初始化设置
http://(ip 地址)/zabbix
初始用户名密码 Admin zabbix