快速部署ZABBIX服务
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了快速部署ZABBIX服务相关的知识,希望对你有一定的参考价值。
rpm -Uvh https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
yum install mysql- --skip-broken
yum -y install httpd
systemctl start httpd.service
yum install php -y
sudo yum install php-mysqlnd php-gd libjpeg php-snmp php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath php-mhash php-common php-ctype php-xml php-xmlreader php-xmlwriter php-session php-mbstring php-gettext php-ldap php-mysqli --skip-broken -y
sudo yum install wget telnet net-tools python-paramiko gcc gcc-c++ dejavu-sans-fonts python-setuptools python-devel sendmail mailx net-snmp net-snmp-devel net-snmp-utils freetype-devel libpng-devel perl unbound libtasn1-devel p11-kit-devel OpenIPMI unixODBC -y
sudo systemctl enable mysqld && systemctl start mysqld
获取mysql初始密码
grep ‘temporary password‘ /var/log/mysqld.log
重置mysql初始密码
mysql_secure_installation
systemctl restart mysqld
mysql -u root -p
mysql>create database zabbix character set utf8; #创建数据库
mysql>create user [email protected]‘%‘ identified by ‘密码‘; #创建用户和密码
mysql>grant all privileges on zabbix.* to [email protected]‘%‘; #赋权
mysql>flush privileges;
mysql>exit;
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-java-gateway zabbix-web
cd /usr/share/doc/zabbix-server-mysql-3.4.8/
zcat create.sql.gz | mysql -uroot zabbix -p
vi /etc/zabbix/zabbix_server.conf
DBPassword=密码
vi /etc/httpd/conf.d/zabbix.conf
date.timezone 去掉注释符号#,并将值修改为 Asia/Shanghai
systemctl stop mysqld && reboot
systemctl start mysqld
systemctl start httpd
systemctl start zabbix-server
访问地址:IP:/zabbix
用户名/密码:admin/zabbix
参考网站:
https://www.centos.bz/2017/11/centos-7安装zabbix-3-4/
图形界面乱码解决方案:
在Windows系统中寻找合适的中文字体文件(.ttf)并复制到别处,更名为DejaVuSans.ttf
再通过SFTP或者其它方式上传到Zabbix Server上替换自带的字体/usr/share/fonts/dejavu/DejaVuSans.ttf
客户端安装:
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum install zabbix-agent
vi /etc/zabbix/zabbix_agentd.conf
Server=192.168.0.204
ServerActive=192.168.0.204
以上是关于快速部署ZABBIX服务的主要内容,如果未能解决你的问题,请参考以下文章