Posts Tagged ‘Ubuntu’

The graph database graph.db is located at


The configuration file neo4j.conf is located at




Installing Sun Java 6 in Ubuntu 10.04

Posted: December 14, 2010 in HowTo
Tags: , , , ,

To install Sun Java 6, follow the steps below

Sun Java 6 has been moved canonical partner repository. To enable it run the below
$ sudo add-apt-repository "deb lucid partner"

Run below to update packages from recently enabled repository
$ sudo apt-get update

To install Sun Java 6 JDK, run the following
$ sudo apt-get install sun-java6-jdk

Accept the terms of agreement when asked and verify the install as below
$ java -version

To setup JRE for Firefox, a java plugin for the browser needs to installed. Run the following command to install Sun java browser plugin

$ sudo ssh apt-get install sun-java6-plugin

Once the install is complete, click on verify now to check the installation.

Setting up Tomcat 6 in Ubuntu 10.04

Posted: September 14, 2010 in HowTo
Tags: , , , ,

Ubuntu Server: 10.04 LTS
Tomcat: 6.0.29

Step 1: Download apache-tomcat-6.0.29.tar.gz from
$ wget <download url>
download url –

Step 2: Extract the tar file
$ tar xvf apache-tomcat-6.0.29.tar.gz

Step 3: Copy the extracted contents to /usr/local
$ sudo cp apache-tomcat-6.0.29.tar.gz /usr/local

Step 4: Create a softlink as tomcat
$ sudo ln -s apache-tomcat-6.0.29.tar.gz tomcat

Step 5: Add tomcat user
useradd -d /home/tomcat -s /bin/bash -m tomcat

Step 6: Change permissions to tomcat
$ sudo chown -R tomcat:tomcat /usr/local/apache-tomcat-6.0.29.tar.gz
$ sudo chown -R tomcat:tomcat /usr/local/tomcat

Step 7: Setup users in tomcat
$ cd /usr/local/tomcat
$ sudo vi conf/tomcat-users.xml
Add the following
<role rolename="tomcat"/>
<role rolename="admin"/>
<role rolename="manager"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="admin" password="admin" roles="admin,manager"/>

Step 8: Setup start/stop scripts
$ sudo vi /home/tomcat/tomcat
Add the following
case $1 in
sh /usr/local/tomcat/bin/
sh /usr/local/tomcat/bin/
sh /usr/local/tomcat/bin/
sh /usr/local/tomcat/bin/
echo "Usage: $0 {start|stop|restart}"
exit 0

Change permissions on tomcat script
$ chmod ug+x tomcat

Step 9: Start/Stop/Restart Tomcat
To start
$ ./tomcat start

To stop
$ ./tomcat stop

To restart
$ ./tomcat restart

Step 10: Test setup
After starting tomcat, go to Internet browser and type in
tomcatmachine – servername or ip address of the machine where the tomcat was just setup.

User add/delete in Ubuntu 10.04

Posted: September 13, 2010 in HowTo
Tags: , ,

Adding a user:
sudo useradd -d /home/<username> -s /bin/<shell> -m <username>

shell – sh for shell, bash for bourne shell and ksh for korn shell

$ sudo useradd -d /home/tomcat -m tomcat -s /bin/bash

Deleting a user:
sudo userdel <username>

$ sudo userdel tomcat