- yum -y install gcc gcc-c++ glibc glibc-common gd gd-devel automake autoconf libtool make
- yum -y install setuptool ntsysv system-config-network-tui system-config-securtiylevel-tui system-config-securitylevel-tui
- yum -y install httpd MySQL mysql-server mysql-devel mysql perl mysql-server perl-DBI perl-DBD-MySQL perl-Time-HiRes
- yum -y install php-devel php php-pear php-mysql php* libssh3 libssh3-devel glibc glibc-common gd gd-devel yum -y install rrdtool rrdtool-perl openssl-devel crontabs xinetd sudo wget vim python gettext
- yum -y install net-snmp net-snmp-libs net-snmp-utils
- vi .bashrc
- vi /etc/profile
- vi /etc/sysconfig/selinux
- useradd nagios
- mkdir -p /usr/local/nagios
- chown nagios.nagios /usr/local/nagios
- usermod -s /sbin/nologin nagios
- groupadd nagcmd
- usermod -G nagcmd nagios
- usermod -G nagcmd apache
- tar zxf nagios-3.4.1.tar.gz
- cd nagios-3.4.1.tar.gz
- cd nagios
- ./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagcmd
- make all
- make install
- make install-init
- make install-commandmode
- make install-config
- vi vi /usr/local/nagios/etc/objects/contacts.cfg
- make install-webconf
- htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin vi /usr/local/nagios/etc/objects/contacts.cfg
- cd ..
- tar zxf nagios-plugins-1.4.16.tar.gz
- cd nagios-plugins-1.4.16
- ./configure --with-nagios-user=nagios --with-nagios-group=nagios
- make && make install
- chkconfig --add nagios
- chkconfig nagios on
- chkconfig httpd on
- chkconfig mysqld on
- vi /etc/httpd/conf/httpd.conf
- service httpd start
- service nagios start
- service mysqld start
- /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
- vi ~/.bashrc
- alias check='/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg'
- source ~/.bashrc
- check
- tar zxf nrpe-2.13.tar.gz
- cd nrpe-2.13
- ./configure --prefix=/usr/local/nagios/
- make all
- make install-plugin
- netstat -lantpue
- ll /usr/local/nagios/libexec/check_nrpe
- /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
- /etc/rc.d/init.d/iptables save
- service iptables restart
- http://ip/nagios
創(chuàng)新互聯(lián)主營(yíng)香河網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,App定制開(kāi)發(fā),香河h5微信平臺(tái)小程序開(kāi)發(fā)搭建,香河網(wǎng)站營(yíng)銷(xiāo)推廣歡迎香河等地區(qū)企業(yè)咨詢(xún)