Centos7下安裝zabbix 3.0.19
參考網站:
https://www.cnblogs.com/xiewenming/p/7732144.html
https://www.cnblogs.com/clsn/p/7885990.html Zabbix 3.0 從入門到精通(zabbix使用詳解)
https://yq.aliyun.com/articles/43308
https://yq.aliyun.com/articles/94733
https://www.zabbix.com/documentation/3.0/manual/installation 附 官方英文版文件
說明:根據zabbix server3.0官方要求,目前zabbix server3.0在centos6 OS上不能進行yum安裝。如果一定要在centos6 OS上進行安裝zabbix server3.0的話,強烈建議通過原始碼方式進行編譯安裝,同時還需要注意PHP的版本。考慮到這些因素,所以在此我們是在centos7 OS上進行yum安裝zabbix server3.0。
在centos7上安裝zabbix server3.0之前,我們首先搭建zabbix所需要的lamp環境。
準備一臺虛擬機器Centos7 172.16.160.94
yum update -y
yum repolist 列出yum倉庫
yum clean all 清理yum 快取
yum makecache 快取yum倉庫。
一,關閉selinux和iptables
[[email protected] ~]# systemctl stop firewalld.service
永久關閉selinux防火牆
[[email protected] zabbix]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
#SELINUXTYPE=targeted
臨時關閉
[ [email protected] ~]# setenforce 0
setenforce: SELinux is disabled
檢視是否關閉
[[email protected] zabbix]# getenforce
Permissive
二,安裝Zabbix rpm包倉庫
#安裝zabbix源、aliyun YUM源
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
或以下命令:
wget -P /etc/yum.repos.d http://mirrors.aliyun.com/repo/Centos-7.repo
三,安裝zabbix-server-mysql和zabbix-web-mysql
[[email protected] ~]# yum install -y zabbix-server-mysql zabbix-web-mysql
四,安裝並且啟動mariadb
現在開始安裝lamp環境,使用如下命令:
yum -y install mariadb mariadb-server php php-mysql httpd
lamp安裝完畢後,我們現在來配置mysql資料庫。
設定開機自啟動mysql,並啟動mysql,使用如下命令:
systemctl enable mariadb
systemctl start mariadb
初始化mysql資料庫,並配置root使用者密碼。使用如下命令:
mysql_secure_installation
我們直接敲回車鍵即可。因為centos7上mysql的預設root使用者密碼為空。
五,建立zabbix資料庫,建立zabbix賬號
mysql初始化完畢後,我們現在來建立zabbix資料庫及其使用者,使用如下命令:
[[email protected] ~]# mysql -uroot -p
...
mysql> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on zabbix.* to 'root'@'localhost' identified by 'zabbix';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on zabbix.* to 'zabbix'@'%' identified by 'zabbix';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
六,匯入預設的zabbix資料庫資訊
[[email protected] zabbix-server-mysql-3.0.12]# zcat /usr/share/doc/zabbix-server-mysql-3.0.19/create.sql.gz | mysql zabbix -uzabbix -pzabbix
七,修改zabbix_server.conf的配置檔案
[[email protected] ~]# grep ^DB /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
或:
#配置zabbixserver連線mysql sed -i.ori '115a DBPassword=zabbix' /etc/zabbix/zabbix_server.conf
八,修改配置檔案/etc/httpd/conf.d/zabbix.conf,時區改成 Asia/Shanghai
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
php_value date.timezone Asia/Shanghai
或:
#新增時區 sed -i.ori '18a php_value date.timezone Asia/Shanghai' /etc/httpd/conf.d/zabbix.conf
九,啟動apache/zabbix-server服務並設定為開機啟動
解決中文亂碼 yum -y install wqy-microhei-fonts cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf
[[email protected] ~]# systemctl start httpd
[[email protected] ~]# systemctl enable httpd
[[email protected] ~]# netstat -an |grep 80
tcp 0 0 192.168.56.11:80 0.0.0.0:* LISTEN
[[email protected] ~]# systemctl start zabbix-server
[[email protected] ~]# systemctl enable zabbix-server
或:
#寫入開機自啟動 chmod +x /etc/rc.d/rc.local cat >>/etc/rc.d/rc.local<<EOF systemctl start mariadb.service systemctl start httpd systemctl start zabbix-server EOF
#輸出資訊 echo "瀏覽器訪問 http://`hostname -I|awk '{print $1}'`/zabbix"
檢視zabbix-server日誌
[[email protected] ~]# tailf /var/log/zabbix/zabbix_server.log
zabbix-server的web目錄
[[email protected] zabbix]# ls /usr/share/zabbix
十,訪問網站,例如:http://本機IP/zabbix,如下圖所示:
十一,選擇下一步,Check of pre-requisites,如圖所示:
十二,選擇下一步,配置zabbix server detail,如下圖所示:
十三,選擇下一步,配置zabbix server detail,如下圖所示:
十四:點選下一步,便完成安裝,安裝完成的介面如下圖所示:
十五,安裝完成,如下圖所示:
十六:Zabbix·server的預設賬號Admin 密碼zabbix,如圖所示:
十七,預設登陸首頁,如下圖所示:
十八,移除或改名web目錄下面的setup.php檔案
[[email protected] zabbix]# pwd /usr/share/zabbix [[email protected] zabbix]# mv setup.php setup.php.bak
十九,更改web登陸的Admin預設密碼
二十,設定新的密碼,這裡也可以設定介面的主題、語言和登陸後顯示的預設介面等
至此安裝部分結束
二十一,安裝zabbix客戶端
yum install zabbix-agent -y
sed -i.ori 's#Server=127.0.0.1#Server=172.16.160.94#' /etc/zabbix/zabbix_agentd.conf
systemctl start zabbix-agent.service
二十二,服務端安裝zabbix-get檢測工具
[[email protected] zabbix]# yum install zabbix-get -y
二十二,在服務端進行測試
#注意:只能在服務端進行測試
[[email protected] zabbix]# zabbix_get -s 172.16.160.94 -p 10050 -k "system.cpu.load[all,avg1]"
0.030000
[[email protected] zabbix]#
[[email protected] tmp]# zabbix_get -s 172.16.160.35 -p 10050 -k "system.uname"
Linux amoyzhu 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64
[[email protected] tmp]#
相關推薦
Centos7下安裝zabbix 3.0.19
參考網站: https://www.cnblogs.com/xiewenming/p/7732144.html https://www.cnblogs.com/clsn/p/7885990.html Zabbix 3.0 從入門到精通(zabbix使用詳解) https://yq
Centos7.x下安裝Zabbix 3.0
環境:Centos7.x 64位,選擇7.x是因為7版本以上的PHP版本為5.4,不需要升級PHP版本。 1、安裝Apache [[email protected] ~]# yum install httpd 2、安裝MySQL的源和Zabbix的源
Linux-CentOS7下安裝Elasticsearch6.3.0超詳細步驟
檢測是否安裝了Elasticsearch ps aux|grep elasticsearch 1、安裝JDK Elastic 需要 Java 8 環境 安裝JDK具體操作,請點選連結 2、下載Elasticsearch wget https://artifacts.elast
CentOS 7 下安裝Zabbix 3.0
## 安裝前準備 ### 1.1 安裝依賴包: ``` yum -y install wget net-snmp-devel OpenIPMI-devel httpd openssl-devel java lrzsz fping-devel libcurl-devel perl-DBI pcre-dev
Centos7下安裝 TensorFlow1.3.0
1.檢視Centos版本 以下華為雲伺服器官網顯示的簡略資訊: 命令列檢視的結果: cat /etc/centos-release 我租的華為雲伺服器自帶Python2.7 2.檢視P
Centos7.2.1511安裝Zabbix 3.0
linux centos7 zabbix Centos7.2.1511安裝Zabbix 3.0 先在虛擬機中安裝好CentOS 7.2.1511,並設置好IP,允許虛擬機聯網。查看系統版本 cat /etc/redhat-release 1.安裝MySQL從最新版本的linux系統開始,默認的是
centos7.2編譯安裝zabbix-3.0.4
www 服務啟動 min asi com 修改配置 size ldap word 安裝zabbix-3.0.4 #安裝必備的包 yum -y install gcc* make php php-gd php-mysql php-bcmath php-mbstring php
Centos7下安裝CMake-3.10.0和ccmake
下載CMake-3.10.0 下載網址:https://cmake.org/files/v3.10/ 我這裡是下載了cmake-3.10.0-Linux-x86_64.tar.gz 使用tar xzvf
CentOS7下安裝GraphicsMagick1.3.21
使用 con tiff g++ magic 2-2 bit pthread thread 背景 本文只涉及GraphicsMagick1.3.21的安裝,具體使用場景和依賴環境請跳轉到我的另一篇文章:nginx+lua+GraphicsMagick生成實時縮略圖,本文不多
Centos7 單機安裝Elasticsearch6.3.0
設置 表達 應該 bili zip val 否支持 allow else 安裝Elasticsearch至少需要JAVA1.8以上的版本,這裏直接用yum安裝 1 # yum -y install java-1.8.0-openjdk.x86_64 j
Centos7下 安裝mongodb 3.6.6
x86 查詢 url sys repo 面向對象 star net redhat Centos7 下 完整安裝 mongodb 3.6.6 mongodb 介紹 MongoDB 是一個基於分布式文件存儲的數據庫。由C++語言編寫。旨在為WEB應用提供可擴展的高性能數據存儲解
Centos 6.x下安裝Zabbix 3.4
一、關閉SELINUX getenforce setenforce 0 #把SELinux關閉,此操作為臨時關閉,重啟後失效 vim /etc/selnux/conf 修改為disabled,此操作為永久關閉,重啟後生效。
Linux CentOS7下安裝Zookeeper-3.4.10服務(最新)
pre exp 路徑 datadir detail count 3.4 repr 數據文件 Linux CentOS7下安裝Zookeeper-3.4.10服務(最新) 2017年10月27日 01:25:26 極速-蝸牛 閱讀數:1933 版權聲明:
CentOS7.2 安裝redis 3.0.6叢集
1.環境確認 a.系統版本檢視 [[email protected] ~]$ cat /etc/redhat-release CentOS Li
CentOS7x64上yum安裝Zabbix 3.0
轉載: Zabbix開源社群 01、最小化安裝作業系統 02、升級系統元件到最新版本: yum -y update 03、關閉 SELinux: sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config 04
CentOS7下安裝Zookeeper-3.4.12
一、下載Zookeeper(需要jdk的支援) 下載好之後上傳至Linux系統中,如下: 二、解壓 tar -zxvf zookeeper-3.4.12.tar.gz 三、在解壓後的資料夾中,建立data目錄 解壓後的資料夾如下: 建立data目錄:
PHP 7.X安裝Zabbix 3.0.7出現問題解決
A non well formed numeric value encountered [zabbix.php:21 → require_once() → ZBase->run() → ZBase->processRequest() → CView->getOutput() → i
ubuntu12.04下安裝cmake-3.0.1
對Cmake的說明 Cmake是一個跨平臺的程式編譯工具,說的簡單點,就是同樣的原始檔,在windows下使用cmake,選擇VS編譯器,就可以編譯出vs的工程,使用CDT就可以編譯出Eclipse的工程,使用一般的編譯器,還可以直接編譯出Make
安卓搭建nexus私服-2.window下安裝nexus-3.0.0-03
原文:http://blog.csdn.net/fengyunhaitan/article/details/51685498 nexus-3.0.0-03-win64.zip的安裝 1、下載安裝包,解壓縮,如下圖: 2、開啟cmd.exe,執行命令:nexus.ex
lua5.3.0在centos7下安裝遇到的問題
1.沒有安裝gcc,導致安裝中斷 安裝gcc:yum install gcc 2.lua.c:80:31: fatal error: readline/readline.h: No such file or directory,導致安裝中斷 說明缺少lib