Centos7.3安裝部署Zabbix3.4.15(成功可用)
1.Xshell 遠程連接到Centos7.3.
連接centos 系統後,首先關閉防火墻和SELINUX,如不關閉會各種攔截,網頁訪問等故障,容易造成蛋疼哦.
#systemctl stop firewalld.service #關閉防火墻服務
#systemctl disable firewalld.service #開機不啟動
#sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/‘ /etc/selinux/config #替換文本參數
#grep SELINUX=disabled /etc/selinux/config #查文本狀態
#setenforce 0 #關閉當前SELINUX
2.配置163 的yum 源
#mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup #備份本地yum 源
#cd /etc/yum.repos.d/ #打開yum 源文件,下載163yum 用root 用戶傳入yum.repos.d 文件下.
下載地址http://mirrors.163.com/.help/CentOS7-Base-163.repo
三、zabbix3.4.1 安裝
一、下載3.4.1 rpm
# rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm
二、服務端安裝
#yum install zabbix-server-mysql zabbix-web-mysql
遇到詢問安裝的輸入y ,y, y
Complete! 完成
zabbix-server-mysql :zabbix server 端
zabbix-web-mysql:zabbix web端(通過WEB來訪問配置)
四、安裝mariadb 數據庫
1.安裝mariadb 數據庫
#yum install mariadb mariadb-server -y
Complete!
2.啟動mariadb 數據庫
#systemctl start mariadb
3.開機自啟動
#systemctl enable mariadb.service
4.創建zabbix 數據庫
[root@localhost /]# mysql
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; #創建數據庫及utf8 編碼
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by ‘zabbix‘; #密碼zabbix
MariaDB [(none)]>flush privileges; #刷新
MariaDB [(none)]> exit #退出
5.初始化數據庫
[root@localhost /]# cd /usr/share/doc/zabbix-server-mysql-3.4.1/
[root@localhost zabbix-server-mysql-3.4.1]#
zcat /usr/share/doc/zabbix-server-mysql-3.4.1/create.sql.gz | mysql -uzabbix -p zabbix
密碼輸入zabbix
6.查看下數據庫表單是否有生成導入
# mysql
> use zabbix
> show tables;
> exit
10.重新啟動httpd,刷新配置
#systemctl start httpd
#systemctl enable httpd
11.zabbix 網頁安裝(瀏覽器版本太低打開錯誤,用火狐瀏覽器或谷歌瀏覽器打開即可)
http://192.168.*.*/zabbix 默認用戶名/密碼:Admin/zabbix
Centos7.3安裝部署Zabbix3.4.15(成功可用)