Centos7安装Zabbix3.0

  1. 云栖社区>
  2. 博客>
  3. 正文

Centos7安装Zabbix3.0

科技探索者 2017-11-22 14:17:00 浏览829
展开阅读全文

1.安装服务器端包

1
2
3
4
#rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
#yum clean all
#yum install zabbix-server-mysql zabbix-web-mysql
#yum -y install mariadb-server

2.启动mariadb

1
2
#systemctl start mariadb-server
#systemctl enable mariadb-server

3.创建zabbix数据库

1
2
3
4
5
6
7
#cd /usr/share/doc/zabbix-server-mysql-3.0.3/
#gunzip create.sql.gz
#mysql -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbixpwd';
mysql> quit;
#mysql -uzabbix -pzabbixpwd zabbix < create.sql

4.修改zabbix配置文件

1
2
3
4
5
6
7
#vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbixpwd
#systemctl start zabbix-server
#systemctl enable zabbix-server

5.关闭Selinux和火墙,当然你配通也可以

1
2
#setenforce 0
#systemctl stop firewalld

6.修改http配置文件

1
2
3
4
5
6
7
8
9
10
#vim /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 httpd
#systemctl start httpd

7.Zabbix frontend is available at http://zabbix-frontend-hostname/zabbix in the browser.  (Default username/password is Admin/zabbix).  

092733t8ffjs62s62nmjf2.png092733f2usov4ku9ehtrot.png092732m6qcw3rcmrtccsnd.png092730ka8qhshzngcbbahu.png092728ccqqu62zclme44ug.png092728x7m69c7td4c8ds99.png092726q7g4v6bp6tytwwb6.png

前端页面php配置位置:/etc/zabbix/web/zabbix.conf.php

安装过程中遇见的问题

[root@zabbix-server ~]# systemctl start zabbix-server
Job for zabbix-server.service failed. See 'systemctl status zabbix-server.service' and 'journalctl -xn' for details.

先检查selinux是否关闭,关闭后,并安装以下两个软件。再次启动zabbix-server服务便可以启动成功。

[root@zabbix-server ~]# yum install trousers gnutls -y

8.安装和配置客户端

1
2
3
4
5
6
#rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
#yum -y install zabbix-agent
#vim /etc/zabbix/zabbix_agentd.conf
Server=zabbix-server-ip
#systemctl enable zabbix-agent
#systemctl start zabbix-agent

本文转自不要超过24个字符博客51CTO博客,原文链接http://blog.51cto.com/cstsncv/1907858如需转载请自行联系原作者


cstsncv

网友评论

登录后评论
0/500
评论