CentOS7:安装Zabbix
1. 安装Zabbix Server
EPEL源里面有Zabbix的安装包,所以需要先安装EPEL。
Zabbix源也可以从这里获得:http://repo.zabbix.com/
$ yum install epel-release
安装Zabbix Server:
$ yum install zabbix22-server-mysql zabbix22-web-mysql
安装Zabbix Agent(可选):
$ yum install zabbix22-agent
2. 安装MySql Server
先安装MySQL源。从下面网址可以找到对应的MySQL源:
http://dev.mysql.com/downloads/repo/yum/
安装MySQL源:
yum install http://repo.mysql.com//mysql57-community-release-el7-9.noarch.rpm
安装MySQL Server:
$ yum install mysql-community-server
启动MySQL Server:
$ systemctl enable mysqld.service
$ systemctl start mysqld.service
3. 创建Zabbix数据库和用户
使用root用户登录mysql:
$ mysql -u root -p mysql
创建zabbix数据库:
mysql> create database zabbix character set utf8;
创建Zabbix用户并授权:
mysql> create user 'zabbix'@'localhost' identified by 'zabbix'; mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost'; mysql> flush privileges;
4. 导入zabbix template
使用zabbix用户登录zabbix数据库:
$ mysql -u zabbix -p zabbix
导入zabbix template:
mysql> source /usr/share/zabbix-mysql/schema.sql
mysql> source /usr/share/zabbix-mysql/images.sql
mysql> source /usr/share/zabbix-mysql/data.sql
5.修改Zabbix Server配置
编辑/etc/zabbix/zabbix_server.conf,修改数据库相关选项:
$ vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
DBPort=
6.修改Zabbix Agent配置
编辑/etc/zabbix/zabbix_agent.conf,修改Server选项:
$ vi /etc/zabbix/zabbix_agentd.conf
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=127.0.0.1
7.修改PHP配置
编辑/etc/php.ini:
$ vi /etc/php.ini
max_execution_time =
max_input_time =
memory_limit =
post_max_size = 32M
upload_max_filesize = 16M
date.timezone = Asia/Shanghai
8. 启动服务
修改Firewall,开放zabbix端口10050 and 10051:
$ firewall-cmd --permanent --add-port=/tcp
$ firewall-cmd --permanent --add-port=/tcp
$ systemctl restart firewalld.service
如果使用 SELinux, 运行以下命令使 Apache 可以和 Zabbix通信:
$ setsebool -P httpd_can_connect_zabbix=
启动相关服务:
$ systemctl enable zabbix-servermysql.service
$ systemctl enable zabbix-agent.service
$ systemctl enable mysqld.service
$ systemctl enable httpd.service $ systemctl start zabbix-server-mysql.service
$ systemctl start zabbix-agent.service
$ systemctl restart httpd.service
$ systemctl restart mysqld.service
9.通过控制台访问Zabbix Server
浏览器访问http://ip-address/zabbix:

按照提示进行安装。安装完成后,重定向到zabbix控制台登录页面. 输入用户名和密码,默认的用户名和密码为admin/zabbix.

A1. MySQL一些问题
MySQL初始root密码不对,不能登录。用下面方式重置密码:
$ systemctl stop mysqld.service $ mysqld-debug --user=mysql --skip-grant-tables --skip-networking & $ mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
如果没有Password列,就用authentication_string列
mysql> update user set authentication_string=password('root') where user='root' ;
mysql> flush privileges;
mysql> exit;
执行MySQL语句时,提示必须先执行ALTER USER重置密码:
ERROR (HY000): You must reset your password using ALTER USER statement before executing this statement.
按下面方式处理:
mysql> SET PASSWORD = PASSWORD('your new password');
mysql> ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
mysql> flush privileges;
MySQL5.6.6增加了密码强度验证插件validate_password。使用了该插件会检查设置的密码是否符合当前设置的强度规则,若不满足则拒绝设置。影响的语句和函数有:create user,grant,set password,password(),old password。可以禁用该插件:
# /etc/my.cnf,需要重启服务
validate_password=off
CentOS7:安装Zabbix的更多相关文章
- CentOS7安装Zabbix
一.Zabbix简介 Zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案. Zabbix能监视各种网络参数,保证服务器系统的安全运营:并提供灵活的通知机制以让系 ...
- centos7 安装zabbix
一.安装mysql 1.[root@iZ28gvqe4biZ ~]# rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.n ...
- centos7安装zabbix server5.0
安装zabbix源 1.rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarc ...
- Centos7 安装 Zabbix Server 4.0
官方参考URL:https://www.zabbix.com/documentation/4.0/start 1. 安装 Apache 2.4(略) 注意系统时间/时区ntp server是否定时同步 ...
- centos7安装ZABBIX 3.0+ 邮件报警【OK】
设置主机名: vi /etc/hosts 10.0.0.252 zabbix-server hostnamectl set-hostname 关闭防火墙: systemctl stop firew ...
- RHEL7/CentOS7 安装Zabbix
1.添加 Zabbix 软件仓库 rpm -ivh http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.n ...
- centos7安装zabbix server
1.参照下列网址方法,打开端口:80,3306,443,22,10050,10051(可能实际不需要打开这么多) https://www.cnblogs.com/lw-2019forlinuxpyth ...
- centos7安装zabbix客户端并监控
zabbxi-agent安装及配置 1.安装zabbxi-agent yum install zabbix-agent -y 2.配置zabbxi-agent grep -n '^'[a-Z] /et ...
- (二)centos7安装zabbix agentd端
关闭防火墙和selinux systemctl stop firewalld systemctl disable firewalld sed -ri '/^SELINUX=/cSELINUX=disa ...
- Centos7 安装 zabbix 4.0
参考文档: https://www.zabbix.com/download?zabbix=4.0&os_distribution=centos&os_version=7&db= ...
随机推荐
- MATLAB plot 绘图的一些经验,记下来,facilitate future work
[转载请注明出处]http://www.cnblogs.com/mashiqi 2016/03/28 % 调整figure的位置scrsz = get(0,'ScreenSize'); % 这个命令是 ...
- a标签不跳转
<a href="javascript://">父级菜单</a> 结果是这种写法在一些浏览器下不能到达预期效果(无跳转),我没有花时间把这种写法在主流浏览器 ...
- CloudStack中云主机的UTC时间转为本地时间
CloudStack项目中使用的时间是UTC时间,具体什么是UTC时间大家可以百度,但是我们需要的时间是正常的时间,所以在国泰君安开发测试云中,同步资源管理中虚拟机的同步管理,需要对虚拟机的时间格式化 ...
- word2vec
makegcc word2vec.c -o word2vec -lm -pthread -O3 -march=native -Wall -funroll-loops -Wno-unused-resul ...
- MyEclipse XFire Web Service
我们在做系统集成时,经常会需要调用webservice接口,本文将讲解在myeclipse中建立一个webservice项目,编写接口和实现类, 并且发布webservice,最后在myeclipse ...
- throw与throws的区别
throws语句 throws总是出现在一个函数头中,用来标明该成员函数可能抛出的各种异常.对大多数Exception子类来说,Java 编译器会强迫你声明在一个成员函数中抛出的异常的 ...
- Hot code replace failed
今天在eclipses中 修改代码,保存时会出时不时出现Hot code replace failed 对话框,谷歌提示是在debug模式下保存修改源代码会出现此类问题.确实,刚刚在用debug功能, ...
- node.js Stream Buffer FsPromise
Stream: 类似这样:a.pipe(b).pipe(c); 我想写一个b.所以: var rs=new (require('stream').Readable)(); var ws=new (re ...
- Spark RDD
对RDD的学习进行一下整理 RDD:基于内存的集群计算容错抽象 分布式内存抽象的概念---弹性分布式数据集(RDD),它具备MapReduce等数据流模型的容错特性,并且允许开发人员在大型集群上执行基 ...
- Lua 自定义函数string.split
function string.split(str, delimiter) if str==nil or str=='' or delimiter==nil then return ...