These are the things I did to setup new VPS instances on Digital Ocean and ChicagoVPS
Update the machine
sudo apt-get update
sudo apt-get upgrade
Set locales
sudo locale-gen
sudo dpkg-reconfigure locales
add user
sudo adduser tutysra
# give sudo previliges
sudo visudo
tutysra ALL=(ALL) ALL
Install Git
sudo apt-get install git
Install sun java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Install Tor for screen scrapping
sudo apt-get install tor
sudo /etc/init.d/tor start
Make default directories
mkdir ~/swt
mkdir ~/bin
Install NX ( not necessary for CLI boxes)
export DEBIAN_FRONTEND=noninteractive
sudo -E apt-get update
sudo -E apt-get install -y ubuntu-desktop
sudo apt-get install gnome-session-fallback
wget 'http://64.34.173.142/download/3.5.0/Linux/nxclient_3.5.0-7_amd64.deb'
wget 'http://64.34.173.142/download/3.5.0/Linux/nxnode_3.5.0-9_amd64.deb'
wget 'http://64.34.173.142/download/3.5.0/Linux/FE/nxserver_3.5.0-11_amd64.deb'
sudo dpkg -i *.deb
sudo /usr/NX/bin/nxserver --status
nano /usr/NX/etc/node.cfg
# Uncomment the “DefaultXSession” line and set it to :
DefaultXSession=/etc/X11/Xsession
Enable/Disable password authentication in ssh
sudo vi /etc/ssh/sshd_config
PasswordAuthentication to "yes/no"
PermitRootLogin no
sudo service ssh restart
Install screen & tmux
sudo apt-get install screen
sudo apt-get install tmux
Install curl
sudo apt-get install curl
Install emacs and customize
sudo apt-get install software-properties-common # installs some python scripts necessary for these operations
sudo add-apt-repository ppa:cassou/emacs
sudo apt-get update
sudo apt-get install emacs-snapshot-el emacs-snapshot-gtk emacs-snapshot
export TERM=xterm-256color
Install lein
mkdir ~/bin && cd ~/bin
wget 'https://raw.github.com/technomancy/leiningen/stable/bin/lein'
Install JDK6 for neo4j
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" http://download.oracle.com/otn-pub/java/jdk/6u41-b02/jdk-6u41-linux-x64.bin
export JAVA_HOME=/home/neo4j/swt/jdk1.6/
export PATH=/home/neo4j/swt/jdk1.6/bin:$PATH
Configure swap
My ChicagoVPS runs on OpenVZ and Swap space couldn’t be enabled at VM level.
[Read More]