目录
1. # tar包
2. # 安装php跟apache
3. # 修改主配置文件
4. # 编译安装mysql
5. # 编译安装libevent
6. # 编译安装zabbix
7. # 修改zabbix相关配置
8. # 添加Zabbix服务器和Zabbix代理启动脚本
9. # 创建zabbix数据库并把导入一些sql表
10. # 启动所有服务,并设置开机自启
11. #访问zabbix设置
1. # tar包
zabbix-3.4.12.tar.gz
2. # 安装php跟apache
# 先卸载系统自带的php
$ sudo yum remove -y php*
$ sudo yum -y install httpd php56w php56w-gd php56w-mysqlnd php56w-bcmath php56w-mbstring php56w-xml
3. # 修改主配置文件
1) # 配置/etc/php.inidate.timezone = Asia/Shanghai
2) #配置/etc/httpd/conf/httpd.confServerName 127.0.0.1DirectoryIndex index.html index.html.var index.php<Directory "/var/www/html/zabbix">
4. # 编译安装mysql
rhel6.5编译安装mysql可以参考这篇博文:https://blog.csdn.net/qq_34889607/article/details/79975205
$ cat /etc/my.cnf[mysqld]datadir=/data/mysql
5. # 编译安装libevent
$ sudo tar xf /opt/libevent-2.1.8-stable.tar.gz
$ sudo cd /opt/libevent-2.1.8-stable
$ sudo ./configure --prefix=/usr
$ sudo make && make install
6. # 编译安装zabbix
$ sudo tar xf /opt/zabbix-3.4.12.tar.gz
$ sudo mkdir /var/www/html/zabbix
$ sudo cp /opt/zabbix-3.4.12/frontends/php/* /var/www/html/zabbi
$ sudo cd /opt/zabbix-3.4.12
$ sudo ./configure --prefix=/usr/local/zabbix
$ sudo make install
7. # 修改zabbix相关配置
$ sudo vim /usr/local/zabbix/etc/zabbix_server.confDBName=zabbixDBUser=zabbixDBPassword=
8. # 添加Zabbix服务器和Zabbix代理启动脚本
$ sudo cp zabbix-3.4.3/misc/init.d/fedora/core/zabbix_server /etc/init.d/zabbix_server
$ sudo cp zabbix-3.4.3/misc/init.d/fedora/core/zabbix_agentd /etc/init.d/zabbix_agentd
9. # 创建zabbix数据库并把导入一些sql表
> create databases zabbix;
> grant all privileges on zabbix.* to 'zabbix'@'%' identified by '';
> grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by '';
> source zabbix-3.4.3/database/mysql/*.sql;
10. # 启动所有服务,并设置开机自启
1) # 启动Apache服务
2) # 启用mysql服务
3) # 启动zabbix
4) #设置开机自启
5) #查看端口号是否监听
11. #访问zabbix设置
http://ip
参考文档:https://blog.csdn.net/mr_rsq/article/details/78457587