nagios為一功能強大之網管工具軟體,在此提供個人安裝時的步驟,讓大家參考


adduser nagios
mkdir /usr/local/nagios
chown -R nagios:nagios /usr/local/nagios
cd /usr/ports/graphics/gd
make install
cd your nagios source
important:define your gd location to generate statusmap,trends,and histogram cgi files
./configure --with-gd-lib=/usr/locol/lib --with-gd-inc=/usr/local/include --with-init-dir=/etc/rc.d
make all
pw groupadd -n nagcmd
pw usermod www -G nagcmd
pw usermod nagios -G nagcmd

make install
make install-init
=================================================================
/usr/bin/install -c -m 755 -d -o root -g root /etc/rc.d
install: root: Invalid argument
*** Error code 67

Stop in /home/src/nagios-2.0b5.
=================================================================
make install-commandmode
make install-config
install nagios-plugins by yourself
cp -r /usr/local/nagios-plugins/libexec /usr/local/nagios/

===================apache httpd.conf insertion===================

ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin


Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user


Alias /nagios /usr/local/nagios/share


Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user

=================================================================

/usr/local/apache/bin/htpasswd -c /usr/local/nagios/etc/htpasswd.users admin
/usr/local/apache/bin/htpasswd /usr/local/nagios/etc/htpasswd.users other user(without -c when add second user)
cp /usr/local/nagios/etc/*.cfg-sample /usr/local/nagios/etc/*.cfg

===================minimal.cfg modification======================

put # in front of services that appear in checkcommands.cfg and misccommands.cfg in minimal.cfg
=================================================================

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Total Warnings: 0
Total Errors: 0

/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

Congratulation!! nagios shall running...

arrow
arrow
    全站熱搜

    nextplayer 發表在 痞客邦 留言(0) 人氣()