CentOS6.9系统下部署Zabbix-server 3.0的步骤

2023-04-16 02:09:00 centos6 部署 系统

CentOS6.9系统下部署Zabbix-server 3.0的步骤如下:

1、安装必要的系统依赖:首先,需要安装必要的系统依赖,执行以下命令:

yum install -y gcc gcc-c++ make automake autoconf libtool wget curl-devel net-snmp-devel OpenIPMI-devel libssh2-devel OpenIPMI-libs net-snmp-libs libcurl-devel unixODBC-devel libxml2-devel libssh2-devel openssl-devel perl-DBI perl-XML-Simple perl-Net-SNMP perl-JSON perl-IO-Socket-SSL perl-libwww-perl

2、安装MySQL:接下来,需要安装MySQL数据库,执行以下命令:

yum install -y mysql mysql-server

3、安装Zabbix-server:接下来,下载Zabbix-server源码包,执行以下命令:

wget https://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.6/zabbix-3.0.6.tar.gz

4、编译安装Zabbix-server:解压源码包,进入解压后的目录,执行以下命令:

./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2

5、安装Zabbix-server:编译完毕后,执行以下命令:

make install

6、创建Zabbix数据库:接下来,创建Zabbix数据库,执行以下命令:

mysql -uroot -p
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by '';
quit

7、导入Zabbix数据库:接下来,导入Zabbix数据库,执行以下命令:

cd /usr/local/src/zabbix-3.0.6/database/mysql/
mysql -uroot -p zabbix < schema.sql
mysql -uroot -p zabbix < images.sql
mysql -uroot -p zabbix < data.sql

8、配置Zabbix-server:接下来,配置Zabbix-server,执行以下命令:

cd /usr/local/etc/zabbix/
cp zabbix_server.conf zabbix_server.conf.bak
vi zabbix_server.conf
DBName=zabbix
DBUser=zabbix
DBPassword=
DBHost=localhost
LogFile=/tmp/zabbix_server.log
LogFileSize=0
Timeout=4
AlertScriptsPath=/usr/lib/zabbix/alertscripts
ExternalScripts=/usr/lib/zabbix/externalscripts
FpingLocation=/usr/sbin/fping
Fping6Location=/usr/sbin/fping6
SNMPTrapperFile=/tmp/zabbix_traps.tmp
LogSlowQueries=3000
StartPollers=5
StartIPMIPollers=5
StartPollersUnreachable=1
StartTrappers=5
StartPingers=1
StartDiscoverers=1
StartHTTPPollers=1
StartTimers=1
StartEscalators=1
StartAlerters=1
StartVMwareCollectors=0
StartVMwareCounters=0
StartSNMPTrapper=1
StartHouseKeeper=1
StartDBSyncers=4
StartProxyPollers=1
StartProxyConfigFetchers=1
StartHTTPCheckers=1
StartIPMIMonitors=1
StartSSHMonitors=1
StartTelnetMonitors=1
StartCalculators=1
StartJavaPollers=1
StartVMwareCollectors=1
StartVMwareCounters=1
StartDBSyncers=2
StartDiscoverers=1
StartHTTPPollers=3
StartPingers=1
StartTimers=1
StartTrappers=5
StartAlerters=1
StartEscalators=1
StartSNMPTrapper=1
StartHouseKeeper=1
StartProxyPollers=1
StartProxyConfigFetchers=1
StartHTTPCheckers=1
StartIPMIMonitors=1
StartSSHMonitors=1
StartTelnetMonitors=1
StartCalculators=1
StartJavaPollers=1
StartVMwareCollectors=1
StartVMwareCounters=1
StartDBSyncers=2

9、启动Zabbix-server:最后,启动Zabbix-server,执行以下命令:

/etc/init.d/zabbix_server start

相关文章