zabbix quick installation
System Version: centos 7
Installation Zabbix3.0, installed via yum source approach to cloud Ali
yum source configuration
1
|
rpm -ivh http:
//mirrors
.aliyun.com
/zabbix/zabbix/3
.0
/rhel/7/x86_64/zabbix-release-3
.0-1.el7.noarch.rpm
|
installation
1
|
yum
install
zabbix-server zabbix-agent zabbix-web zabbix-get zabbix-server-mysql zabbix-web-mysql mariadb-server mariadb -y
|
Changing PHP configuration time zone
1
|
sed
-i
's@# php_value date.timezone Europe/Riga@php_value date.timezone Asia/Shanghai@g'
/etc/httpd/conf
.d
/zabbix
.conf
|
Start the database
1
|
systemctl start mariadb
|
Create a database and user zabbix
1
2
3
4
5
6
|
mysql
create database zabbix character
set
utf8 collate utf8_bin;
grant all on zabbix.* to zabbix@
'localhost'
identified by
'zabbix'
;
exit
cd
/usr/share/doc/zabbix-server-mysql-3
.0.5
zcat create.sql.gz |mysql -uzabbix -pzabbix zabbix
|
Modify the configuration zabbix
1
2
3
4
5
|
# vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
#数据库所在主机
DBName=zabbix
#数据库名
DBUser=zabbix
#数据库用户
DBPassword=zabbix
#数据库密码
|
Zabbix and start http
1
2
|
systemctl start zabbix-server
systemctl start httpd
|
web interface configuration
http://ip:port/zabbix/setup.php
Username Admin Password zabbix
agent configuration
1
2
3
4
|
vim
/etc/zabbix/zabbix_agentd
.conf
Server=192.168.137.11
#用于被动模式,数据获取
ServerActive=192.168.137.11
#用于主动模式,数据提交
systemctl start zabbix-agent
#启动zabbix agent
|