Installing turbinado
This is a how to for all that want to install turbinado on a fresh Ubuntu server 8.10 with OpenSSH Server selected.
First get your distribution into a current state:
sudo su apt-get update apt-get upgrade
Install needed packages:
apt-get install libedit-dev darcs git-core libgmp3-dev zlib1g-dev postgresql postgresql-server-dev-8.3 happy make libffi-dev
Install the current 6.10.1 version of ghc, the version of the package system is currently still 6.8.2
cd /usr/local/src wget http://haskell.org/ghc/dist/6.10.1/ghc-6.10.1-i386-unknown-linux-libedit2.tar.bz2 tar xjvf ghc-6.10.1-i386-unknown-linux-libedit2.tar.bz2 cd ghc-6.10.1 ./configure make install
The next step is to install cabal:
cd /usr/local/src wget http://www.haskell.org/cabal/release/cabal-1.6.0.2/Cabal-1.6.0.2.tar.gz tar xzvf Cabal-1.6.0.2.tar.gz cd Cabal-1.6.0.2 ghc --make Setup ./Setup configure ./Setup build sudo ./Setup install
Now install the helpfull cabal-install tool, which is a package management for haskell libraries.
We can install the latest version from darcs:
cd /usr/local/src darcs get --partial http://darcs.haskell.org/cabal-install/ cd cabal-install sh bootstrap.sh
Or install the tar package:
cd /usr/local/src wget http://www.haskell.org/cabal/release/cabal-install-0.6.2/cabal-install-0.6.2.tar.gz tar xzvf cabal-install-0.6.2.tar.gz cd cabal-install-0.6.2 sh bootstrap.sh
Because we installed all packages to our home directory, we have to add this directory to our environment, we can do this by adding the path as follows:
vim /etc/environment –> Add youre local bin path and reload the path (we have to reboot anyway because of previous kernel upgrades) I had to add the following path: /root/.cabal/bin/ reboot
or:
echo "export PATH=$PATH: /root/.cabal/bin/" >> ~/.bashrc
Now we can use cabal to install libraries, but first we have to update cabal.
cabal update
Because of some problems with the cabal crypt package I had to build the crypt package directly from the repository:
cd /usr/local/src darcs get http://code.haskell.org/crypto cd crypto cabal install
Now we install the HDBC driver that allows us to connect to databases:
cd /usr/local/src wget http://hackage.haskell.org/packages/archive/HDBC/2.1.0/HDBC-2.1.0.tar.gz tar xzvf HDBC-2.1.0.tar.gz cd HDBC-2.1.0 cabal install
Now we can finally install the turbinado web server via cabal:
cd /usr/local/src git clone git://github.com/alsonkemp/turbinado-website.git cd turbinado-website cabal install
Database setup info (to be added)
We have to hide the HTTP-4000 package:
ghc-pkg hide HTTP-4000.0.4
And now we can run it:
cd /usr/local/src/turbinado-website turbinado -p 8080 -> this will start turbinado and makes it listen to port 8080
Now you can open the turbinado wesite in your favorite browser:
http://your-webserver-ip-or-name:8080/Home
+100