设置zabbix

亚洲城ca88手机版官网
以防安装报错 安装插件
yum install -y autoconf  automake imake cmake gcc gcc-c++ libaio libaio-devel bzr bison expat-devel libtool ncurses5-devel gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel

yum install pcre*
yum install openssl*

亚洲城ca88手机版官网,安装zabbix,

以防安装报错 安装插件
yum install -y autoconf  automake imake cmake gcc gcc-c++ libaio libaio-devel bzr bison expat-devel libtool ncurses5-devel gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel

yum install pcre*
yum install openssl*

安装Zabbix

  • 下载安装zabbix的YUM源

rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

 

  • 安装Zabbix

yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-get
  • 安装之后进入MySQL数据库,创建Zabbix数据库(密码有复杂要求)

create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to 'zabbix'@'%' identified by 'zabbixpass';
flush privileges;
  • 导入Zabbix到数据库

cd /usr/share/doc/zabbix-server-mysql-3.0.1/
zcat create.sql.gz |mysql -uroot -ppass zabbix
  • 配置zabbix用户

groupadd zabbix
useradd -g zabbix -s /bin/false zabbix
  • 配置Zabbix服务器端

vim /etc/zabbix/zabbix_server.conf

DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbixpass
  • 拷贝zabbix文件到html目录

cd /usr/share/
cp -r zabbix /usr/local/nginx/html
chown -R zabbix:zabbix /etc/zabbix
chown -R zabbix:zabbix /usr/share/zabbix
chown -R zabbix:zabbix /usr/lib/zabbix
  • Zabbix加入开机启动并启动

systemctl enable zabbix-server
systemctl start zabbix-server
  • 在浏览器中测试Zabbix

    亚洲城ca88手机版官网 1

错误现象

  • 在网页打开zabbix时报错

Warning: require_once(/etc/zabbix/web/maintenance.inc.php): failed to open stream: Permission denied in /usr/local/nginx/html/zabbix/include/classes/core/ZBase.php on line 269

Fatal error: require_once(): Failed opening required '/etc/zabbix/web/maintenance.inc.php' (include_path='.:/usr/local/php/lib/php') in /usr/local/nginx/html/zabbix/include/classes/core/ZBase.php on line 269

 

  • 解决办法

chmod -R 755 /etc/zabbix/web/

 

错误现象

  • 网页访问失败

  • 解决办法

 关闭防火墙
 systemctl disable firewalld
 systemctl stop firewalld

有问题欢迎留言指出!

以防安装报错 安装插件 yum install -y
autoconf automake imake cmake gcc gcc -c ++ libaio libaio -devel bzr
bison expat -devel libtool ncurses5 -devel gd -d…

安装Zabbix

  • 下载安装zabbix的YUM源

rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

 

  • 安装Zabbix

yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-get
  • 安装之后进入MySQL数据库,创建Zabbix数据库(密码有复杂要求)

create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to 'zabbix'@'%' identified by 'zabbixpass';
flush privileges;
  • 导入Zabbix到数据库

cd /usr/share/doc/zabbix-server-mysql-3.0.1/
zcat create.sql.gz |mysql -uroot -ppass zabbix
  • 配置zabbix用户

groupadd zabbix
useradd -g zabbix -s /bin/false zabbix
  • 配置Zabbix服务器端

vim /etc/zabbix/zabbix_server.conf

DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbixpass
  • 拷贝zabbix文件到html目录

cd /usr/share/
cp -r zabbix /usr/local/nginx/html
chown -R zabbix:zabbix /etc/zabbix
chown -R zabbix:zabbix /usr/share/zabbix
chown -R zabbix:zabbix /usr/lib/zabbix
  • Zabbix加入开机启动并启动

systemctl enable zabbix-server
systemctl start zabbix-server
  • 在浏览器中测试Zabbix

    亚洲城ca88手机版官网 1

错误现象

  • 在网页打开zabbix时报错

Warning: require_once(/etc/zabbix/web/maintenance.inc.php): failed to open stream: Permission denied in /usr/local/nginx/html/zabbix/include/classes/core/ZBase.php on line 269

Fatal error: require_once(): Failed opening required '/etc/zabbix/web/maintenance.inc.php' (include_path='.:/usr/local/php/lib/php') in /usr/local/nginx/html/zabbix/include/classes/core/ZBase.php on line 269

 

  • 解决办法

chmod -R 755 /etc/zabbix/web/

 

错误现象

  • 网页访问失败

  • 解决办法

 关闭防火墙
 systemctl disable firewalld
 systemctl stop firewalld

有问题欢迎留言指出!

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图