Last active
August 29, 2015 13:57
-
-
Save dannysmith/9901098 to your computer and use it in GitHub Desktop.
Set Up Sparta UNIX Server
This file contains 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
# Set up ssh password for easy access. | |
# http://cs.sru.edu/~zhou/linux/howto/sshpasswd.html | |
# Set up remote Sublime Text | |
# Install rsub package in ST3 | |
printf "Host *\n RemoteForward 52698 127.0.0.1:52698" >> ~/.ssh/config | |
ssh -X root@XXXXXXXXX | |
sudo wget -O /usr/local/bin/subl https://raw.github.com/aurora/rmate/master/rmate; sudo chmod +x /usr/local/bin/subl | |
# Install dependancies | |
apt-get update | |
apt-get upgrade | |
apt-get install git libssl-dev build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev autoconf libc6-dev ncurses-dev automake libtool node ack | |
# Install rbenv | |
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
# Add rbenv to the path | |
echo '# rbenv setup - only add RBENV PATH variables if no single user install found' > /etc/profile.d/rbenv.sh | |
echo 'if [[ ! -d "${HOME}/.rbenv" ]]; then' >> /etc/profile.d/rbenv.sh | |
echo ' export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh | |
echo ' export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh | |
echo ' eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh | |
echo 'fi' >> /etc/profile.d/rbenv.sh | |
chmod +x /etc/profile.d/rbenv.sh | |
# Install ruby-build globally (rather than as a plugin see ruby-build README): | |
pushd /tmp | |
rm -rf /tmp/ruby-build | |
git clone git://github.com/sstephenson/ruby-build.git | |
# Check if clone succesful | |
if [ $? -gt 0 ]; then | |
echo >&2 "Error: Git clone error! See above."; | |
exit 1; | |
fi | |
cd ruby-build | |
./install.sh | |
popd | |
# Install rehash plugin | |
mkdir /usr/local/rbenv/plugins | |
cd /usr/local/rbenv/plugins | |
git clone git://github.com/sstephenson/rbenv-gem-rehash.git | |
# Restart the shell | |
exec $SHELL -l | |
rbenv install 1.9.3-p484 | |
rbenv install 2.0.0-p353 | |
rbenv install 2.1.1 | |
rbenv rehash | |
rbenv global 2.0.0-p353 | |
ruby -v | |
gem update --system | |
gem install bundler hirb wirble bundler pry pry-nav | |
# Install Redis (http://vvv.tobiassjosten.net/linux/installing-redis-on-ubuntu-with-apt/) | |
echo "# /etc/apt/sources.list.d/dotdeb.org.list" > /etc/apt/sources.list.d/dotdeb.org.list | |
echo "deb http://packages.dotdeb.org squeeze all" >> /etc/apt/sources.list.d/dotdeb.org.list | |
echo "deb-src http://packages.dotdeb.org squeeze all" >> /etc/apt/sources.list.d/dotdeb.org.list | |
wget -q -O - http://www.dotdeb.org/dotdeb.gpg | sudo apt-key add - | |
apt-get update | |
apt-get install redis-server | |
# X Forwarding | |
st /etc/ssh/ssh_config # enable ForwardX11 yes and ForwardX11Trusted yes | |
apt-get install gedit xterm nautilus vlc | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment