icinga2/tools/vagrant-bootstrap.sh

38 lines
1.0 KiB
Bash
Raw Normal View History

2013-10-10 14:57:17 +02:00
#!/bin/sh
sed -i 's/^HOSTNAME=.*/HOSTNAME=icinga-demo.icinga.org/' /etc/sysconfig/network
hostname icinga-demo.icinga.org
2013-10-10 17:54:25 +02:00
yum install -y wget
2013-10-10 14:57:17 +02:00
rpm --import http://packages.icinga.org/icinga.key
wget http://packages.icinga.org/epel/6/snapshot/ICINGA-snapshot.repo -O /etc/yum.repos.d/ICINGA-snapshot.repo
yum makecache
yum install -y httpd
yum install -y --nogpgcheck icinga2 icinga2-classicui-config icinga-gui
2013-10-10 14:57:17 +02:00
chkconfig httpd on
chkconfig icinga2 on
2013-10-10 19:08:09 +02:00
# Remove once packages are fixed
chkconfig icinga off
2013-10-10 14:57:17 +02:00
/etc/init.d/icinga stop
/etc/init.d/icinga2 stop
wget http://ftp-stud.hs-esslingen.de/pub/epel/6/i386/epel-release-6-8.noarch.rpm -O /tmp/epel.rpm
yum install -y /tmp/epel.rpm
rm -f /tmp/epel.rpm
yum install -y nagios-plugins-all
i2enfeature statusdat
i2enfeature compat-log
i2enfeature command
2013-10-10 19:08:09 +02:00
# 4845
sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/sysconfig/selinux
setenforce Permissive
2013-10-10 14:57:17 +02:00
/etc/init.d/httpd start
/etc/init.d/icinga2 start
iptables -I INPUT 2 -m tcp -p tcp --dport 80 -j ACCEPT
/etc/init.d/iptables save