标签:ldb root密码 hang blog 安装zabbix 直接 服务端 zabbix3.0 run
一. 搭建zabbix服务
root@localhost mysqldb]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.6.38-log MySQL Community Server (GPL)
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
mysql>
mysql> create database zabbix character set utf8;
mysql> GRANT ALL PRIVILEGES ON *.* TO zabbix@localhost IDENTIFIED BY ‘zabbix‘;
mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)
mysql> show databases;
4 rows in set (0.00 sec)
[root@localhost mysqldb]# mysql -uzabbix -pzabbix //登陆测试
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
mysql>
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_*
[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 搭建完成
标签:ldb root密码 hang blog 安装zabbix 直接 服务端 zabbix3.0 run
原文地址:http://www.cnblogs.com/lzcys8868/p/7772133.html