zabbix安装配置简要记录
分类:linux日期:2018-04-10 - 10:45:17作者:老谢
请优先参考:LNMP安装配置Zabbix搭建企业级监控平台
安装zabbix(CentOS 6.9 X64)
groupadd zabbix
useradd -g zabbix -s /sbin/nologin zabbix
yum -y install net-snmp net-snmp-devel curl curl-devel perl-DBI net-snmp-utils
wget https://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.4.8/zabbix-3.4.8.tar.gz
tar -zxf zabbix-3.4.8.tar.gz
mysql -uroot -proot -e "create database zabbix character set utf8"
cd zabbix-3.4.8
mysql -uroot -proot zabbix < database/mysql/schema.sql
mysql -uroot -proot zabbix < database/mysql/images.sql
mysql -uroot -proot zabbix < database/mysql/data.sql
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql=/usr/local/mysql/bin/mysql_config --enable-ipv6 --with-net-snmp --with-libcurl --with-openssl
make install
vim /etc/services
#添加下面的字段
zabbix-agent 10050/tcp #Zabbix Agent
zabbix-agent 10050/udp #Zabbix Agent
zabbix-trapper 10051/tcp #Zabbix Trapper
zabbix-trapper 10051/udp #Zabbix Trapper
#修改 zabbix server 配置文件
#注意:DBUser和DBPassword请自行根据实际情况填写数据库用户名及密码
vim /usr/local/zabbix/etc/zabbix_server.conf
DBUser=zabbix
DBPassword=zabbix
cp misc/init.d/fedora/core/zabbix_* /etc/init.d/
sed -i 's/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g' /etc/init.d/zabbix_server
sed -i 's/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g' /etc/init.d/zabbix_agentd
chmod +x /etc/init.d/zabbix_server
chmod +x /etc/init.d/zabbix_agentd
#添加mysql client库到系统默认库中:
vim /etc/ld.so.conf
#添加:
/usr/local/mysql/lib
#启动
/etc/init.d/zabbix_server start
mkdir /home/wwwroot/zabbix
cp -r -a frontends/php/* /home/wwwroot/zabbix |
groupadd zabbix
useradd -g zabbix -s /sbin/nologin zabbix
yum -y install net-snmp net-snmp-devel curl curl-devel perl-DBI net-snmp-utils
wget https://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.4.8/zabbix-3.4.8.tar.gz
tar -zxf zabbix-3.4.8.tar.gz
mysql -uroot -proot -e "create database zabbix character set utf8"
cd zabbix-3.4.8
mysql -uroot -proot zabbix < database/mysql/schema.sql
mysql -uroot -proot zabbix < database/mysql/images.sql
mysql -uroot -proot zabbix < database/mysql/data.sql
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql=/usr/local/mysql/bin/mysql_config --enable-ipv6 --with-net-snmp --with-libcurl --with-openssl
make install
vim /etc/services
#添加下面的字段
zabbix-agent 10050/tcp #Zabbix Agent
zabbix-agent 10050/udp #Zabbix Agent
zabbix-trapper 10051/tcp #Zabbix Trapper
zabbix-trapper 10051/udp #Zabbix Trapper
#修改 zabbix server 配置文件
#注意:DBUser和DBPassword请自行根据实际情况填写数据库用户名及密码
vim /usr/local/zabbix/etc/zabbix_server.conf
DBUser=zabbix
DBPassword=zabbix
cp misc/init.d/fedora/core/zabbix_* /etc/init.d/
sed -i 's/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g' /etc/init.d/zabbix_server
sed -i 's/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g' /etc/init.d/zabbix_agentd
chmod +x /etc/init.d/zabbix_server
chmod +x /etc/init.d/zabbix_agentd
#添加mysql client库到系统默认库中:
vim /etc/ld.so.conf
#添加:
/usr/local/mysql/lib
#启动
/etc/init.d/zabbix_server start
mkdir /home/wwwroot/zabbix
cp -r -a frontends/php/* /home/wwwroot/zabbix
配置fping
yum install epel-release.noarch
yum update
yum install fping
chown root:zabbix /usr/sbin/fping
chmod 710 /usr/sbin/fping
chmod ug+s /usr/sbin/fping
#修改/usr/local/zabbix/etc/zabbix_server.conf,删除FpingLocation=/usr/sbin/fping前的注释。 |
yum install epel-release.noarch
yum update
yum install fping
chown root:zabbix /usr/sbin/fping
chmod 710 /usr/sbin/fping
chmod ug+s /usr/sbin/fping
#修改/usr/local/zabbix/etc/zabbix_server.conf,删除FpingLocation=/usr/sbin/fping前的注释。
暂时没有评论!