1.Xshell 遠程鏈接到Centos7.3.
鏈接centos 系統後,首先關閉防火牆和SELINUX,如不關閉會各類攔截,網頁訪問等故障,容易形成蛋疼哦.
#systemctl stop firewalld.service #關閉防火牆服務mysql
#systemctl disable firewalld.service #開機不啓動linux
#sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config #替換文本參數web
#grep SELINUX=disabled /etc/selinux/config #查文本狀態sql
#setenforce 0 #關閉當前SELINUXshell
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數據庫
3、zabbix3.4.1 安裝centos
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瀏覽器
2、服務端安裝
#yum install zabbix-server-mysql zabbix-web-mysqlide
遇到詢問安裝的輸入y ,y, y編碼
Complete! 完成
zabbix-server-mysql :zabbix server 端
zabbix-web-mysql:zabbix web端(經過WEB來訪問配置)
4、安裝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
######:對於本地的zabbix用戶(zabbix@localhost)受權 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