分类:linux日期:2018-04-10 - 10:45:17评论:0条作者:老谢
请优先参考: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前的注释。
最新评论
老何:不至于跌得这么狠吧
Andy烧麦:这些大厂都能提供必要的售后
王光卫博客:小米生态还是比较丰富
空空裤兜:在天猫买的利维斯顿,阿里智能APP...
林羽凡:我突然发现,你也记录了很多博文了。
菊座:小米的东西还行
zwwooooo:一般电器产品都jd,就是想售后身心
zwwooooo:能随便搞个公司玩玩也算是实力选手
大D:坚持就是胜利哈哈哈
老麦:看着那一排日志存档,老前辈了啊。