目錄php
@(Zabbix)html
前言:
Zabbix:是一個基於WEB界面的提供分佈式系統監視以及網絡監視功能的企業級的開源解決方案。mysql
LAMP:linux
- CentOS7
- Server version: Apache/2.4.6 (CentOS),
- Server version: 5.7.19 MySQL Community Server (GPL)
- PHP 7.0.22 (cli) (built: Aug 9 2017 18:23:24) ( NTS )
臨時
關閉selinuxc++
[root@centos-1]# setenforce 0
將selinux的參數改成「
disabled
」,這能夠永久關閉selinuxgit
[root@centos-1]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
orgithub
vi /etc/selinux/config
[root@centos-1]# yum install epel-release.noarch wget vim gcc gcc-c++ lsof chrony tree nmap unzip rsync -y [root@centos-1]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[root@centos-1 html]# rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm [root@centos-1 html]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX [root@centos-1 html]# yum install zabbix-server-mysql zabbix-web-mysql zabbix-get
[root@centos-1 html]# rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm [root@centos-1 html]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX [root@centos-1 html]# yum install zabbix-agent
mysql> CREATE DATABASE zabbix DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; <---建立數據庫並制定默認編碼爲utf8,防止亂碼 Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL ON zabbix.* TO 'zabbix'@'%' IDENTIFIED BY '775120@Zabbix'; <----爲zabbix建立帳號並受權 Query OK, 0 rows affected, 1 warning (0.01 sec) mysql> flush privileges; <-----刷新 Query OK, 0 rows affected (0.01 sec)
[root@centos-1 lcr]# vim /etc/zabbix/zabbix_server.conf
將下面幾個參數修改成上一小節建立的數據及帳號web
- DBHost=
localhost
##默認便可,除非數據庫不在server機上- DBName=
zabbix
##數據庫(database)名稱- DBUser=
zabbix
##用戶名user- DBPassword=
775120@Lai
##密碼password
[root@centos-1 lcr]# vim /etc/httpd/conf.d/zabbix.conf
以下修改,注意刪除
註釋符#
php_value date.timezoneAsia/Chongqing
sql
[root@centos-1 lcr]# vim /etc/zabbix/zabbix_server.conf
修改以下幾項參數數據庫
zabbix server ip
<---server機的IPzabbix server ip
本機Ip
#不要用127.0.0.110050
[root@centos-1 ~]# systemctl restart httpd [root@centos-1 ~]# systemctl start zabbix-server
[root@centos-1 ~]# systemctl start zabbix-agent
server機上訪問:
http://server-ip/zabbix
可見的名稱:
頁面顯示的名稱
羣租:將主機納入某個羣組
填寫IP地址,端口,默認爲10050
輸入「
Linux
」便可選擇該模板,若是不是linux主機,酌情選擇別的模板
至此,安裝完成點擊回到個人主頁