Monday 14 January 2013

Ubuntu setup

After a short toy with the idea that you can develop web service software for Ubunbtu on Windows7, using cygwin, VirtualBox, PuTTY etc I stopped being silly and installed Ubuntu. I had intended to dual boot, but it looks as though Ubuntu was not quite as gentle as it might have been, and Windows got in a tizzy, trying to recover disks, so I blew it away. The joy. It is worth revisiting windows occasionally to re-motivate yourself and renew your passion for opensource.

Setup general packages:

sudo apt-get remove unity-lens-shopping
# Also switch off amazon results on settings >> Privacy


sudo apt-get install openssh-server

#actually I copied these from somewhere else
ssh-keygen

sudo apt-get install git
git config --global user.name "Tim Pizey" 
git config --global user.email Tim.Pizey@psy.ox.ac.uk


sudo apt-get install openjdk-7-jdk

sudo apt-get install eclipse

sudo apt-get install emacs23-nox
sudo apt-get install cvs

sudo apt-get install jedit

sudo apt-get install curl

sudo apt-get install texlive-xetex
sudo apt-get install texlive-latex-extra

#scrollbars in eclipse
sudo su -c 'echo export LIBOVERLAY_SCROLLBAR=0 > /etc/X11/Xsession.d/80overlayscrollbars'


Setup Chrome

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update

sudo apt-get install google-chrome-stable

Setup Haskell:

sudo apt-get install ghc
sudo apt-get install libghc6-zlib-dev
sudo apt-get install cabal-install
cabal update
cabal install cabal-install
sudo apt-get install texlive
cabal install lhs2tex

Jenkins Setup

wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins

Setup BestMin packages:


sudo apt-get install pgadmin3


sudo su postgres

createuser --superuser --pwprompt dev_user

createdb dolab

exit

sudo apt-get install python

# superstition, maybe
sudo apt-get install python-dev

sudo apt-get install python-pip

sudo apt-get install python-postgresl


sudo apt-get install python-django


sudo apt-get install python-psycopg2


sudo apt-get install gnupg
sudo pip install python-gnupg
sudo apt-get install python-crypto

sudo apt-get install python-yaml


mkdir git
cd git
git clone gitosis@truecolours.nhs.uk:dolab.git

cd dolab/

sudo ln -s /home/timp/git/dolab /usr/local/dolab

./manage.py syncdb

./manage.py runserver 0:8000

Tuesday 8 January 2013

Virtualbox networking

Set up an Ubuntu server. call it psy. You should be able to ssh out from the box to the outside world. The problem is getting in.

VBoxManage modifyvm "psy" --natpf1 "guestssh,tcp,,22,,2222"
VBoxManage modifyvm "psy" --natpf1 "guesthttp,tcp,,8000,,8000"
VBoxManage modifyvm "psy" --natpf1 "guestjenkins,tcp,,80,,8080"

[],tcp|udp,[<hostip>],<hostport>,[<guestip>], <guestport>

See also http://www.virtualbox.org/manual/ch06.html. It may be that this is more effective than http://tim-pizey.blogspot.co.uk/2011/08/alfresco-setup.html