rpm -qa |
grep mysql
rpm -qa |
grep mariadb
yum remove mysql*
yum remove mariadb*
# 找到並清理未刪除的目錄
find / -name mysql
find / -name mariadb
yum install mariadb* -y
systemctl start mariadb #啟動mariadb
systemctl stop mariadb #停止mariadb
systemctl restart mariadb #重啟mariadb
systemctl enable mariadb #設定開機啟動
mysqladmin -u root -p password 123456
mariadb [
(none)
]> grant all privileges on *.* to 'root'@'localhost' identified by 'newpasswd' with grant option;
mariadb [
(none)
]> grant all privileges on *.* to 'root'@'localhost' identified by 'newpasswd' with grant option;
mariadb [
(none)
]> flush privileges;
yum -y install
curl curl-devel net-snmp net-snmp-devel perl-dbi libxml2-devel libevent-devel pcre gcc mysql-devel
wget -c
md5sum zabbix-4.0.19.tar.gz
tar -zxvf zabbix-4.0.19.tar.gz
cd zabbix-4.0.19
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
make
make
install
ln -s /usr/local/zabbix/sbin/zabbix_* /usr/local/sbin/
./configure --help檢視具體引數含義,根據需要新增
-c斷點續傳
cd /usr/local/zabbix/etc/
vi zabbix_server.conf
logfile=/tmp/zabbix_server.log
dbhost=localhost
dbname=zabbix
dbuser=zabbix
dbpassword=123456
cd zabbix-4.0.19
cp misc/init.d/tru64/zabbix_server /etc/init.d/zabbix_server
chmod o+x /etc/init.d/zabbix_server
groupadd zabbix
useradd -g zabbix zabbix
匯入初始資料:
重啟所有服務:
安裝zabbix-web
瀏覽器訪問:http://localhost/setup.php
報錯:
vi /etc/php.ini
yum install php-xml php-bcmath
重啟httpd
預設使用者名稱:admin
密碼:zabbix
原始碼部署zabbix監控詳細步驟
由於實際工作中所需要監控的伺服器數量之大,人工監控耗時耗力,基於這種情況尋找可用於監控的伺服器的開源軟體,有三款推薦軟體可使用 cacti nagios zabbix 三款軟體各自的特點如下 cacti 基於snmp協議的監控軟體,強大的繪圖能力 nagios 基於agent監控,強大的狀態查驗與報...
zabbix原始碼安裝
1 zabbix server安裝指令碼 yum install y libevent devel wget tar gcc gcc c make net snmp devel libxml2 devel libcurl devel groupadd zabbix useradd g zabbix ...
zabbix原始碼安裝
2 安裝依賴庫 yum y install net snmp devel libxml2 devel libcurl devel libevent libevent devel 3 解壓並編譯 tar zxvf zabbix 3.4.2.tar.gz cd zabbix 3.4.2 configur...