58 lines
2.9 KiB
Bash
Executable File
58 lines
2.9 KiB
Bash
Executable File
#!/bin/bash
|
|
set -eux
|
|
|
|
ROOT="$(dirname `readlink -f $0`)"
|
|
|
|
. "${ROOT}"/functions.sh
|
|
|
|
# Puppet manifests
|
|
# Dependency for PHP-FPM
|
|
PHPFPM_TARBALL_URL="https://forgeapi.puppetlabs.com/v3/files/Slashbunny-phpfpm-0.0.8.tar.gz"
|
|
|
|
RPM_REPO="${ROOT}"/repositories/centos/
|
|
DEB_REPO="${ROOT}"/repositories/ubuntu/
|
|
mkdir -p $RPM_REPO
|
|
mkdir -p $DEB_REPO
|
|
|
|
# Downloads needed RPM or DEB packages
|
|
function download {
|
|
case "$1" in
|
|
deb) REPO=$DEB_REPO;;
|
|
rpm) REPO=$RPM_REPO;;
|
|
esac
|
|
shift
|
|
|
|
while [ $# -gt 0 ]; do
|
|
FILE=$(basename "$1")
|
|
wget -qO - $1 > "$REPO/$FILE"
|
|
shift
|
|
done
|
|
}
|
|
|
|
download deb http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix/zabbix-agent_2.4.7-1+trusty_amd64.deb \
|
|
http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix/zabbix-frontend-php_2.4.7-1+trusty_all.deb \
|
|
http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix/zabbix-server-mysql_2.4.7-1+trusty_amd64.deb \
|
|
http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix/zabbix-sender_2.4.7-1+trusty_amd64.deb \
|
|
http://repo.zabbix.com/zabbix/2.4/ubuntu/pool/main/z/zabbix/zabbix-get_2.4.7-1+trusty_amd64.deb \
|
|
http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-mysql_5.5.9+dfsg-1ubuntu4.14_amd64.deb \
|
|
http://archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-common_5.5.9+dfsg-1ubuntu4.14_amd64.deb \
|
|
http://archive.ubuntu.com/ubuntu/pool/universe/p/php5/php5-fpm_5.5.9+dfsg-1ubuntu4.14_amd64.deb \
|
|
http://archive.ubuntu.com/ubuntu/pool/universe/n/net-snmp/libsnmp-perl_5.7.2~dfsg-8.1ubuntu3.1_amd64.deb \
|
|
http://archive.ubuntu.com/ubuntu/pool/universe/s/snmptt/snmptt_1.4-1_all.deb \
|
|
http://archive.ubuntu.com/ubuntu/pool/universe/libs/libsmi/smistrip_0.4.8+dfsg2-8ubuntu2_all.deb \
|
|
http://archive.ubuntu.com/ubuntu/pool/multiverse/s/snmp-mibs-downloader/snmp-mibs-downloader_1.1_all.deb \
|
|
http://archive.ubuntu.com/ubuntu/pool/universe/i/iptstate/iptstate_2.2.5-1_amd64.deb
|
|
|
|
|
|
download rpm http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-agent-2.4.7-1.el6.x86_64.rpm \
|
|
http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-server-2.4.7-1.el6.x86_64.rpm \
|
|
http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-server-mysql-2.4.7-1.el6.x86_64.rpm \
|
|
http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-web-2.4.7-1.el6.noarch.rpm \
|
|
http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-web-mysql-2.4.7-1.el6.noarch.rpm \
|
|
http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-sender-2.4.7-1.el6.x86_64.rpm \
|
|
http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-get-2.4.7-1.el6.x86_64.rpm \
|
|
http://mirror.centos.org/centos/6/os/x86_64/Packages/iptstate-2.2.2-4.el6.x86_64.rpm
|
|
|
|
# Install puppet manifests
|
|
download_puppet_module "phpfpm" "$PHPFPM_TARBALL_URL"
|