Skip to content

Instantly share code, notes, and snippets.

@liverbool
Last active November 16, 2015 03:50
Show Gist options
  • Save liverbool/50e60a9c7aaca25d4ea7 to your computer and use it in GitHub Desktop.
Save liverbool/50e60a9c7aaca25d4ea7 to your computer and use it in GitHub Desktop.
intb-dev-env
#!/bin/bash
locale-gen en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
echo 'Asia/Bangkok' | sudo tee /etc/timezone
apt-get update
apt-get install -y python-software-properties curl zsh git nodejs npm ruby-dev gem && \
gem install sass --pre && \
gem install compass --pre && \
npm install -g bower && \
npm install -g grunt-cli && \
npm install -g coffee-script && \
npm install -g gulp
ln -s /usr/bin/nodejs /usr/bin/node
add-apt-repository ppa:ondrej/php5-5.6 -y && \
apt-get update && apt-get -y upgrade && \
apt-get install -y php5-curl php5-cli php5-mcrypt php5-mysql php5-intl php5-redis && \
sed -i 's/;date.timezone =/date.timezone = Asia\/Bangkok/g' /etc/php5/cli/php.ini
curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer
mkdir -p /var/www/tum && \
mkdir -p /var/www/yok && \
mkdir -p /var/www/fah && \
mkdir -p /var/www/boon && \
chown -R www-data:www-data /var/www && \
chmod -R 0774 /var/www
sudo install -o root -g root -m 0600 /dev/null /swapfile
dd if=/dev/zero of=/swapfile bs=1k count=2048k
mkswap /swapfile
swapon /swapfile
echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab
sudo sysctl -w vm.swappiness=10
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment