Skip to content

Instantly share code, notes, and snippets.

@hawkup
Last active August 29, 2015 14:23
Show Gist options
  • Save hawkup/5613879423a8598bb146 to your computer and use it in GitHub Desktop.
Save hawkup/5613879423a8598bb146 to your computer and use it in GitHub Desktop.
Install Apache Tomcat 7 on Ubuntu 14.04
sudo apt-get update
sudo apt-get install -y tomcat7
sudo apt-get install -y tomcat7-admin
sudo apt-get install -y tomcat7-docs
sudo apt-get install -y tomcat7-examples 

Now You can access http://localhost:8080

Create Tomcat User

sudo gedit /etc/tomcat7/tomcat-users.xml

add this to file

<role rolename="manager-gui" />
<user username="tomcat" password="s3cret" roles="manager-gui" /> 

You can access http://localhost:8080/manager/html

This section for dev on this machine

  • Install JDK
https://gist.github.com/hawkup/3f60546650d5e3f96824
  • Install Apache Ant
sudo apt-get install -y ant
  • Install Eclispe download tar.gz file from
http://www.eclipse.org/downloads/

extract to /opt

cd /opt/ && sudo tar -zxvf ~/Downloads/eclipse-*.tar.gz

create shortcut

sudo gedit /usr/share/applications/eclipse.desktop

and copy this to eclipse.desktop file

[Desktop Entry]
Name=Eclipse 4
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse

restart tomcat

sudo /etc/init.d/tomcat7 restart

stop tomcat

sudo /etc/init.d/tomcat7 stop

referrence:

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