Skip to content

Instantly share code, notes, and snippets.

@alea12
Last active March 18, 2016 07:50
Show Gist options
  • Save alea12/afa22f8dd74c84c3dba8 to your computer and use it in GitHub Desktop.
Save alea12/afa22f8dd74c84c3dba8 to your computer and use it in GitHub Desktop.
setup.sh
adduser alea12
usermod -G root alea12
# disable root login
# apt tools
sudo apt-get update
sudo apt-get install -y git nginx php5-fpm php5-cli libmysqld-dev mysql-server mysql-client php5-mysql php5-intl php5-mcrypt
sudo apt-get install -y zlib1g-dev build-essential libssl-dev libreadline-dev nodejs
sudo apt-get install -y postgresql-9.3 libpq-dev
# postgres settings
sudo su postgres
# psql
# create user alea12 superuser createrole createdb replication
# create database alea12
# grant all privileges on database alea12 to alea12
# rbenv & ruby
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL -l
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
CONFIGURE_OPTS="--disable-install-rdoc" rbenv install -v 2.3.0
rbenv rehash
rbenv global 2.3.0
rbenv rehash
gem install rails --no-ri --no-rdoc
gem install puma --no-ri --no-rdoc
# vim
mkdir -p ~.vim/bundle
git clone https://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim
export TERM=xterm-256color
sudo rm ~/.vimrc
wget https://gist.githubusercontent.com/alea12/8434204/raw/395cf3d4fb848d7c952bbd417c88322328dce379/.vimrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment