内射老阿姨1区2区3区4区_久久精品人人做人人爽电影蜜月_久久国产精品亚洲77777_99精品又大又爽又粗少妇毛片

一鍵安裝nagios

一鍵安裝nagios

創(chuàng)新互聯(lián)建站于2013年成立,是專業(yè)互聯(lián)網技術服務公司,擁有項目成都做網站、成都網站制作網站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元南川做網站,已為上家服務,為南川各地企業(yè)和個人服務,聯(lián)系電話:18980820575


此腳本僅僅適用于centos 6.4 x86_64,yum安裝的httpd和php,這里的安裝過程以后我會整理一份手工安裝版本的 需要源碼安裝的  請期待后面的更新。

nagios的報警之強大目前還沒有別的軟件可以比肩,也是運維人員必須要掌握的一個軟件。包括nagios腳本的開發(fā),各種應用的監(jiān)控。這里先給新手朋友一個如何安裝nagios的思路.

直接上腳本

#!/bin/bash
#Date: 2013/12/6
#BY:renzhenxing
#install nagios-server or nagios-plugs
read -p "Please input your nagiosadmin's password:" a
selinux=`grep SELINUX=enforcing /etc/selinux/config | awk -F "=" '{print $2}'`
if [ "$selinux" == "enforcing" ]
   then
      echo "your system Selinux not shut down,"
      exit 1
fi
yum install -y wget gcc gcc++ gcc* bc net-snmp net-snmp-utils net-snmp-libs  libpng libpng-devel libjpeg libjpeg-devel openssl098e gd* gd2* openssl-devel* openssl*
cd /usr/local/src
if [ -f nagios-4.0.1.tar.gz ]
then
     echo ".........................................nagios.tar.gz..................is OK!!!"
else
     echo "nagios.tar.gz.............................is not ok!!!..................download"
     wget http://jaist.dl.sourceforge.net/project/nagios/nagios-4.x/nagios-4.0.1/nagios-4.0.1.tar.gz
fi
if [ -f nagios-plugins-1.5.tar.gz ]
then
    echo "............................................nagios-plugs .................is ok!!!"
else
    echo "nagios-plugins-1.5.tar.gz....................is not ok !!!! ..............download"
    wget https://www.nagios-plugins.org/download/nagios-plugins-1.5.tar.gz
fi
if [ -f nrpe-2.15.tar.gz ]
then
   echo "............................................nrpe-2.15.tar.gz.................is ok!!!"
else
   echo "..................................nrpe-2.15.tar.gz...is not ok!!!............download"
   wget http://jaist.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz
fi
###add install nagios ID:
useradd -m nagios
echo "nagios" | passwd --stdin nagios
###add install  gid:
groupadd nagcmd
###daemon 為apache運行賬號:
usermod -a -G nagcmd daemon
###install nagios-4.0.1.tar.gz
tar -zxf nagios-4.0.1.tar.gz && cd nagios-4.0.1
./configure --with-command-group=nagcmd --with-gd-lib=/usr/local/libgd/lib/ --with-gd-inc=/usr/local/libgd/include/
make all
make install
make install-init
make install-config
make install-commandmode
cd ../
cat >>/etc/httpd/conf/httpd.conf<<EOF
###nagios's cgi for httpd:
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
   Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
   Require valid-user
</Directory>
EOF
##########################################################
###location nagios admin   password(default:che100):
htpasswd -cb /usr/local/nagios/etc/htpasswd.users nagiosadmin $a
###service httpd server:
service httpd restart
###install nagios-plugs(default:/usr/local/nagios/):
tar -xzf nagios-plugins-1.5.tar.gz
cd nagios-plugins-1.5
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install
cd ../
###install nrpe:
tar -zxf nrpe-2.15.tar.gz
cd nrpe-2.15
./configure && make all && make install-plugin
###禁用suexec的功能.此功能對CGI的執(zhí)行路徑進行了限制
setenforce 0
###stop iptables:
service iptables stop
###start nagios  server:
service nagios restart
echo "--------------- nagios server install ok!!!------------------------"
echo "  "
echo "--------------service nagios start is start -----------------------"
echo "  "

安裝之后訪問:

http://你的服務器的IP/nagios

默認的用戶名是:nagiosadmin      密碼是腳本開始時候讓你輸入的密碼。

說明:

ps:由于本人的shell 腳本比較爛,有想法的朋友可以指點一下。

附件:http://down.51cto.com/data/2363876

文章標題:一鍵安裝nagios
URL鏈接:http://www.rwnh.cn/article48/jgjsep.html

成都網站建設公司_創(chuàng)新互聯(lián),為您提供標簽優(yōu)化網站維護、服務器托管自適應網站、品牌網站建設微信小程序

廣告

聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

成都做網站
石城县| 新安县| 张掖市| 比如县| 海安县| 蕲春县| 平果县| 资兴市| 白玉县| 黄大仙区| 咸丰县| 屏东市| 娱乐| 民权县| 宜春市| 陆良县| 游戏| 革吉县| 西昌市| 淳化县| 古交市| 平利县| 渑池县| 洞头县| 皮山县| 墨竹工卡县| 盐源县| 嘉黎县| 金平| 从江县| 诸城市| 竹溪县| 岳阳市| 镇沅| 萨迦县| 新竹县| 阜宁县| 炉霍县| 洞口县| 台南县| 英德市|