Zabbix硬件需求:
一、Mariadb数据库部署:
1.安装Mariadb数据库:
yum install mariadb-server -y
systemctl start mariadb.service
systemctl enable mariadb.service
systemctl status mariadb.service
mysqladmin -u root -p password
mysql -u root -p
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@'zabbix.hbgslz.com' identified by 'Foxconn99.';
quit;
2.导入zabbix初始架构和数据:(注意:安装完zabbix-server后再执行)
cd /usr/share/doc/zabbix-server-mysql-3.4.7/
zcat create.sql.gz | mysql -h zabbix.hbgslz.com -u root zabbix
二、安装Zabbix:
1.配置Zabbix的yum源库:
cd /tmp
wget http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm
rpm -ivh zabbix-release-3.4-1.el7.centos.noarch.rpm
2.服务器安装组件:
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-get
3.客户端安装组件:
yum -y install zabbix-agent
三、配置/etc/zabbix/zabbix_server.conf文件,修改以下四项信息:
DBHost=192.168.199.135
DBName=zabbix
DBUser=zabbix
DBPassword=Foxconn99.
四、配置Apache目录下/etc/httpd/conf.d/zabbix.conf 文件,修改为本地所在时区
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
php_value date.timezone Asia/Shanghai
以上步骤一到步骤四都安装完后,依次配置服务开机启动,并重新启动服务:
systemctl enable mariadb.service
systemctl restart mariadb.service
systemctl enable zabbix-server.service
systemctl restart zabbix-server.service
systemctl enable zabbix-agent.service
systemctl restart zabbix-agent.service
systemctl enable httpd.service
systemctl restart httpd.service
五、浏览器访问http://192.168.199.135/zabbix,配置Zabbix:
检查如下是否都为“OK”
填写数据库相关信息
注意:Database port端口如需修改,则必须填写对应端口,默认3306端口则无需修改,保持0即可
Zabbix部署完成后,默认账号为:Admin(注意大小写),密码为:zabbix
六、切换中文:
1.点击右上角的“人头:按钮
2.在Language选项的下拉菜单中选择“Chinese(zh_CN)”,然后选择update按钮即可
3.修改Zabbix字体文件(如果不修改,中文显示图形会出现乱码),从Windows系统中的C:\Windows\Fonts目录下,选取任意一款字体,复制到/usr/share/zabbix/fonts/目录下,并命名为graphfont.ttf(覆盖掉之前的文件)