zabbix-server3.4.15安装步骤详解(与官网一致)
上官网链接
https://www.zabbix.com/documentation/3.4/manual/installation/install_from_packages/rhel_centos
1.切换用户至root
su
2.检查服务器环境
#cat /etc/redhat-release
3.RPM安装
RHEL 7:
#rpm -ivh https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
4.前端安装先决条件
Zabbix前端需要基本安装中不提供的其他软件包。您需要在将运行Zabbix前端的系统中启用可选rpm的存储库
RHEL 7:
#yum-config-manager --enable rhel-7-server-optional-rpms
5.服务器/代理/前端安装
执行即可
To install Zabbix server (available for RHEL 7, deprecated on RHEL 6) with MySQL support:
#yum install zabbix-server-mysql
To install Zabbix proxy with MySQL support:
#yum install zabbix-proxy-mysql
To install Zabbix frontend (available for RHEL 7, deprecated on RHEL 6) with MySQL support:
#yum install zabbix-web-mysql
6.启动MySQL
create database zabbix; —创建数据库zabbix
grant all privileges on zabbix.*to [email protected] identified by ‘123’; —给用户赋权限
flush privileges; —刷新
exit —退出mysql
7.cd到/usr/share/doc/目录,ll|grep mysql,查看mysql的版本
8.使用MySQL导入服务器的初始架构和数据
#zcat /usr/share/doc/zabbix-server-mysql-版本号/create.sql.gz | mysql -u 用户名 -p 数据库名
#zcat /usr/share/doc/zabbix-server-mysql-3.4.15/create.sql.gz | mysql -u wyt -p zabbix
9.回到数据库,show tables可以查看库中有表了
10.改zabbix_server.conf配置文件
11.启动server
#service zabbix-server start
12.修改zabbix前端配置文件,改为本地时区
#vi /etc/httpd/conf.d/zabbix.conf