Centos 6.x 搭建 Zabbix Server
[root@localhost ~]# uname -a
Linux localhost 2.6.32-642.6.2.el6.x86_64
2、安装源码
[root@localhost ~]# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
Retrieving http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
warning: /var/tmp/rpm-tmp.abr6zK: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEY
Preparing... ########################################### [100%]
1:zabbix-release ########################################### [100%]
3、安装组件
[root@localhost ~]# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent mysql-server mysql -y
Loaded plugins: fastestmirror
Setting up Install Process
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository epel is listed more than once in the configuration
Determining fastest mirrors
* base: mirrors.cloud.aliyuncs.com
……………………………………………………………………………….
Installed:
mysql.x86_64 0:5.1.73-8.el6_8 mysql-server.x86_64 0:5.1.73-8.el6_8 zabbix-agent.x86_64 0:2.4.8-1.el6 zabbix-server-mysql.x86_64 0:2.4.8-1.el6 zabbix-web-mysql.noarch 0:2.4.8-1.el6 Dependency Installed:
OpenIPMI-libs.x86_64 0:2.0.16-14.el6 apr.x86_64 0:1.3.9-5.el6_2 apr-util.x86_64 0:1.3.9-3.el6_0.1 apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 dejavu-fonts-common.noarch 0:2.33-1.el6 dejavu-sans-fonts.noarch 0:2.33-1.el6
fontpackages-filesystem.noarch 0:1.41-1.1.el6 fping.x86_64 0:2.4b2-16.el6 freetype.x86_64 0:2.3.11-17.el6 gnutls.x86_64 0:2.12.23-21.el6 httpd.x86_64 0:2.2.15-60.el6.centos.6 httpd-tools.x86_64 0:2.2.15-60.el6.centos.6
iksemel.x86_64 0:1.4-2.el6 libX11.x86_64 0:1.6.4-3.el6 libX11-common.noarch 0:1.6.4-3.el6 libXau.x86_64 0:1.0.6-4.el6 libXpm.x86_64 0:3.5.10-2.el6 libjpeg-turbo.x86_64 0:1.2.1-3.el6_5
libpng.x86_64 2:1.2.49-2.el6_7 libtool-ltdl.x86_64 0:2.2.6-15.5.el6 libxcb.x86_64 0:1.12-4.el6 libxslt.x86_64 0:1.1.26-2.el6_3.1 lm_sensors-libs.x86_64 0:3.1.1-17.el6 mailcap.noarch 0:2.1.31-2.el6
net-snmp.x86_64 1:5.5-60.el6 net-snmp-libs.x86_64 1:5.5-60.el6 perl-DBD-MySQL.x86_64 0:4.013-3.el6 perl-DBI.x86_64 0:1.609-4.el6 php.x86_64 0:5.3.3-49.el6 php-bcmath.x86_64 0:5.3.3-49.el6
php-cli.x86_64 0:5.3.3-49.el6 php-common.x86_64 0:5.3.3-49.el6 php-gd.x86_64 0:5.3.3-49.el6 php-mbstring.x86_64 0:5.3.3-49.el6 php-mysql.x86_64 0:5.3.3-49.el6 php-pdo.x86_64 0:5.3.3-49.el6
php-xml.x86_64 0:5.3.3-49.el6 unixODBC.x86_64 0:2.2.14-14.el6 zabbix.x86_64 0:2.4.8-1.el6 zabbix-server.x86_64 0:2.4.8-1.el6 zabbix-web.noarch 0:2.4.8-1.el6 Dependency Updated:
mysql-libs.x86_64 0:5.1.73-8.el6_8 Complete!
4、启动Mysql服务
[root@localhost ~]# service mysqld start
Initializing MySQL database: WARNING: The host 'localhost' could not be looked up with resolveip.
.................................................
Please report any problems with the /usr/bin/mysqlbug script! [ OK ]
Starting mysqld: [ OK ]
5、Mysql设置
[root@localhost ~]# chkconfig mysqld on
[root@localhost ~]# mysql_secure_installation
#根据提示进行操作
主要内容如下
Set root password? [Y/n] //设置root密码(最好自己设置密码,选Y)
anonymous users? [Y/n] //删除匿名用户(选Y)
Disallow root login remotely? [Y/n] //禁止root用户远程登录(选n)
Remove test database and access to it? [Y/n] //删除默认的 test 数据库(选Y)
Reload privilege tables now? [Y/n] //是否马上应用最新的设置(选Y)
6、Zabbix数据库设置
[root@localhost /]# mysql -u root -p
Enter password: #输入刚刚设置的密码
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1143
Server version: 5.1.73 Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database zabbix character set utf8;
Query OK, 1 row affected (0.00 sec) mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
Query OK, 0 rows affected (0.00 sec) mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec) mysql> exit
Bye
7、导入数据库
[root@localhost /]# cd /usr/share/doc/zabbix-server-mysql-2.4.8/create/
[root@localhost create]# ls
data.sql images.sql schema.sql
[root@localhost create]# mysql -u root -p zabbix < schema.sql
Enter password: #输入数据库root密码
[root@localhost create]# mysql -u root -p zabbix < images.sql
Enter password: #输入数据库root密码
[root@localhost create]# mysql -u root -p zabbix < data.sql
Enter password: #输入数据库root密码 #如果出错,注意导入顺序
8、修改Zabbix配置文件
[root@localhost /]# vim /etc/zabbix/zabbix_server.conf
#注意一下配置文件中是否和以下内容相似,如不相似请参照如下进行修改
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
9、PHP配置文件修改
[root@localhost ~]# cp /etc/php.ini /etc/php.ini.bak
[root@localhost ~]# sed -i 's/^.*date.timezone =.*$/date.timezone = Asia\/Shanghai/g' /etc/php.ini
[root@localhost ~]# sed -i 's/^.*post_max_size =.*$/post_max_size = 16M/g' /etc/php.ini
[root@localhost ~]# sed -i 's/^.*max_execution_time =.*$/max_execution_time = 300/g' /etc/php.ini
[root@localhost ~]# sed -i 's/^.*max_input_time =.*$/max_input_time = 300/g' /etc/php.ini
10、启动服务
[root@localhost ~]# service zabbix-server start
Starting Zabbix server: [ OK ]
[root@localhost ~]# service zabbix-agent start
Starting Zabbix agent: [ OK ]
[root@localhost ~]# service httpd restart
Stopping httpd: [ OK ]
11、添加开机启动
[root@localhost ~]# chkconfig mysqld on
[root@localhost ~]# chkconfig zabbix-server on
[root@localhost ~]# chkconfig zabbix-agent on
[root@localhost ~]# chkconfig httpd on
12、访问zabbix http://192.168.126.129/zabbix
Next-下一步
Next-下一步
注意User、Password,输入完成之后点击 Test connection看状态是否Ok,Next-下一步
Name名字可以写成:zabbix129(后跟IP地址的尾部),没有限制,Next-下一步
登录zabbix(Admin/zabbix 注意Admin第一个字母大写)
登陆成功,搭建完成!
如需配置Zabbix-Agent客户端,可以参考:Zabbix-Agent客户端配置
官方推荐安装:点我直达
Centos 6.x 搭建 Zabbix Server的更多相关文章
- Centos 6.x 搭建 Zabbix Agent 客户端
如需搭建zabbix server端,请参考:Zabbix-Server配置 环境: Zabbix-Server: Centos 6.8 IP:192.168.126.129 #Zabix- ...
- CentOS 6.5 搭建 Zabbix
CentOS 6.5 搭建 Zabbix 说明: 操作系统:CentOS 6.5 IP地址:192.168.21.127 Web环境:Nginx+MySQL+PHP zabbix版本:Zabbix 2 ...
- CentOS 6.6 搭建Zabbix 3.0.3 过程
分享CentOS 6.6下搭建Zabbix 3.0.3 的过程,希望都大家有所帮助. 环境安装 系统环境: # cat /etc/RedHat-release CentOS release 6.6 ( ...
- CentOS 6.4搭建zabbix
系统环境:CentOS 6.4 64bit Zabbix版本:zabbix 2.2.3 前提条件:已安装好LNMP环境 一.服务端: 1. 下载zabbix安装包zabbix-2.2.3.tar.g ...
- 【Zabbix】在CentOS 7上搭建Zabbix服务,收集Windows客户端计数器性能数据(含过程中遇到的问题解决方法)
1.环境 1.1.关闭防火墙 命令:systemctl stop firewalld 或者 systemctl stop firewalld.service (备注:相应的,若要开启防火墙,将对应的& ...
- linux搭建zabbix server
一.linux配置jdk 1.安装rpm包,安装完成位置:/usr/java/jdk1.8.0_152 2.配置环境变量/etc/profile: JAVA_HOME=/usr/java/jdk1.. ...
- 如何搭建zabbix server端
1.背景介绍: nginx:1.9.3 安装路径/data/nginxphp:5.5.27 安装路径 /data/phpmysql:5.6.28 安装路径/usr/local/mysqlzabbix ...
- 企业级监控软件zabbix搭建部署之zabbix server的安装
企业级监控软件zabbix搭建部署之zabbix server的安装 zabbix线上已经应用半年多了,关于zabbix在生产环境中的使用心得,以及一些经验写下来,希望让大家少走弯路,共同学习! 环境 ...
- Centos 7.6搭建LAMP,部署zabbix监控环境
一.安装环境 LAMP 1.安装apache yum install -y httpd httpd服务开机进行自启:systemctl enable httpd 启动httpd服务:systemctl ...
随机推荐
- 使用dataguard将单实例数据库转换为rac数据库
我们常常将oracle rac数据库通过dataguard容灾到一个单实例数据库中.当生产库出现问题后能够将生产库切换到dgserver上.而当生产库rac修复完毕后.我们相同能够通过dg将数据回切到 ...
- 高仿美团iOS版,版本5.7
高仿美团iOS版,版本:5.7 iOS技术交流群:112365317 github链接:https://github.com/lookingstars/meituan 假设你认为不错.欢迎star 哦 ...
- 【php】读取"文件列表"按时间倒序显示,并递归显示各层文件夹、!
思路: 1.读取该php所在文件夹的文件列表,用"改动时间.文件名称"做键值对,塞入数组.对"改动时间"倒序.(貌似不能直接按时间倒序读取文件列表,此处为间接方 ...
- http权威指南(一)-Http概述
Http概述 在Web中,不管是浏览器还是server都是通过Http相互通信的.那么Http是怎样工作的呢? 首先,client向server发送Http请求,server会在Http响应中回送所请 ...
- __sizeof__()
https://bugs.python.org/issue2898 https://bugs.python.org/file10353/footprint.patch Index: Python/sy ...
- php composer 相关及版本约束等小技巧
对于现代语言而言,包管理器基本上是标配.Java有Maven,Python有pip,Ruby有gem,Nodejs有npm.PHP的则是PEAR,不过PEAR坑不少: 依赖处理容易出问题 配置非常复杂 ...
- Hive两种访问方式:HiveServer2 和 Hive Client
老版HiveClient: 要求比较多,需要Hive和Hadoop的jar包,各配置环境. HiveServer2: 使得与YARN和HDFS的连接从Client中独立出来, ...
- 缓存框架Ehcache相关
单点缓存框架 只能针对单个jvm中,缓存容器存放jvm中,每个缓存互不影响 Ehcache gauva chache 内置缓存框架 jvm缓存框架 分布式缓存框架(共享缓存数据) Redis ...
- codeforces 440C. One-Based Arithmetic 解题报告
题目链接:http://codeforces.com/problemset/problem/440/C 题目意思:给出一个数你,问需要用到的1来组成这个数的最少数量是多少. 我一开始对每个数只从 “+ ...
- [Selenium] 使用Firefox Driver 示例
//导入Selenium 库和FirefoxDriver 库 package com.learningselenium.simplewebdriver; import org.openqa.selen ...