日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
CentOS7.4安裝Zabbix3.4

一、安裝環(huán)境

1 [root@linuxidc ~]# cat /etc/RedHat-release
2 
3 centos Linux release 7.4.1708 (Core)

關(guān)閉防火墻

1 [root@linuxidc ~]# systemctl stop firewalld.service                 #關(guān)閉防火墻
2 
3 [root@linuxidc ~]# systemctl disable firewalld.service               #開機(jī)不啟動防火墻
4   

關(guān)閉selinux

1 [root@linuxidc ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config    #在/etc/selinux/config 把SELNUX=enforcing換成SELINUX=disabled
2 
3 [root@linuxidc ~]# grep SELINUX=disabled /etc/selinux/config       #過濾剛剛換的disabled
4 
5 SELINUX=disabled
6 
7 [root@linuxidc ~]# setenforce 0                                #清空selinux的配置
8 
9 setenforce: SELinux is disabled 

二、數(shù)據(jù)庫的安裝及配置

MariaDB數(shù)據(jù)庫管理系統(tǒng)是MySQL的一個分支,主要由開源社區(qū)在維護(hù),采用GPL授權(quán)許可。

開發(fā)這個分支的原因是:甲骨文公司收購了MySQL后,有將MySQL閉源的潛在風(fēng)險,因此社區(qū)采用分支的方式來避開這個風(fēng)險。

MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能輕松成為MySQL的代替品。

安裝mariadb

[root@linuxidc ~]# yum install mariadb-server mariadb –y

已加載插件:fastestmirror, langpacks

base                                                                                                                         

中間省略安裝過程

已安裝:

mariadb.x86_64 1:5.5.56-2.el7                                         mariadb-server.x86_64 1:5.5.56-2.el7                                       

作為依賴被安裝:

  perl-DBD-MySQL.x86_64 0:4.023-5.el7                                                                                                               

作為依賴被升級:

  mariadb-libs.x86_64 1:5.5.56-2.el7                                                                                                               

完畢!

mariadb數(shù)據(jù)庫的相關(guān)命令是:

 

1 [root@linuxidc ~]# systemctl start mariadb  #啟動MariaDB
2 
3 [root@linuxidc ~]# systemctl stop mariadb  #停止MariaDB
4 
5 [root@linuxidc ~]# systemctl restart mariadb  #重啟MariaDB
6 
7 [root@linuxidc ~]# systemctl enable mariadb  #設(shè)置開機(jī)啟動

三、Zabbix3.4安裝及配置

安裝zabbix3.4

1 [root@linuxidc ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm

  

獲取http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm

準(zhǔn)備中...                          ################################# [100%]

正在升級/安裝...

  1:zabbix-release-3.4-1.el7.centos  ################################# [100%]

獲取http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm

準(zhǔn)備中...                          ################################# [100%]

正在升級/安裝...

  1:zabbix-release-3.4-1.el7.centos  ################################# [100%]

1 [root@linuxidc ~]# yum install zabbix-server-mysql zabbix-web-mysql -y

已加載插件:fastestmirror, langpacks

zabbix                                                                                                                       | 2.9 kB  00:00:00   

zabbix-non-supported                                                                                                          |  951 B  00:00:00   

zabbix/x86_64/primary_db                                                                                                     |  18 kB  00:00:00   

zabbix-non-supported/x86_64/primary                                                                                          | 1.6 kB  00:00:00   

Loading mirror speeds from cached hostfile

 * base: mirrors.aliyun.com

 * epel: mirrors.neusoft.edu.cn

 * extras: mirrors.aliyun.com

 * updates: mirrors.aliyun.com

zabbix-non-supported                                                                                                                            4/4

安裝省略中間過程

已安裝:

  zabbix-server-mysql.x86_64 0:3.4.1-1.el7                                  zabbix-web-mysql.noarch 0:3.4.1-1.el7                                 

作為依賴被安裝:

  OpenIPMI-libs.x86_64 0:2.0.19-15.el7          OpenIPMI-modalias.x86_64 0:2.0.19-15.el7            fping.x86_64 0:3.10-4.el7                   

  httpd.x86_64 0:2.4.6-67.el7.centos.2          httpd-tools.x86_64 0:2.4.6-67.el7.centos.2          iksemel.x86_64 0:1.4-6.el7                 

  libzip.x86_64 0:0.10.1-8.el7                  mailcap.noarch 0:2.1.41-2.el7                        php.x86_64 0:5.4.16-42.el7                 

  php-bcmath.x86_64 0:5.4.16-42.el7              php-cli.x86_64 0:5.4.16-42.el7                      php-common.x86_64 0:5.4.16-42.el7           

  php-gd.x86_64 0:5.4.16-42.el7                  php-ldap.x86_64 0:5.4.16-42.el7                      php-mbstring.x86_64 0:5.4.16-42.el7         

  php-mysql.x86_64 0:5.4.16-42.el7              php-pdo.x86_64 0:5.4.16-42.el7                      php-xml.x86_64 0:5.4.16-42.el7             

  t1lib.x86_64 0:5.1.2-14.el7                    unixODBC.x86_64 0:2.3.1-11.el7                      zabbix-web.noarch 0:3.4.1-1.el7             

完畢!

創(chuàng)建數(shù)據(jù)庫

 1 [root@linuxidc ~]# mysql
 2 
 3 Welcome to the MariaDB monitor.  Commands end with ; or \g.
 4 
 5 Your MariaDB connection id is 2
 6 
 7 Server version: 5.5.56-MariaDB MariaDB Server
 8 
 9  
10 
11 Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
12 
13  
14 
15 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
16 
17  
18 
19 MariaDB [(none)]>
20 
21 MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
22 
23 Query OK, 1 row affected (0.00 sec)
24 
25 MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
26 
27 Query OK, 0 rows affected (0.08 sec)
28 
29 MariaDB [(none)]> exit
30 
31 Bye  

導(dǎo)入數(shù)據(jù)庫

[root@linuxidc ~]# zcat /usr/share/doc/zabbix-server-mysql-3.4.1/create.sql.gz |mysql -uzabbix -pzabbix zabbix

配置數(shù)據(jù)庫用戶及密碼

 1 [root@linuxidc ~]# grep -n '^'[a-Z] /etc/zabbix/zabbix_server.conf
 2 
 3 38:LogFile=/var/log/zabbix/zabbix_server.log
 4 
 5 49:LogFileSize=0
 6 
 7 72:PidFile=/var/run/zabbix/zabbix_server.pid
 8 
 9 82:SocketDir=/var/run/zabbix
10 
11 101:DBName=zabbix
12 
13 117:DBUser=zabbix
14 
15 316:SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
16 
17 434:Timeout=4
18 
19 476:AlertScriptsPath=/usr/lib/zabbix/alertscripts
20 
21 486:ExternalScripts=/usr/lib/zabbix/externalscripts
22 
23 522:LogSlowQueries=3000

 
[root@linuxidc ~]# vim /etc/zabbix/zabbix_server.conf              #修改配置文件

 

啟動zabbix server并設(shè)置開機(jī)啟動

1 [root@linuxidc ~]# systemctl start zabbix-server
2 
3 [root@linuxidc ~]# systemctl enable zabbix-server
4   

編輯Zabbix前端PHP配置,更改時區(qū)

1 [root@linuxidc ~]# vim /etc/httpd/conf.d/zabbix.conf

修改為亞洲上海

保存并退出

SELinux配置

1 [root@linuxidc ~]# setsebool -P httpd_can_connect_zabbix on
2 
3 setsebool:  SELinux is disabled.
4 
5 [root@linuxidc ~]# setsebool -P httpd_can_cetwork_connect_db on
6 
7 setsebool:  SELinux is disabled.

啟動httpd并設(shè)置開機(jī)啟動

1 [root@linuxidc ~]# systemctl start httpd           #啟動httpd服務(wù)
2 
3 [root@linuxidc ~]# systemctl enable httpd         #設(shè)置開機(jī)啟動httpd服務(wù)

四、安裝Zabbix Web

瀏覽器訪問,并進(jìn)行安裝

http://192.168.1.18/zabbix/

點擊next step

點擊 next step

輸入數(shù)據(jù)庫的密碼

點擊next step

點擊 next step

確認(rèn)信息沒錯以后

點擊 next step

完成安裝,會將在/etc/zabbix/web/zabbix.conf.php生成配置文件

Congratulations! You have successfully installed Zabbix frontend.

Configuration file "/etc/zabbix/web/zabbix.conf.php" created.

 1 [root@linuxidc ~]# cat /etc/zabbix/web/zabbix.conf.php
 2 
 3 

點擊finish

登錄最新版Zabbix3.4 默認(rèn)用戶Admin 默認(rèn)密碼zabbix

輸入用戶名和密碼以后點擊 sign in

到此安裝已經(jīng)結(jié)束

五、zabbxi-agent安裝及配置

安裝zabbxi-agent

 1 [root@linuxidc ~]# yum install zabbix-agent –y
 2 
 3 已加載插件:fastestmirror, langpacks
 4 
 5 Loading mirror speeds from cached hostfile
 6 
 7  * base: mirrors.aliyun.com
 8 
 9  * epel: mirrors.tuna.tsinghua.edu.cn
10 
11  * extras: mirrors.aliyun.com
12 
13  * updates: mirrors.aliyun.com
14 
15 正在解決依賴關(guān)系
16 
17 There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
18 
19 --> 正在檢查事務(wù)
20 
21 ---> 軟件包 zabbix-agent.x86_64.0.3.4.1-1.el7 將被 安裝
22 
23 --> 解決依賴關(guān)系完成
24 
25  
26 
27 依賴關(guān)系解決
28 
29  
30 
31 =====================================================================================================================================================
32 
33  Package                               架構(gòu)                            版本                                    源                               大小
34 
35 =====================================================================================================================================================
36 
37 正在安裝:
38 
39  zabbix-agent                          x86_64                          3.4.1-1.el7                             zabbix                          353 k
40 
41  
42 
43 事務(wù)概要
44 
45 =====================================================================================================================================================
46 
47 安裝  1 軟件包
48 
49  
50 
51 總下載量:353 k
52 
53 安裝大?。?.3 M
54 
55 Downloading packages:
56 
57 zabbix-agent-3.4.1-1.el7.x86_64.rpm                                                                                           | 353 kB  00:00:04    
58 
59 Running transaction check
60 
61 Running transaction test
62 
63 Transaction test succeeded
64 
65 Running transaction
66 
67   正在安裝    : zabbix-agent-3.4.1-1.el7.x86_64                                                                                                  1/1
68 
69   驗證中      : zabbix-agent-3.4.1-1.el7.x86_64                                                                                                  1/1
70 
71  
72 
73 已安裝:
74 
75   zabbix-agent.x86_64 0:3.4.1-1.el7                                                                                                                 
76 
77  
78 
79 完畢!
80 
81  

配置zabbxi-agent

1 [root@linuxidc ~]# vim /etc/zabbix/zabbix_agentd.conf

修改IP地址server IP地址

輸入IP地址

修改serverActive IP地址

輸入IP地址

啟動zabbxi-agent并設(shè)置開機(jī)啟動


分享標(biāo)題:CentOS7.4安裝Zabbix3.4
分享URL:http://www.dlmjj.cn/article/dhghggj.html