Last active
December 22, 2015 20:39
-
-
Save Keoven/6527654 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Tested on Elementary Luna 0.2 | |
# | |
# VM Setup: | |
# 2 Cores & 4 GB RAM | |
# | |
# Requirements: | |
# sudo apt-get install curl -y | |
# | |
# Run this script by doing the command below: | |
# | |
# > curl https://gist.github.com/Keoven/6527654/raw/elementary_setup.sh | sh | |
# | |
# Add all third party repositories | |
sudo add-apt-repository ppa:git-core/ppa -y | |
sudo add-apt-repository ppa:versable/elementary-update -y | |
sudo apt-get update -y | |
sudo apt-get upgrade -y | |
# Setup Environment | |
sudo apt-get install libcurl4-openssl-dev -y | |
sudo apt-get install git -y | |
sudo apt-get install curl -y | |
sudo apt-get install ruby -y | |
sudo apt-get install build-essential checkinstall -y | |
sudo apt-get install cvs subversion git-core mercurial -y | |
sudo apt-get install zsh -y | |
sudo apt-get install vim-gtk ack ctags rake -y | |
sudo apt-get install python-pip python-tk -y | |
sudo apt-get install tmux -y | |
sudo apt-get install libsqlite3-dev -y | |
sudo apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 -y | |
sudo apt-get install libreadline-ruby1.8 libruby1.8 libopenssl-ruby -y | |
sudo apt-get install libxslt-dev libxml2-dev -y | |
sudo apt-get install default-jdk -y | |
# Install Node.js and NPM | |
sudo apt-get install nodejs -y | |
sudo ln -s /usr/bin/nodejs /usr/bin/node | |
curl https://raw.github.com/creationix/nvm/master/install.sh | sh | |
\curl -L https://npmjs.org/install.sh | bash -s stable | |
# For now, default to 0.8.22 | |
# | |
nvm install 0.8.22 | |
nvm alias default 0.8.22 | |
# Install `libiconv` | |
# Issue this command to install nokogiri | |
# CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls" gem install nokogiri -- --with-iconv-dir=/usr/local/libiconv --with-iconv-lib=/usr/local/libiconv/lib --with-iconv-include=/usr/local/libiconv/include | |
cd ~ | |
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.11.tar.gz | |
tar -xvzf libiconv-1.11.tar.gz | |
cd libiconv-1.11/ | |
./configure --prefix=/usr/local/libiconv | |
make CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls" | |
sudo make install | |
cd ~ | |
rm -rf libiconv-1.11* | |
# Install PostgreSQL Dependency | |
sudo apt-get install postgresql libpq-dev -y | |
sudo -u postgres createuser --superuser $USER | |
## REMINDER -- You need to set password by doing: | |
# 1. `> sudo -u postgres psql postgres` | |
# 2. `# \password` | |
# 3. `\q` | |
# Install MySQL Dependency | |
sudo apt-get install libmysqlclient-dev mysql-client mysql-server -y | |
# Fixes Errors on RVM requireing autoreconf missing in path for ruby installations. | |
sudo apt-get install automake -y | |
mkdir /usr/local/src | |
sudo chown $USER /usr/local/src | |
sudo chmod u+rwx /usr/local/src | |
# Install RVM | |
\curl -L https://get.rvm.io | bash -s stable | |
## Commented out for now due to library confusion when building native extensions | |
# (http://stackoverflow.com/questions/8814924/gem-install-pg-can-not-bind-to-libpq/8874260#8874260) | |
# | |
# rvm pkg install readline --verify-downloads 1 | |
# rvm pkg install iconv --verify-downloads 1 | |
# rvm pkg install zlib --verify-downloads 1 | |
# rvm pkg install libxml2 --verify-downloads 1 | |
# rvm pkg install libxslt --verify-downloads 1 | |
# rvm pkg install openssl --verify-downloads 1 | |
sudo apt-get install libyaml-dev libxml2-dev libxslt-dev libreadline-dev -y | |
# Setup dot files | |
cd ~ | |
rvm autolibs enable | |
rvm rvmrc warning ignore all.rvmrcs | |
rvm install $(rvm list known | grep \\[ruby\-\\] | grep \\[-p | tail -1 | cut -c 8-12) | |
git clone --no-checkout git://github.com/Keoven/dotfiles.git dotfiles.tmp | |
mv dotfiles.tmp/.git . | |
git reset --hard HEAD | |
rm -rf dotfiles.tmp/ | |
# Install Oh-My-ZSh | |
cd ~ | |
rm -rf .oh-my-zsh | |
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh | |
chsh -s /bin/zsh | |
git checkout . | |
# Install Janus | |
curl -Lo- https://bit.ly/janus-bootstrap | bash | |
rm -rf .vim.old | |
# Powerline for Vim Ubuntu | |
git clone https://github.com/pdf/ubuntu-mono-powerline-ttf.git ~/.fonts/ubuntu-mono-powerline-ttf | |
fc-cache -vf | |
mkdir .janus | |
cd .janus | |
git clone git://github.com/Lokaltog/vim-powerline.git | |
cd ~ | |
git clone git://github.com/erikw/tmux-powerline.git | |
mv tmux-powerline .tmux-powerline | |
# Remove .zprofile -- use .zshrc | |
cd ~ | |
rm .zprofile | |
echo; echo Please reboot the computer... | |
sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment