Category: Java

Installing Tomcat 7 on Ubuntu 10.04

Posted by Radoslav Bogdanovic - 2011/04/08 - Java, Linux
0

After one have installed JDK 6 then do following steps to install Tomcat 7

wget http://apache.dataphone.se/tomcat/tomcat-7/v7.0.12/bin/apache-tomcat-7.0.12.tar.gz
tar xvfz apache-tomcat-7.0.12.tar.gz
sudo mv apache-tomcat-7.0.12 /usr/local/tomcat7

For autostart create following script in /etc/init.d

sudo vi /etc/init.d/tomcat7

Paste in the following

# Tomcat auto-start
#
# description: Auto-starts tomcat 7
# processname: tomcat7
# pidfile: /var/run/tomcat.pid 

export JAVA_HOME=/usr/lib/jvm/java-6-sun 

case $1 in
start)
        sh /usr/local/tomcat7/bin/startup.sh
        ;;
stop)
        sh /usr/local/tomcat7/bin/shutdown.sh
        ;;
restart)
        sh /usr/local/tomcat7/bin/shutdown.sh
        sh /usr/local/tomcat7/bin/startup.sh
        ;;
esac
exit 0

Save the file and set executable permissions

sudo chmod 755 /etc/init.d/tomcat7

Link the startup script to startup folders

sudo ln -s /etc/init.d/tomcat7 /etc/rc1.d/K99tomcat
sudo ln -s /etc/init.d/tomcat7 /etc/rc2.d/S99tomcat

Finally test to start

sudo /etc/init.d/tomcat7 start

Now  open url http://yourserver.com:8080/

Almost the complete description of this installation was taken from the blog post http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/ but adapted to Tomcat 7. It turns out that it works perfectly for Tomcat 7 as well as Tomcat 6.

It might seem as a bit unnecessary to duplicate most of the steps from an already existing blog post. However this is more for my own reference and on occasion blogs and useful posts disappear.

Installing Oracle (Sun) JDK 6 on Ubuntu 10.04

Posted by Radoslav Bogdanovic - 2011/04/08 - Java, Linux
0

To install Oracle (Sun) JDK 6 on Ubuntu do the following steps

First to get the add-apt-repository support do the following command
sudo apt-get install python-software-properties

Then

sudo add-apt-repository ppa:sun-java-community-team/sun-java6
sudo apt-get update
sudo apt-get install sun-java6-jdk
# to set this as default java version
sudo update-java-alternatives -s java-6-sun 

Finally do a test with java -version

Almost the complete description of this installation was taken from the blog post http://thilina.gunarathne.org/2011/02/installing-sun-oracle-jdk-6-on-ubuntu.html

These steps were successfully executed on Ubuntu 10.04 64-bit. However in the original post this was done on Ubuntu 10.10.

It might seem as a bit unnecessary to duplicate most of the steps from an already existing blog post. However this is more for my own reference and on occasion blogs and useful posts disappear.

Functional Java

Posted by Radoslav Bogdanovic - 2009/11/19 - Java
1

Today a collegue of mine sent me a link to this site called Functional Java. This is something that is really “cool” according to my collegue. I definetly need to check this out.