Zabbix监察和控制程序详解

[zabbix]
name=Zabbix Official Repository – $basearch                            
    #可引用变量$basearh为系统平台项目(x86_64&i386)
baseurl=        
 #互联网源地址 (镜像站)
enabled=1                                                              
                #启用为1 禁用为0
gpgcheck=1                                                              
              #校验为1 明确命令禁止校验为0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591      #
那么些遵照系统版本自动生成,可粗略。

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 

=================================好吧,上面发轫安装LAMP架构============================

图片 1

2.查看yum是或不是安装;(以下标示已安装)

 

[zabbix-non-supported]
name=Zabbix Official Repository non-supported – $basearch
baseurl=
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX                   #
那一个依据系统版本自动生成,可回顾。
gpgcheck=1
[waiwang]
name=waiwang
baseurl=
enabled=1
gpgcheck=0
[extras]
name=extras
baseurl=
enabled=1
gpgcheck=0

[root@localhost ~]#systemctl stop firewalld.service                  
    #停止firewall

[root@localhost ~]# mount /dev/cdrom /mnt/cdrom
 mount: /dev/sr0 is write-protected, mounting read-only 

 

RedHat 7.1 安装 Zabbix 监察和控制程序详解(切合对linux初级顾客)2017-05-02

#systemctl enable httpd

[root@localhost ~]#systemctl disable firewalld.service              
    #禁绝firewall开机运行

 

 

[root@localhost ~]#yum install zabbix-server-mysql zabbix-web-mysql
zabbix-get zabbix-agent 安装zabbix,提醒点”y”就可以到位安装。

#systemctl start httpd

EnclaveHEL 7.0中,已经应用MariaDB代替了MySQL数据库

=================================zabbix.repo文件===================================

[root@localhost ~]#systemctl restart mariadb.service                
                       #重启MariaDB

内需做软连接/var/run > /run

 

[root@localhost yum.repos.d]#vi zabbix.repo     #新建二个zabbix.repo
YUM源文件,增添如下:

2.1安装MariaDB

[root@localhost ~]#yum install php-mysql php-gd libjpeg*  php-ldap
php-odbc php-pear php-xml php-xmlrpc php-mhash  

/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

5.双重起动服务

DBPassword=zabbix

[root@localhost ~]#vi /etc/zabbix/zabbix_server.conf

3.初始化zabbix系统

[root@localhost ~]#systemctl start httpd.service                    
     #启动apache

二.zabbix服务的安装和安排

Database changed
MariaDB [zabbix]> show tables;
+—————————-+
| Tables_in_zabbix |
+—————————-+
| acknowledges |
| actions |
| alerts |
| application_discovery |
| application_prototype |
| application_template |
| applications |
| auditlog |

 

[root@localhost ~]#rpm -ivh

[root@localhost ~]# sestatus                                        
              #查看selinux状态

#systemctl start zabbix-agent

8.起始http,并安装开机自启

 

3.安装PHP

 

7.关闭firewall:(vi/etc/selinux/)

 

4.安装PHP组件,使PHP支持 MariaDB

1
2
3
4
[root@localhost ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.1 (Maipo)
[root@localhost ~]# uname -a
Linux 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

5.配备zabbix配置文件,修改数据库密码为zabbix

10施用IE登入zabbix图形分界面实行安装。

②如果报pid错误

1.安装Apache

[root@localhost ~]#systemctl restart mariadb.service                
 #重启MariaDB

3.初始化mariadb数据库

6.[root@localhost ~]# yum  list  能够查看YUM获取到的文件列表

9.开端zabbix-agent,并安装开机自启

3.配置yum本地源和互联网源;

======================================END====================================

[root@localhost ~]#mysql -u root 

#ln -s /var/run /run

1设置存款和储蓄库配置文件

[root@localhost ~]#systemctl restart mariadb.service                
                      #重启MariaDB

5.创制YUM缓存文件

安装步骤:

[root@localhost ~]#mysql -u root  验证数据是或不是导入成功

6.登录  测量检验httpd服务是或不是健康。

 

[root@localhost ~]#rpm -ql zabbix-server-mysql  验证安装文件

[root@localhost ~]#systemctl stop httpd.service                      
    #停止apache

php_value date.timezone Asia/Shanghai

2.安装MariaDB

6.安顿Http配置文件,修改时区为欧洲北京

7.早先zabbix-server,并安装开机自启

#systemctl enable zabbix-server

[root@localhost ~]#zcat
/usr/share/doc/zabbix-server-mysql-3.2.1/create.sql.gz | mysql -uroot
zabbix 

4..导入zabbix初步格局和数目

MariaDB [zabbix]>use zabbix;

[root@localhost ~]#yum install httpd                                
          #基于提示,输入Y安装就可以成功安装

[root@localhost ~]#systemctl enable httpd.service                    
  #设置apache开机运行

[root@localhost ~]#systemctl restart httpd.service                  
                         #重启apache

1.设置情况:VMware虚构

[root@localhost ~]#systemctl enable mariadb.service                
 #设置开机运转

[root@localhost ~]#yum install php                                  
       #据他们说提醒输入Y直到安装到位 

一.从头安装LAMP架构

                                                                       
                                         
#这里选取上述安装包举行安装,依照提醒输入Y回车

=======================================停止YUM意况已经盘算完毕=======================

注意:

#systemctl enable zabbix-agent

[root@localhost ~]#systemctl stop mariadb.service                    
 #停止MariaDB

[root@localhost ~]#systemctl restart httpd.service                  
                        #重启apache

2.安装zabbix程序

[root@localhost ~]#systemctl start mariadb.service                  
   #启动MariaDB

#systemctl start zabbix-server

[root@localhost yum.repos.d]# mkdir  repobak   #新建三个备份文件夹

11.
zabbix图形界面包车型地铁安排。图形分界面配置英特网有相当多,能够活动查询,此处省略。。。。。。。。。。

地址:

[root@localhost ~]#yum install mariadb mariadb-server              
 #了然是否要设置,输入Y就可以自行安装,直到安装达成

[root@localhost ~]# vi /etc/selinux/config                          
          #将selinux=enforcing  改为 selinux=disabled 即可。

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 

4.清除YUM缓存文件

[root@localhost ~]#systemctl restart httpd.service                  
    #重启apache

1.zabbix必要安装LAMP架构

[root@localhost ~]# yum clean all                                    
      #清除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

#yum install trousers

# vi /etc/httpd/conf.d/zabbix.conf

=========================LAMP框架结构已经搭建完结==========================================

 

 

[root@localhost yum.repos.d]#mv *  repobak    #讲yum.repos.d
文件夹内文件备份到repobak内

2.安装zabbix服务

1.为了方便获取安装使用,首先配置YUM服务,RedHat
暗许YUM已设置,下边我们一向配置YUM本地源和网络源就可以。

 

 

账户:admin   密码:zabbix

①要是zabbixserver不能运营,则要求安装trousers支持包。

[root@localhost ~]# yum makecache                                  
 #生成yum缓存

发表评论

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