Skip to content

Instantly share code, notes, and snippets.

@dangjlin
Last active February 21, 2017 09:55
Show Gist options
  • Save dangjlin/2dd09f80d114e54b54be89ce8b9c6336 to your computer and use it in GitHub Desktop.
Save dangjlin/2dd09f80d114e54b54be89ce8b9c6336 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# usage: curl -L https://gist.githubusercontent.com/dangjlin/2dd09f80d114e54b54be89ce8b9c6336/raw/b5eb841f9989609c1c6d19c1b47cdca416435509/init_install.sh | sh
# Pre-requisites
sudo apt-get -y update
sudo timedatectl set-timezone Asia/Taipei
sudo apt-get --no-install-recommends -y install git-core zlib1g zlib1g-dev libxml2-dev libxslt-dev libc6-dev ncurses-dev automake libtool subversion pkg-config
#from digital ocean suggestion
sudo apt-get --no-install-recommends -y install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
#important normal use package
sudo apt-get --no-install-recommends -y install htop tree openssl curl vim imagemagick
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
# install rbenv
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
# Updating rbenv
#cd ~/.rbenv
#git pull
# Download and compile Ruby 2.0.0-p0
#cd /tmp
#wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
#tar -xvzf ruby-2.0.0-p0.tar.gz
#cd ruby-2.0.0-p0
#./configure --prefix=/usr/local
#make
#make install
# install Chef
cd /tmp
curl -L https://www.opscode.com/chef/install.sh |sudo -E bash -
# The rest
#sudo gem install ruby-shadow --no-ri --no-rdoc
echo "======================================="
echo "========= please run source ~/.bashrc manually ========="
echo "========= then contirnue run sh rbenv_init.sh ============"
echo "curl -L https://gist.githubusercontent.com/dangjlin/f57d8713352bfc8b0d35c31327658790/raw/efe262d3c030fa32d479b2eb9d852b41edc736d8/rbenv_init.sh | sh "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment