Skip to content

Instantly share code, notes, and snippets.

@sirleech
Created February 8, 2012 05:05
Show Gist options
  • Save sirleech/1765586 to your computer and use it in GitHub Desktop.
Save sirleech/1765586 to your computer and use it in GitHub Desktop.
Installing Java and Tomcat6 on Ubuntu 11.10

#Java and Tomcat6 on Ubuntu

Versions Tested: 10.04/11.10

##Web Apps Path:

/var/lib/tomcat6/webapps/

Development Tools

openssh-server
git-core vim ant maven2 tree

Java and Tomcat

openjdk-6-jre-headless openjdk-6-jdk
tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples

Admin account

To enable admin web based features add the following lines to your /var/lib/tomcat6/conf/tomcat-users.xml

<role rolename="manager"/>
<role rolename="admin"/>
<user name="chris" password="yourpass" roles="manager,admin"/>

# sudo service tomcat6 restart

##Deploy from GWT war/ Output Directory to Tomcat

Rsync deployment example

sudo rsync -va /home/chris/Dev/WaterRestrictions/WaterRestrictions/war/ /var/lib/tomcat6/webapps/
sudo service tomcat6 start

http://localhost:8080

##To start, stop, restart and get the server status

# Start tomcat server

sudo /etc/init.d/tomcat6 start

# Stop tomcat server

sudo /etc/init.d/tomcat6 stop

# Restart tomcat server

sudo /etc/init.d/tomcat6 restart

# Get tomcat server status

sudo /etc/init.d/tomcat6 status

After installation type http://localhost:8080 or http://serverip:8080/examples/servlets/ in your browser.Now you should see tomcat welcome page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment