CentOS are a bit of tricky since a lot of packages are not available from standard repository. We needs to download a lot of components and build from source.
Build Naemon
Install dependencies for Naemon
1 |
yum install xorg-x11-server-Xvfb dejavu-fonts-common svn httpd-devel rpm-build doxygen wget httpd mod_fcgid perl-YAML git autoconf automake libtool rpmlint gperf mysql-devel gcc-c++ perl-Module-Install perl-CPAN gd-devel expat-devel dos2unix patch patchutils |
Enable epel repository, we need this for nagios-plugins and mod_fcgid
1 |
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm |
Install nagios-plugins and mod_fcgid
1 |
yum install nagios-plugins nagios-plugins-all nagios-plugins-nrpe nrpe mod_fcgid |
Get latest version of Naemon
1 2 |
cd /usr/local/src/ git clone --recursive https://github.com/naemon/naemon.git |
Ignore yui-compressor, are not available as a package
1 |
export THRUK_SKIP_COMPRESS=1 |
Update source (meta package may not be updated)
1 2 |
cd naemon make update |
Create compiler configuration
1 |
./configure |
Create RPM
1 |
make rpm |
Disable SELinux, not supported by Thruk
1 |
setenforce 0 |
Make it persistent
1 |
vi /etc/selinux/config |
edit row: “SELINUX=enforcing”
replace with: “SELINUX=disabled”
Install Naemon
1 2 |
cd ~/rpmbuild/RPMS/`uname -p` rpm -i naemon-core-*.rpm naemon-livestatus-*.rpm naemon-thruk-*.rpm naemon-thruk-libs-*.rpm naemon-*.rpm |
Enable new services on boot and start them
1 2 3 4 |
service iptables stop #This is just for testing and will restart the firewall after reboot, please adjust your IP-tables accordingly chkconfig httpd on && service httpd start chkconfig naemon on && service naemon start chkconfig thruk on && service thruk start |
Done!
Browse to server/naemon and use admin/admin