2019年6月18日 星期二

Install Nagios Core from tar ball on CentOS 7 / RHEL 7 03_install nagios

03_install nagios

1

##look DOC
參考文件
##https://www.itzgeek.com/how-tos/linux/centos-how-tos/monitor-centos-7-rhel-7-using-nagios-4-0-7.html

#  01 安裝需要的軟體
yum groupinstall "Development Tools" -y
yum -y install wget httpd php gcc glibc glibc-common wget perl gd gd-devel unzip zip

## 2 建立帳號

useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache

## 3 下載nagios  4.4.2

cd /tmp/
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.4.2.tar.gz
tar -zxvf /tmp/nagios-4.*.tar.gz
cd /tmp/nagios-4.*

## 4  安裝
./configure --with-nagios-group=nagios --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
make install-exfoliation

## 5  設定密碼
htpasswd -c -b /usr/local/nagios/etc/htpasswd.users nagiosadmin nagiosadmin


# 安裝 plugings

cd /tmp
wget https://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz
tar -zxvf /tmp/nagios-plugins-*.tar.gz
cd /tmp/nagios-plugins-*/

./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install


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


systemctl restart httpd  nagios
systemctl enable httpd  nagios

===

沒有留言:

RHEL install EPEL

  https://www.linuxtechi.com/install-epel-repo-on-rhel-system/ EPEL dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest...