My setup script for Ubuntu. Feel free to checkout and modify it for your needs.