1 zabbix3.2.4 安装
Posted 刘振川的博客
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了1 zabbix3.2.4 安装相关的知识,希望对你有一定的参考价值。
一. 搭建zabbix服务
mysql> create database zabbix character set utf8;
Query OK, 1 row affected (0.02 sec)
mysql> grant all on zabbix.* to zabbix@localhost identified by \'zabbix\';
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.03 sec)
[root@localhost mysql]# mysql -uzabbix -p
Enter password: 输入zabbix
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
| zabbix |
+--------------------+
3 rows in set (0.00 sec)
3.安装zabbix
[root@localhost ~]# yum - y install httpd libxml2-devel net-snmp-devel libcurl-devel
[root@localhost mysqldb]# groupadd -g 201 zabbix
[root@localhost mysqldb]# useradd -g zabbix -u 201 -m zabbix
[root@localhost mysqldb]# cd /root/soft
[root@localhost soft]# ls
zabbix-3.2.4.tar.gz
[root@localhost soft]# tar xf zabbix-3.2.4.tar.gz -C /usr/src/
[root@localhost soft]# cd /usr/src/zabbix-3.2.4/
[root@localhost zabbix-3.2.4]# mysql -uzabbix -pzabbix zabbix < ./database/mysql/schema.sql
[[root@localhost zabbix-3.2.4]# mysql -uzabbix -pzabbix zabbix < ./database/mysql/
images.sql
[root@localhost zabbix-3.2.4]# mysql -uzabbix -pzabbix zabbix < ./database/mysql/
data.sql
[root@localhost zabbix-3.2.4]# yum -y install gcc gcc-c++ make
[root@localhost zabbix-3.2.4]# ./configure --prefix=/usr/local/zabbix --sysconfdir=/etc/zabbix/ --enable-server --enable-agent --with-net-snmp --with-libcurl --with-mysql --with-libxml2
[root@localhost zabbix-3.2.4]# make && make install
注:编译 zabbix 如果报下面错误,就做以下操作 configure: error: Not found mysqlclient library
4. 配置zabbix
[root@localhost zabbix-3.2.4]# cp /etc/zabbix/zabbix_server.conf /etc/zabbix/zabbix_server.conf.org
[root@localhost zabbix-3.2.4]# vim /etc/zabbix/zabbix_server.conf
77 DBHost=192.168.9.28 //数据库ip地址
85 DBName=zabbix
102 DBUser=zabbix
298 ListenIP=127.0.0.1,192.168.9.28 //zabbix_server地址
[root@localhost zabbix-3.2.4]# ln -s /usr/local/zabbix/sbin/* /usr/sbin/
[root@localhost zabbix-3.2.4]# cp -r /usr/src/zabbix-3.2.4/misc/init.d/fedora/core/zabbix_* /etc/init.d/
[root@localhost zabbix-3.2.4]# chmod +x /etc/init.d/zabbix_*
22 BASEDIR=/usr/local/zabbix
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 20806/zabbix_agentd
/usr/src/zabbix-3.2.4
277 ServerName 192.168.9.28
[root@localhost zabbix-3.2.4]# chkconfig zabbix_server on
[root@localhost ~]# service zabbix_server start
8.浏览器访问zabbix,并按照提示安装
http://192.168.9.28/zabbix
输入用户名密码 Admin/zabbix
至此,zabbix3.0 搭建完成
以上是关于1 zabbix3.2.4 安装的主要内容,如果未能解决你的问题,请参考以下文章