----------------------------------------------------------
安装Zabbix server
登录mysql
[root@localhost ~]# mysql -uroot -p
创建数据库
mysql> create database zabbix character set utf8;
创建用户:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'zabbix'@'%' IDENTIFIED BY 'haitaoLIU0617*' WITH GRANT OPTION;
刷新授权
mysql> flush privileges;
--------------------------------------------
把zabbix-3.4.7.tar.gz源码包database目录下的mysql导入数据库
先导入schema.sql
再导入images.sql
最后导入data.sql
----------------------------------------------------------------
创建用户账户
[root@localhost zabbix-3.4.7]# groupadd zabbix
[root@localhost zabbix-3.4.7]# useradd -g zabbix zabbix
----------------------------------------------------------------
安装依赖
[root@localhost ~]# yum install net-snmp-devel libxml2-devel libcurl-devel
[root@localhost src]# tar -zxf zabbix-3.4.7.tar.gz
[root@localhost src]# cd zabbix-3.4.7
[root@localhost zabbix-3.4.7]# ./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
报错
configure: error: MySQL library not found
问题解决:
yum install mysql-devel
报错
configure: error: Unable to use libevent (libevent check failed)
问题解决
[root@localhost zabbix-3.4.7]# yum install libevent-devel
https://blog.csdn.net/xulqlgwy1230/article/details/78612340
[root@localhost zabbix-3.4.7]# make && make install
---------------------------------------------------------------------
配置
[root@localhost frontends]# vi /usr/local/etc/zabbix_server.conf
DBHost=127.0.0.1
DBName=zabbix
DBUser=zabbix
DBPassword=haitaoLIU0617*
DBPort=3306
[root@localhost ~]# vi /usr/local/etc/zabbix_agentd.conf
Server=192.168.0.115
ServerActive=192.168.0.115
Hostname=192.168.0.115
-----------------------------------------------------
修改PHP配置
max_execution_time = 300
memory_limit = 128M
post_max_size = 16M
upload_max_filesize = 2M
max_input_time = 300
date.timezone PRC
always_populate_raw_post_data = -1
-----------------------------------------------------
启动守护进程
在Zabbix server端启动zabbix_server。
[root@localhost src]# zabbix_server
在所有的被监控机器上启动zabbix_agentd。
[root@localhost src]# zabbix_agentd
-----------------------------------------------------
安装Zabbix web界面
在源码包中找到zabbix-3.4.7/frontends/php
[root@localhost frontends]# cp -r ./php /var/www/
按照步骤就可以了
------------------------------------------------------
在被监控机器上安装
创建用户
[root@localhost zabbix-3.4.7]# groupadd zabbix
[root@localhost zabbix-3.4.7]# useradd -g zabbix zabbix
yum install gcc gcc-c++
[root@192 src]# tar -zxf zabbix-3.4.7.tar.gz
[root@192 src]# cd zabbix-3.4.7
[root@192 zabbix-3.4.7]# ./configure --enable-agent
报错:configure: error: Unable to use libpcre (libpcre check failed)
解决:yum install pcre-devel -y
[root@192 zabbix-3.4.7]# make && make install
配置:
Server=192.168.0.115
ServerActive=192.168.0.115
Hostname=192.168.0.116
-----------------------------------------------------
[root@192 tmp]# killall zabbix_agentd
[root@192 tmp]# zabbix_agentd
参考
https://www.zabbix.com/documentation/3.4/zh/manual/installation/install
http://www.ttlsa.com/zabbix/install-zabbix-on-linux-5-ttlsa/
安装Zabbix server
登录mysql
[root@localhost ~]# mysql -uroot -p
创建数据库
mysql> create database zabbix character set utf8;
创建用户:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'zabbix'@'%' IDENTIFIED BY 'haitaoLIU0617*' WITH GRANT OPTION;
刷新授权
mysql> flush privileges;
--------------------------------------------
把zabbix-3.4.7.tar.gz源码包database目录下的mysql导入数据库
先导入schema.sql
再导入images.sql
最后导入data.sql
----------------------------------------------------------------
创建用户账户
[root@localhost zabbix-3.4.7]# groupadd zabbix
[root@localhost zabbix-3.4.7]# useradd -g zabbix zabbix
----------------------------------------------------------------
安装依赖
[root@localhost ~]# yum install net-snmp-devel libxml2-devel libcurl-devel
[root@localhost src]# tar -zxf zabbix-3.4.7.tar.gz
[root@localhost src]# cd zabbix-3.4.7
[root@localhost zabbix-3.4.7]# ./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
报错
configure: error: MySQL library not found
问题解决:
yum install mysql-devel
报错
configure: error: Unable to use libevent (libevent check failed)
问题解决
[root@localhost zabbix-3.4.7]# yum install libevent-devel
https://blog.csdn.net/xulqlgwy1230/article/details/78612340
[root@localhost zabbix-3.4.7]# make && make install
---------------------------------------------------------------------
配置
[root@localhost frontends]# vi /usr/local/etc/zabbix_server.conf
DBHost=127.0.0.1
DBName=zabbix
DBUser=zabbix
DBPassword=haitaoLIU0617*
DBPort=3306
[root@localhost ~]# vi /usr/local/etc/zabbix_agentd.conf
Server=192.168.0.115
ServerActive=192.168.0.115
Hostname=192.168.0.115
-----------------------------------------------------
修改PHP配置
max_execution_time = 300
memory_limit = 128M
post_max_size = 16M
upload_max_filesize = 2M
max_input_time = 300
date.timezone PRC
always_populate_raw_post_data = -1
-----------------------------------------------------
启动守护进程
在Zabbix server端启动zabbix_server。
[root@localhost src]# zabbix_server
在所有的被监控机器上启动zabbix_agentd。
[root@localhost src]# zabbix_agentd
-----------------------------------------------------
安装Zabbix web界面
在源码包中找到zabbix-3.4.7/frontends/php
[root@localhost frontends]# cp -r ./php /var/www/
按照步骤就可以了
------------------------------------------------------
在被监控机器上安装
创建用户
[root@localhost zabbix-3.4.7]# groupadd zabbix
[root@localhost zabbix-3.4.7]# useradd -g zabbix zabbix
yum install gcc gcc-c++
[root@192 src]# tar -zxf zabbix-3.4.7.tar.gz
[root@192 src]# cd zabbix-3.4.7
[root@192 zabbix-3.4.7]# ./configure --enable-agent
报错:configure: error: Unable to use libpcre (libpcre check failed)
解决:yum install pcre-devel -y
[root@192 zabbix-3.4.7]# make && make install
配置:
Server=192.168.0.115
ServerActive=192.168.0.115
Hostname=192.168.0.116
-----------------------------------------------------
[root@192 tmp]# killall zabbix_agentd
[root@192 tmp]# zabbix_agentd
参考
https://www.zabbix.com/documentation/3.4/zh/manual/installation/install
http://www.ttlsa.com/zabbix/install-zabbix-on-linux-5-ttlsa/