Created
December 11, 2011 06:14
-
-
Save jatkins/1458776 to your computer and use it in GitHub Desktop.
A simple way to setup servers
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/bash | |
apt-get install -y sudo build-essential vim zlib1g-dev | |
/usr/sbin/groupadd wheel | |
/usr/sbin/usermod -a -G wheel jacob | |
chmod +w /etc/sudoers | |
echo "%wheel All=(ALL) ALL" >> /etc | |
chmod -w /etc/sudoers | |
cd /etc | |
wget https://raw.github.com/gist/1458701/528689476c46e46aa7dcd5906010d65d6c2867e4/iptables.rules.up | |
sbin/iptables-restore < /etc/iptables.up.rules | |
cd /etc/network/if-pre-up.d/ | |
echo '#!/bin/sh' > iptables | |
echo '/sbin/iptables-restore < /etc/iptalbes.up.rules' >> iptables | |
chmod +x iptables | |
cd /tmp | |
wget http://git-core.googlecode.com/files/git-1.7.8.tar.gz | |
tar -xf git-1.7.8.tar.gz | |
cd git-1.7.8 | |
./configure --prefix=/usr/local --without-tcltk | |
make && make install | |
apt-get install -y apache2 apache2.2-common apache2-mpm-prefork apache2-utils libexpat1 ssl-cert | |
cd /var/www | |
echo "<html>" > index.html | |
echo "<center><h1>$(hostname)</h1></center>" >> index.html | |
echo "</html>" >> index.html | |
apt-get install -y libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd \ | |
php5-imagick php5-mcrypt php5-memcache php5-mhash php5-mysql php5-pspell php5-snmp \ | |
php5-sqlite php5-xmlrpc php5-xsl | |
/etc/init.d/apache2 restart | |
useradd -d /home/photofs -s /bin/bash -m photofus |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment