RHEL 7.1編譯安裝Ganglia 3.7.1
1.安裝依賴
yum groupinstall -y "Development tools" "Basic Web Server"
yum install pcre pcre-devel apr-devel apr-util-devel apr-util zlib-devel zlib rrdtool-devel rrdtool python-devel php
2.新增使用者
useradd ganglia
passwd ganglia
3.從原始碼編譯安裝,先安裝confuse.
cd /usr/local/src
#install confuse
wget
tar -zxvf confuse-2.7.tar.gz
cd confuse-2.7/
../configure CFLAGS=-fPIC -disable-nls && make && make install
然後編譯安裝ganglia
wget %20monitoring%20core/3.7.1/ganglia-3.7.1.tar.gz/download
mv download ganglia-3.7.1.tar.gz
tar -zxvf ganglia-3.7.1.tar.gz
cd ganglia-3.7.1/
./configure --prefix=/usr/local/ganglia --with-gmetad --enable-gexec --sysconfdir=/etc/ganglia --with-python=/usr/bin/python && make && make install
4. 配置gmetad 和gmond.
cp gmetad/gmetad.conf /etc/ganglia/
/usr/local/ganglia/sbin/gmond -t |tee /etc/ganglia/gmond.conf
首先配置gmetad.
vim /etc/ganglia/gmetad.conf
data_source "my cluster" YOUR_FQDN
# setuid_username "nobody"
setuid_username "ganglia"
然後配置gmond.
vim /etc/ganglia/gmond.conf
setuid = yes
#user = nobody
user =ganglia
udp_send_channel {
bind_hostname = yes # Highly recommended, soon to be default.
# This option tells gmond to use a source address
# that resolves to the machine
檢視gmond的python 擴充套件,確保modpython.so 被編譯出來。
locate modpython.so
/usr/local/ganglia/lib64/ganglia/modpython.so
#create gmond python directory
mkdir -p /usr/local/ganglia/lib64/ganglia/python_modules
/usr/local/ganglia/sbin/gmond -d10
#應該能看到loaded module: python_module
#copy python module / py.conf
cp /usr/local/src/ganglia-3.7.1/gmond/python_modules/*/*.py /usr/local/ganglia/lib64/ganglia/python_modules
cp /usr/local/src/ganglia-3.7.1/gmond/python_modules/conf.d/*.pyconf /etc/ganglia/conf.d
配置啟動項:
cp gmetad/gmetad.init /etc/rc.d/init.d/gmetad
cp gmond/gmond.init /etc/rc.d/init.d/gmond
vim /etc/init.d/gemtad(edit these)
#GMETAD=/usr/sbin/gmetad
GMETAD=/usr/local/ganglia/sbin/gmetad
#daemon $GMETAD
daemon $GMETAD -c /etc/ganglia/gmetad.conf
vim /etc/init.d/gmond (edit these)
#GMOND=/usr/sbin/gmond
GMOND=/usr/local/ganglia/sbin/gmond
#daemon $GMOND
daemon $GMOND -c /etc/ganglia/gmond.conf
配置systemd服務
vim /usr/lib/systemd/system/gmetad.service(edit these lines)
[Service]
Type=forking
#PIDFile=/usr/local/ganglia/var/run/gmetad.pid
PIDFile=/var/run/gmetad.pid
#ExecStart=/usr/local/ganglia/sbin/gmetad --pid-file=/usr/local/ganglia/var/run/gmetad.pid
ExecStart=/usr/local/ganglia/sbin/gmetad -c /etc/ganglia/gmetad.conf --pid-file=/var/run/gmetad.pid
EnvironmentFile=-/etc/ganglia/default/gmetad
vim /usr/lib/systemd/system/gmond.service(edit these lines)
[Service]
Type=forking
#PIDFile=/usr/local/ganglia/var/run/gmond.pid
PIDFile=/var/run/gmond.pid
#ExecStart=/usr/local/ganglia/sbin/gmond --pid-file=/usr/local/ganglia/var/run/gmond.pid
ExecStart=/usr/local/ganglia/sbin/gmond -c /etc/ganglia/gmond.conf --pid-file=/var/run/gmond.pid
為rrdtool 建立目錄:
mkdir -p /var/lib/ganglia/rrds
chown ganglia:ganglia /var/lib/ganglia/rrds
啟動服務:
systemctl daemon-reload
systemctl start gmetad
systemctl start gmond
至此,netstat 可以看到埠監聽,可以telnet localhost 8649, 能看到xml,ps -ef 證實 gmetad 和gmond 確實是以ganglia 使用者在執行,"/var/lib/ganglia/rrds" 目錄下有檔案生成.
netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:8649 0.0.0.0:* LISTEN 18465/gmond
tcp 0 0 0.0.0.0:8651 0.0.0.0:* LISTEN 17783/gmetad
tcp 0 0 0.0.0.0:8652 0.0.0.0:* LISTEN 17783/gmetad
5. 配置ganglia-web
wget -web/3.7.1/ganglia-web-3.7.1.tar.gz
tar xzvf ganglia-web-3.7.1.tar.gz
vi Makefile(Edit these)
GDESTDIR = /var/www/html/ganglia
APACHE_USER = apache
ZZ
make install
6.從GUI 登陸.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9034054/viewspace-2056674/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- centos7 編譯安裝imagemagick7.1CentOS編譯
- CentOS7編譯安裝php7.1配置教程詳解CentOS編譯PHP
- 《linux原始碼包的編譯安裝》RHEL6Linux原始碼編譯
- 自動化(YUM/編譯)安裝PHP(5.3/5.5/7.0/7.1)指令碼編譯PHP指令碼
- 詳解 RHEL7.1 yum源配置與軟體安裝
- <ganglia+nagios>rhel6.5iOS
- RHEL5u3環境下編譯安裝MySQL Proxy 0.8.1編譯MySql
- Ganglia3.1.7安裝與配置
- 編譯安裝zabbix編譯
- apache編譯安裝Apache編譯
- 編譯安裝nmon編譯
- swoole 編譯安裝編譯
- 編譯安裝Nginx編譯Nginx
- 編譯安裝mysql編譯MySql
- nginx編譯安裝Nginx編譯
- Griffin編譯安裝編譯
- 安裝編譯ffmpeg編譯
- ganglia3.4安裝配置簡述
- RHEL 6.0原始碼編譯安裝小企鵝輸入法fcitx-4.0.0原始碼編譯
- Shell編譯安裝nginx編譯Nginx
- centos PHP 編譯安裝CentOSPHP編譯
- httpd編譯安裝phphttpd編譯PHP
- PHP的編譯安裝PHP編譯
- Mysql 5.7.17 編譯安裝MySql編譯
- ffmpeg安裝之linux編譯安裝Linux編譯
- linux_ganglia客戶端安裝Linux客戶端
- ubuntu 安裝php7.1UbuntuPHP
- RHEL安裝Xtrabackup
- CentOS 下編譯安裝 NginxCentOS編譯Nginx
- CentOS 下編譯安裝 apacheCentOS編譯Apache
- Mac 編譯安裝 PHPRedis 模組Mac編譯PHPRedis
- PHP7 編譯安裝PHP編譯
- Linux編譯安裝NginxLinux編譯Nginx
- CentOS 6.4 編譯安裝 apacheCentOS編譯Apache
- ubuntu編譯安裝kernel教程。Ubuntu編譯
- windows下編譯安裝thriftWindows編譯
- 編譯安裝php7編譯PHP
- php7編譯安裝PHP編譯