基于centos 7安装的zabbix3.0版本

前端之家收集整理的这篇文章主要介绍了基于centos 7安装的zabbix3.0版本前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
安装CENTOS7并完成用户名密码的设置建立 执行管理员权限常态: sudo su userpassword: 一、关闭防火墙 systemctl stop firewalld.service 禁止firewall开机启动 systemctl disable firewalld.service 二、关闭SELINUX vi /etc/selinux/config #SELINUX=enforcing #注释掉 #SELINUXTYPE=targeted #注释掉 SELINUX=disabled #增加 :wq! 保存退出 setenforce 0 使配置立即生效 三、更新yum yum install net-tools yum install wget wget -q -O - http://www.atomicorp.com/installers/atomic | sh 安装Apache(httpd) yum install httpd -y systemctl start httpd.service systemctl stop httpd.service systemctl restart httpd.service systemctl enable httpd.service 安装MysqL wget http://dev.MysqL.com/get/MysqL-community-release-el7-5.noarch.rpm rpm -ivh MysqL-community-release-el7-5.noarch.rpm yum install MysqL-community-server service MysqLd restart 设置密码的方法MysqL -uroot #进入数据库 MysqL> set password for root@localhost= password('zabbix'); 添加zabbix grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; create database zabbix; use zabbix; exit 安装PHP yum install PHP -y 安装PHP组件,使PHP支持 MysqL yum install PHP-MysqL PHP-gdlibjpeg* PHP-ldap PHP-odbc PHP-pear PHP-xml PHP-xmlrpc PHP-mbstring PHP-bcmath PHP-mhash -y systemctl restart MysqL.service 重启MysqL systemctl restart httpd.service 重启Apache Apache配置 vi /etc/httpd/conf/httpd.conf #AddHandlercgi-script .cgi #修改为:AddHandlercgi-script .cgi .pl (允许扩展名为.pl的CGI脚本运行) #Options Indexes FollowSymLinks #修改为 Options FollowSymLinks(不在浏览器上显 示树状目录结构) DirectoryIndex index.html #修改为:DirectoryIndex index.html index.htm Default.html Default.htm index.PHP(设置默认首页文件增加index.PHP) :wq! #保存退出 systemctl restart httpd.service #重启apache rm -f /etc/httpd/conf.d/welcome.conf /var/www/error/noindex.html #删除默认测试页 PHP配置 vi /var/www/html/index.PHP 输入: <?PHP PHPinfo(); ?> :wq! #保存退出 源安装: rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm zabbix数据库组件安装: yum install zabbix-server-MysqL zabbix-web-MysqL -y zabbix组件安装: yum install zabbix-agent 向数据库中导入表 cd /usr/share/doc/zabbix-server-MysqL-3.0.2 zcat create.sql.gz | MysqL -uroot -pzabbix zabbix 修改配置文件 # vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix 启动zabbix systemctl start zabbix-server systemctl start zabbix-agent 修改时区时间 vi etc/httpd/conf.d/zabbix.conf # p hp_value date.timezone Europe/Riga修改PHP_value date.timezone Asia/Shanghai :wq! 修改中文语言 vi /usr/share/zabbix/include/locales.inc.PHP 'zh_CN' => ['name' => _('Chinese (zh_CN)'),'display' => false] 修改fales为true 导入其他中文字体 从windows下控制面板->字体->选择一种中文字库例如“楷体” 把字体放到Zabbix的网站的fonts目录下,如:/usr/share/zabbix/fonts/ 修改配置:vi /usr/share/zabbix/include/defines.inc.PHP 修改FONT_NAME GRAPH_FONT_NAME 重新刷新Zabbix图形就可以正常显示中文字体 启动阿帕奇 systemctl start httpd 设置自启动 启动zabbix服务 service start zabbix_agent service start zabbix_server systemctl enable zabbix-agent #设置开机启动 systemctl enable zabbix-server #设置开机启动 在浏览器输入:http://ip/zabbix Zabbix 3.0 设置邮件报警 原文链接:https://www.f2er.com/centos/380212.html

猜你在找的CentOS相关文章