Saturday, June 26, 2010

Prevent apache2 from starting at boot time.

Apache2 server in my Ubuntu machine was used to start at each time I boot the Ubuntu. I found it recently and realized the reason which made me feel that machine is slow than the past days. Therefore I removed apache2 from the starting up at boot time by giving this command.

sudo update-rc.d -f apache2 remove

Tuesday, June 15, 2010

Installing Contiki and Cooja Simulator in UBUNTU

About a week ago, I thought to install TikiriDB and tryout it. To use it I have to install Contiki operating system and the cooja simulator which are the platform to run TikiriDB. Started from reading the tikiriDB home page (http://score.ucsc.lk/projects/tikiridb). There's a link provided in that page which shows how to install contiki and cooja in Ubuntu 8.10 (installing contiki/cooja). However I'm running Ubuntu 10.04 Lucid and it works. The only issue is if your going to install netsim simulator provided with contiki, your in trouble because the required package (libgtk1.2-dev) is not supporting to Ubuntu 9.04 and 10.04 as I know. By the way, I forget netsim and advanced to all the other things.
Here we go,

1. I had to install CVS to get the CVS version of Contiki,

sudo apt-get install cvs

2. Got the contiki source,

cvs -z3 -d:pserver:anonymous@contiki.cvs.sourceforge.net:/cvsroot/contiki co contiki-2.x

3. There is an example directory in the Contiki source which contains some example codes. To compile the hello-world example,

cd contiki-2.2.2/examples/hello-world

make TARGET=native

./hello-world.native

4. After testing that hello world example I cleaned the temporary files during the compilation,

make clean

5. Now contiki is ok. Then I needed java, since the cooja is a java based simulator,

sudo apt-get install sun-java6-jdk

6. To compile cooja I needed ant which is a compile tool,

sudo apt-get install ant

7. To compile and start cooja I gave the commands,

cd tools/cooja

ant run

8. To remove all the temporary files created during the compilation,

ant clean

After these steps cooja was started and I was exited by the facilities given in cooja. Then I stopped working on it and hope to complete the further configuration steps of cooja later.