RedHat 7.1 下安装 Zabbix监控程序详解(适合linux初级用户)
RedHat 7.1 安装 Zabbix 监控程序详解(适合对linux初级用户)2017-05-02
安装步骤:
1.zabbix需要安装LAMP架构
2.安装zabbix服务
3.初始化zabbix系统
1.安装环境:VMware虚拟
|
1
2
3
4
|
[root@localhost ~]# cat /etc/redhat-releaseRed Hat Enterprise Linux Server release 7.1 (Maipo)[root@localhost ~]# uname -aLinux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Thu Jan 29 18:37:38 EST 2015 x86_64 x86_64 x86_64 GNU/Linux |
=================================好吧,下面开始安装LAMP架构============================
1.为了方便获取安装应用,首先配置YUM服务,RedHat 默认YUM已安装,下面我们直接配置YUM本地源和网络源即可。
[root@localhost ~]# mount /dev/cdrom /mnt/cdrom
mount: /dev/sr0 is write-protected, mounting read-only
2.查看yum是否安装;(以下标示已安装)
[root@localhost ~]# rpm -qa |grep yum*
yum-metadata-parser-1.1.4-10.el7.x86_64
yum-3.4.3-125.el7.noarch
yum-rhn-plugin-2.0.1-5.el7.noarch
keyutils-libs-1.5.8-3.el7.x86_64
python-pyudev-0.15-6.el7.noarch
3.配置yum本地源和网络源;
[root@localhost yum.repos.d]# mkdir repobak 新建一个备份文件夹
[root@localhost yum.repos.d]#mv * repobak 讲yum.repos.d 文件夹内文件备份到repobak内
[root@localhost yum.repos.d]#vi zabbix.repo 新建一个zabbix.repo YUM源文件,添加如下:
==============zabbix.repo文件=======================
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://repo.zabbix.com/zabbix/3.2/rhel/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=http://repo.zabbix.com/non-supported/rhel/7/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1
[waiwang]
name=waiwang
baseurl=http://mirrors.163.com/centos/7/os/x86_64/
enabled=1
gpgcheck=0
[extras]
name=extras
baseurl=http://mirrors.163.com/centos/7/extras/x86_64/
enabled=1
gpgcheck=0
=================END===========================
4.清除YUM缓存文件
[root@localhost ~]# yum clean all
Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning repos: extras waiwang zabbix zabbix-non-supported
Cleaning up everything
5.创建YUM缓存文件
[root@localhost ~]# yum makecache
Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
extras | 3.4 kB 00:00
waiwang | 3.6 kB 00:00
zabbix | 951 B 00:00
zabbix-non-supported | 951 B 00:00
(1/8): extras/prestodelta | 99 kB 00:00
(2/8): extras/primary_db | 151 kB 00:00
(3/8): waiwang/group_gz | 155 kB 00:00
(4/8): extras/other_db | 640 kB 00:01
(5/8): extras/filelists_db | 770 kB 00:02
(6/8): waiwang/filelists_db | 6.6 MB 00:02
(7/8): waiwang/other_db | 2.4 MB 00:00
(8/8): waiwang/primary_db | 5.6 MB 00:03
(1/6): zabbix/x86_64/primary | 13 kB 00:00
(2/6): zabbix/x86_64/filelists | 43 kB 00:00
(3/6): zabbix/x86_64/other | 7.7 kB 00:00
(4/6): zabbix-non-supported/x86_64/filelists | 660 B 00:00
(5/6): zabbix-non-supported/x86_64/primary | 1.6 kB 00:00
(6/6): zabbix-non-supported/x86_64/other | 1.5 kB 00:00
zabbix 92/92
zabbix 92/92
zabbix 92/92
zabbix-non-supported 4/4
zabbix-non-supported 4/4
zabbix-non-supported 4/4
Metadata Cache Created
6.[root@localhost ~]# yum list 可以查看YUM获取到的文件列表
7.关闭firewall:(vi/etc/selinux/)
[root@localhost ~]#systemctl stop firewalld.service #停止firewall
[root@localhost ~]#systemctl disable firewalld.service #禁止firewall开机启动
[root@localhost ~]# vi /etc/selinux/config 将selinux=enforcing 改为 selinux=disabled 即可。
[root@localhost ~]# sestatus 查看selinux状态
=======================================截止YUM环境已经准备完毕=======================
一.开始安装LAMP架构
1.安装Apache
[root@localhost ~]#yum install httpd #根据提示,输入Y安装即可成功安装
[root@localhost ~]#systemctl start httpd.service #启动apache
[root@localhost ~]#systemctl stop httpd.service #停止apache
[root@localhost ~]#systemctl restart httpd.service #重启apache
[root@localhost ~]#systemctl enable httpd.service #设置apache开机启动
2.安装MariaDB
RHEL 7.0中,已经使用MariaDB替代了MySQL数据库
2.1安装MariaDB
[root@localhost ~]#yum install mariadb mariadb-server #询问是否要安装,输入Y即可自动安装,直到安装完成
[root@localhost ~]#systemctl start mariadb.service #启动MariaDB
[root@localhost ~]#systemctl stop mariadb.service #停止MariaDB
[root@localhost ~]#systemctl restart mariadb.service #重启MariaDB
[root@localhost ~]#systemctl enable mariadb.service #设置开机启动
3.安装PHP
[root@localhost ~]#yum install php #根据提示输入Y直到安装完成
4.安装PHP组件,使PHP支持 MariaDB
[root@localhost ~]#yum install php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mhash
#这里选择以上安装包进行安装,根据提示输入Y回车
[root@localhost ~]#systemctl restart mariadb.service #重启MariaDB
[root@localhost ~]#systemctl restart httpd.service #重启apache
5.重新启动服务
[root@localhost ~]#systemctl restart mariadb.service #重启MariaDB
[root@localhost ~]#systemctl restart httpd.service #重启apache
6.登录http://localhost 测试httpd服务是否正常。
=========================LAMP架构已经搭建完毕==========================================
二.zabbix服务的安装和配置
/etc/logrotate.d/zabbix-server
/etc/zabbix/zabbix_server.conf
/usr/lib/systemd/system/zabbix-server.service
/usr/lib/tmpfiles.d/zabbix-server.conf
/usr/lib/zabbix/alertscripts
/usr/lib/zabbix/externalscripts
/usr/sbin/zabbix_server_mysql
/usr/share/doc/zabbix-server-mysql-3.2.5
/usr/share/doc/zabbix-server-mysql-3.2.5/AUTHORS
/usr/share/doc/zabbix-server-mysql-3.2.5/COPYING
/usr/share/doc/zabbix-server-mysql-3.2.5/ChangeLog
/usr/share/doc/zabbix-server-mysql-3.2.5/NEWS
/usr/share/doc/zabbix-server-mysql-3.2.5/README
/usr/share/doc/zabbix-server-mysql-3.2.5/create.sql.gz
/usr/share/man/man8/zabbix_server.8.gz
/var/log/zabbix
/var/run/zabbix
4..导入zabbix初始模式和数据
MariaDB [zabbix]>use zabbix;
Database changed
MariaDB [zabbix]> show tables;
+----------------------------+
| Tables_in_zabbix |
+----------------------------+
| acknowledges |
| actions |
| alerts |
| application_discovery |
| application_prototype |
| application_template |
| applications |
| auditlog |
5.配置zabbix配置文件,修改数据库密码为zabbix
RedHat 7.1 下安装 Zabbix监控程序详解(适合linux初级用户)的更多相关文章
- 在RedHat 5下安装Oracle 10g详解(转)
在RedHat 5下安装Oracle 10g详解(转) Posted on 2012-09-14 13:26 疯狂 阅读(5075) 评论(0) 编辑 收藏 所属分类: database .uni ...
- Mac下安装HBase及详解
Mac下安装HBase及详解 1. 千篇一律的HBase简介 HBase是Hadoop的数据库, 而Hive数据库的管理工具, HBase具有分布式, 可扩展及面向列存储的特点(基于谷歌BigTabl ...
- (转)windows 下安装配置 Nginx 详解
windows 下安装配置 Nginx 详解 本文转自https://blog.csdn.net/kingscoming/article/details/79042874 nginx功能之一可以启动一 ...
- Ubuntu下安装JDK图文详解
很详细的在Ubuntu中安装JDK图文详解教程,我们选择的是jdk1.6.0_30版本.安装文件名为jdk-6u30-linux-i586.bin. 1.复制jdk到安装目录 (1)假设jdk安装文件 ...
- Linux下安装软件命令详解
---------------------------------------------------------------- 或许你对于linux还不够了解,但是一旦你步入公司后,你就会发现lin ...
- windows下安装Mysql—图文详解
mysql安装过程及注意事项: 1.1. 下载: 我下载的是64位系统的zip包: 下载地址:https://dev.mysql.com/downloads/mysql/ 下载zip的包: 下载后解压 ...
- windows下安装Mysql(图文详解)
博客园 | 首页 | 新随笔 | 联系 | 订阅 | 管理 mysql安装过程及注意事项: 1.1. 下载: 我下载的是64位系统的zip包: 下载地址:https://dev.mysql.com ...
- 【Node.js】Mac 下安装node图文详解
1 进入官网,下载node最新版 官网:https://nodejs.org/en/ 2 双击下载的安装包,一路默认安装就行 3 打开终端,输入以下命令查看结果,如出现下图信息则为安装成功 4 ...
- Windows下安装solr步骤详解
Solr是一个独立的企业级搜索应用服务器,它对外提供类似于Web-service的API接口.用户可以通过http请求,向搜索引擎服务器提交一定格式的XML文件,生成索引:也可以通过Http Get操 ...
随机推荐
- python 接口自动化测试(三)
1.WriteIni.py import ConfigParser cf = ConfigParser.ConfigParser() cf.add_section("PC_WSDL" ...
- Maven使用说明
maven的作用. Maven 是一个项目管理和构建自动化工具.可以方便我们导入jar包. maven的安装. 要想安装maven,首先你需要安装jdk,并且配置jdk环境变量.右键点击计算机,选择属 ...
- android:layout_gravity和android:gravity属性的区别1
一.介绍: gravity的中文意思就是"重心",就是表示view横向和纵向的停靠位置 (1).android:gravity:是对view控件本身来说的,是用来设置view本身的 ...
- js 的DOM操作 2017-03-21
DOM(document object model) 文档对象模型 BOM(browse object model) 针对浏览器(如:弹出的窗口,滚动条等) 一.操作对象(注意大小写:注意elemen ...
- 《用Python做HTTP接口测试》学习感悟
机缘巧合之下,报名参加了阿奎老师发布在"好班长"的课程<用Python做HTTP接口测试>,报名费:15rmb,不到一杯咖啡钱,目前为止的状态:坚定不移的跟下去,自学+ ...
- TensorFlow anaconda命令备忘
[查看tensorflow安装的版本] anaconda search -t conda tensorflow [选择版本安装] conda install -c anaconda tensorflo ...
- MySQL自动化审核平台部署说明
背景: 关于MySQL的审核的重要性就不说明了,本文的自动化审核是通过Inception和SQLAdvisor实现的,具体的使用可以看它们各自的说明文档.这里大致介绍下如何部署和使用它们,其实该文章也 ...
- Tcl与Design Compiler (九)——综合后的形式验证
本文属于原创手打(有参考文献),如果有错,欢迎留言更正:此外,转载请标明出处 http://www.cnblogs.com/IClearner/ ,作者:IC_learner 这里来讲一下forma ...
- API的文档自动生成——基于CDIF的SOA基本能力
当前,作为大部分移动app和云服务后台之间的标准连接方式,REST API已经得到了绝大部分开发者的认可和广泛的应用.近年来,在新兴API经济模式逐渐兴起,许多厂商纷纷将自己的后台业务能力作为REST ...
- POJ1185炮兵阵地【动态规划】
炮兵阵地 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 26892 Accepted: 10396 Descriptio ...