zabbix 安装配置
中间报错:
2:postfix-2.10.1-7.el7.x86_64 has missing requires of libmysqlclient.so.18
# 解决办法
wget http://www.percona.com/redir/downloads/Percona-XtraDB-Cluster/5.5.37-25.10/RPM/rhel6/x86_64/Percona-XtraDB-Cluster-shared-55-5.5.37-25.10.756.el6.x86_64.rpm
rpm -ivh Percona-XtraDB-Cluster-shared-55-5.5.37-25.10.756.el6.x86_64.rpm
创建数据库:
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
#Edit file
/etc/zabbix/zabbix_server.conf
设置时区
#Edit file /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
启动(开机自启动)
systemctl restart zabbix-server zabbix-agent httpd
systemctl enable zabbix-server zabbix-agent httpd
卸载重装低版本:
[root@localhost ~]# rpm -qa | grep zabbix
zabbix-agent-4.4.1-1.el7.x86_64
zabbix-release-4.4-1.el7.noarch
zabbix-web-4.4.1-1.el7.noarch
zabbix-server-mysql-4.4.1-1.el7.x86_64
zabbix-web-mysql-4.4.1-1.el7.noarch
yum remove zabbix-agent-4.4.1-1.el7.x86_64
yum remove zabbix-release-4.4-1.el7.noarch
yum remove zabbix-web-4.4.1-1.el7.noarch
yum remove zabbix-server-mysql-4.4.1-1.el7.x86_64
yum remove zabbix-web-mysql-4.4.1-1.el7.noarch
# Install Zabbix repository
rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm
yum clean all
# Install Zabbix server, frontend, agent
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent
# Create initial database
# mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
mysql> quit;
建立数据库:
create database zabbix character set utf8 collate utf8_bin;
create user 'zabbix'@'%' identified by 'yyxz@20191113';
# 赋予 zabbix 用户从外部操作 zabbix 数据库权限
grant all privileges on zabbix.* to 'zabbix'@'%' identified by 'yyxz@20191113';
FLUSH PRIVILEGES;
quit;
启动报错:
version libmysqlclient_18 not defined in file libmysqlclient.so.18
# 解决办法,下载一个:
wget -O /usr/lib/libmysqlclient.so.18 http://files.directadmin.com/services/es_7.0_64/libmysqlclient.so.18
chmod a+x /usr/lib/libmysqlclient.so.18
遇到报错,还未解决:
-- Unit zabbix-server.service has begun starting up.
Nov 13 18:43:48 localhost.localdomain zabbix_server[1102]: /usr/sbin/zabbix_server: relocation error: /usr/sbin/zabbix_server: symbol mysql_next_result, version libmysqlclient_18 not defined in file libmysqlclient.so.18 with link time refe
Nov 13 18:43:48 localhost.localdomain systemd[1]: zabbix-server.service: control process exited, code=exited status=127
Nov 13 18:43:48 localhost.localdomain systemd[1]: Failed to start Zabbix Server.
-- Subject: Unit zabbix-server.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit zabbix-server.service has failed.
--
-- The result is failed.
Nov 13 18:43:48 localhost.localdomain systemd[1]: Unit zabbix-server.service entered failed state.
Nov 13 18:43:48 localhost.localdomain systemd[1]: zabbix-server.service failed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
上一篇: Windows 批处理编写心得
下一篇: 彻底找到 Tomcat 启动速度慢的元凶
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论