How to install Zabbix on CENTOS 7
when you have installed zabbix , it is important of changing password.
How to install Zabbix on CENTOS 7
link[https://www.cnblogs.com/syscal/p/12461620.html]
Setup 1 INSTALL
- Create the repos of Zabbix
rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
- Download repo from aliyun
wget http://mirrors.aliyun.com/repo/Centos-7.repo
- Backup repo & replace repo.
cp Centos-7.repo /etc/yum.repos.d/
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.bak
mv Centos-7.repo CentOS-Base.repo
- Updade
yum clean all
yum makecache
yum update
- Edit zabbix.repo in China.
vim /etc/yum.repos.d/zabbix.repo
[zabbix]
name=Zabbix Official Repository - \$basearch
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/\$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[zabbix-non-supported]
name=Zabbix Official Repository non-supported - \$basearch
baseurl=https://mirrors.aliyun.com/zabbix/non-supported/rhel/7/\$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1
- add gpgkey
curl https://mirrors.aliyun.com/zabbix/RPM-GPG-KEY-ZABBIX-A14FE591 \-o /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
curl https://mirrors.aliyun.com/zabbix/RPM-GPG-KEY-ZABBIX \-o /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
- upade
yum makecache -y
- Install software of Zabbix
yum install zabbix-server zabbix-web zabbix-server-mysql zabbix-web-mysql mariadb-server mariadb zabbix-agent -y
- Modify the zabbix.conf about timezone
vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
Setup2 Modify Database
- start database
systemctl start mariadb
- Create User & Database about Zabbix
mysql
create database zabbix character set utf8 collate utf8_bin;
grant all on zabbix.* to zabbix@'localhost' identified by '123456';
exit
cd /usr/share/doc/zabbix-server-mysql-3.2.11/
zcat create.sql.gz |mysql -uzabbix -p123456 zabbix
- Modify zabbix_server.conf
vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName-zabbix
DBUser=zabbix
DBPassword=123456
- Double check
grep -i 'DBHost\|DBN\|DBU\|DBP' /etc/zabbix/zabbix_server.conf
- Start Zabbix-server
systemctl start zabbix-server
systemctl status zabbix-server
systemctl restart httpd
systemctl stop firewalld
- Loggin in Http://192.168.56.11/zabbix.php
Admin
zabbix
modify & start zabbix-agent
vim /etc/zabbix/zabbix_agentd.conf
systemctl restart zabbix-agent