Skip to content

Instantly share code, notes, and snippets.

@pungoyal
Last active November 28, 2016 09:48
Show Gist options
  • Save pungoyal/7445184 to your computer and use it in GitHub Desktop.
Save pungoyal/7445184 to your computer and use it in GitHub Desktop.
Minimal dev box setup scripts
echo "export LANG=\"en_US\"" | tee -a ~/.bash_profile
echo "export LC_ALL=$LANG.UTF-8" | tee -a ~/.bash_profile
apt-get install vim curl git htop screen aptitude -y
aptitude update
aptitude upgrade -y # optional
# reboot, perhaps?
# add a non-root user
adduser puneet # fill the details
usermod -aG sudo puneet
# get dev tools
aptitude install build-essential -y
aptitude install zlib1g-dev libssl-dev openssl libreadline-dev sqlite3 libsqlite3-dev libxslt-dev libxml2-dev -y
# install jdk
aptitude install openjdk-7-jdk -y
# install docker
curl -sSL https://get.docker.com/ | sh
usermod -a -G docker puneet
su - puneet
# install rbenv
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
# install ruby
rbenv install 2.0.0-p247
rbenv global 2.0.0-p247
rbenv rehash
gem install bundler --pre
rbenv rehash
rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum update -y
yum install screen vim htop wget nginx -y
yum groupinstall "Development Tools" -y
yum install zlib-devel openssl-devel readline-devel sqlite-devel libxslt-devel libxml2-devel -y
yum --disablerepo=base,updates --enablerepo=rpmforge-extras update git -y
adduser deploy
visudo # deploy ALL=(ALL) ALL
passwd -fd deploy
su - deploy
mkdir downloads
#nodejs
cd ~/downloads
wget http://nodejs.org/dist/v0.12.2/node-v0.12.2-linux-x64.tar.gz
tar -xf node-v0.12.0-linux-x64.tar.gz
sudo mv node-v0.12.0-linux-x64 /opt/
cd /opt/
sudo ln -s node-v0.12.0-linux-x64 node
vim ~/.bashrc
echo "export PATH=\"\$PATH:/opt/node/bin\"" >> ~/.bashrc
# mongodb - http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/
#
#phantomjs
cd ~/downloads
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
tar -xf phantomjs-1.9.7-linux-x86_64.tar.bz2
sudo mv phantomjs-1.9.7-linux-x86_64 /opt/
cd /opt/
sudo ln -s phantomjs-1.9.7-linux-x86_64 phantomjs
vim ~/.bashrc
export PATH="$PATH:/opt/phantomjs/bin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment