Last active
January 4, 2016 03:28
-
-
Save cabloo/43d4d1c54859e4382827 to your computer and use it in GitHub Desktop.
Debian Necessities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "# Disable IPV6" >> /etc/sysctl.conf | |
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf | |
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf | |
echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf | |
echo "net.ipv6.conf.eth0.disable_ipv6 = 1" >> /etc/sysctl.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "deb http://packages.dotdeb.org wheezy-php55 all" >> /etc/apt/sources.list | |
echo "deb-src http://packages.dotdeb.org wheezy-php55 all" >> /etc/apt/sources.list | |
curl http://www.dotdeb.org/dotdeb.gpg | apt-key add - | |
apt-get update | |
apt-get install -y php5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /tmp | |
curl https://files.phpmyadmin.net/phpMyAdmin/4.5.3.1/phpMyAdmin-4.5.3.1-all-languages.tar.gz > pma.tgz | |
tar -zxvf pma.tgz | |
mkdir -p /var/www | |
mv phpMyAdmin* /var/www/pma |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -sL https://deb.nodesource.com/setup_5.x | bash - | |
apt-get install -y nodejs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install -y pear php5-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install libmysqlclient-dev libsnmp-dev | |
ln -s /usr/lib/x86_64-linux-gnu/libmysqlclient* /usr/lib | |
cd /tmp | |
wget http://downloads.sourceforge.net/project/rtg/rtg/0.7.4/rtg-0.7.4.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Frtg%2F&ts=1451877900&use_mirror=skylineservers -O rtg.tar.gz | |
tar -zxvf rtg.tar.gz | |
cd rtg-0.7.4 | |
./configure && make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
apt-get install -y vim git sudo build-essential curl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# /etc/init.d/rtgpoll | |
# | |
### BEGIN INIT INFO | |
# Provides: rtgpoll | |
# Required-Start: mysql | |
# Required-Stop: mysql | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Poll RTG targets for bandwidth at boot | |
# Description: Poll RTG targets for bandwidth at boot and store it in MySQL database | |
### END INIT INFO | |
case "$1" in | |
start) | |
echo "Starting RTG Poll" | |
/usr/local/rtg/bin/rtgpoll -c /usr/local/rtg/etc/rtg.conf -t /usr/local/rtg/etc/targets.cfg | |
;; | |
stop) | |
echo "Stopping RTG Poll" | |
kill -9 $(cat /tmp/rtgpoll.pid) | |
;; | |
restart) | |
echo "Stopping RTG Poll" | |
kill -9 $(cat /tmp/rtgpoll.pid) | |
sleep 1 | |
echo "Starting RTG Poll" | |
/usr/local/rtg/bin/rtgpoll -c /usr/local/rtg/etc/rtg.conf -t /usr/local/rtg/etc/targets.cfg | |
;; | |
reload) | |
echo "Reloading RTG Targets file" | |
kill -HUP $(cat /tmp/rtgpoll.pid) | |
;; | |
*) | |
echo "Usage: /etc/init.d/rtg {start|stop|restart|reload}" | |
exit 1 | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment