Professional Documents
Culture Documents
How To Install Tomcat 7 On Ubuntu 12.04
How To Install Tomcat 7 On Ubuntu 12.04
How To Install Tomcat 7 On Ubuntu 12.04
04
Sign up for our newsletter for updates
How to install tomcat 7 on ubuntu 12.04
Your email address Subscribe
Tomcat ( Apache tomcat ) is an open
Follow @kriznadotcom
source web application server used to
deploy JAVA servlets and JSPs. krizna.com
This article helps you to install Tomcat 7 on Like 742
ubuntu 12.04 . This article covers 2 types
of installation: Manual and Aptget. Manual
Recent Posts
installation will install the latest version
while Aptget installation will install the Setup FTP server on centos 7
( VSFTP )
repository version.
Install tomcat 7 on ubuntu 12.04 Setup File server on ubuntu
14.04 ( Samba )
1. Manual installation ( Recommended ).
2. Aptget installation. Setup DHCP server on ubuntu
14.04
Manual installation
How to install VNC server on
You can install latest version using this method. ubuntu 14.04
Step 1 » Before installing tomcat, install java JDK by typing below command.
krizna@leela:~$ sudo aptget install openjdk6jdk How to install phpmyadmin on
centos 7
Step 2 » Download the latest tomcat version from here.
krizna@leela:~$ wget http://archive.apache.org/dist/tomcat/tomcat7/v7.0.47/bin/apachetomcat
7.0.47.tar.gz
Step 3 » Untar the package and move to /usr/local/ folder.
krizna@leela:~$ tar xvf apachetomcat7.0.47.tar.gz
krizna@leela:~$ sudo mv apachetomcat7.0.47 /usr/local/
Step 4 » Create a file tomcat747 in /etc/init.d/ and add the below code.
krizna@leela:~$ sudo vim /etc/init.d/tomcat747
#!/bin/bash
export CATALINA_HOME=/usr/local/apache-tomcat-7.0.47
PATH=/sbin:/bin:/usr/sbin:/usr/bin
start() {
sh $CATALINA_HOME/bin/startup.sh
}
stop() {
sh $CATALINA_HOME/bin/shutdown.sh
}
case $1 in
http://www.krizna.com/ubuntu/install-tomcat-7-ubuntu-12-04/ 1/5
05/01/2015 How to install tomcat 7 on ubuntu 12.04
start|stop) $1;;
restart) stop; start;;
*) echo "Run as $0 <start|stop|restart>"; exit 1;;
esac
This file will create a service named tomcat747 . please change CATALINA_HOME in
the code according to your path .
Step 5 » Modify the file permissions.
krizna@leela:~$ sudo chmod 755 /etc/init.d/tomcat747
Step 6 » Choose username and password to manage tomcat and add to
/usr/local/apachetomcat7.0.47/conf/tomcatusers.xml file in the below format.
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="krizna" password="password" roles="manager-gui,admin-gui"
This code must be within this < tomcatusers > …. < / tomcatusers > Tags
Step 7 » Now start the service .
krizna@leela:~$ sudo /etc/init.d/tomcat747 start
and type this command to start service automatically during reboot.
Ubuntu Linuxmint Jquery Fedora Centos
krizna@leela:~$ sudo updaterc.d tomcat747 defaults
Latest On Ubuntu
Step 8 » Now open http://serverip:8080 in your browser. you could see the tomcat Setup File server on ubuntu
main page and use the username and password to see other pages. 14.04 ( Samba )
Setup DHCP server on ubuntu
14.04
How to install VNC server on
ubuntu 14.04
How to setup SVN server on
ubuntu 14.04
How to configure DNS server
in ubuntu 14.04
Latest On Centos
Setup FTP server on centos 7
( VSFTP )
How to install phpmyadmin on
centos 7
How to install LAMP server on
centos 7
How to install VNC server on
Centos 7
http://www.krizna.com/ubuntu/install-tomcat-7-ubuntu-12-04/ 2/5
05/01/2015 How to install tomcat 7 on ubuntu 12.04
How to Setup network on
centos 7
That’s it .. you got latest version.
Aptget installation
You will get repository version using this method.
Step 1 » Install java JDK by typing below command.
krizna@leela:~$ sudo aptget install openjdk6jdk
Step 2 » Now Install tomcat 7 along with dependencies using the below command.
krizna@leela:~$ sudo aptget install tomcat7 tomcat7docs tomcat7examples tomcat7admin
Step 3 » Choose username and password to manage tomcat and add to
/etc/tomcat7/tomcatusers.xml file in the below format.
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="krizna" password="password" roles="manager-gui,admin-gui"
This code must be within this < tomcatusers > …. < / tomcatusers > Tags
Step 4 » Now restart the service .
krizna@leela:~$ sudo /etc/init.d/tomcat7 restart
Step 5 » Now open http://serverip:8080 in your browser. you could see the tomcat
main page and use the username and password to see other pages.
http://www.krizna.com/ubuntu/install-tomcat-7-ubuntu-12-04/ 3/5
05/01/2015 How to install tomcat 7 on ubuntu 12.04
That’s it .. good luck
1 1 0
Tweet Like
Tags: Basic guide, how to, installation, Server, setup, step by step, ubuntu
krizna.com
Like
742 people like krizna.com.
Facebook social plugin
Related Posts
» Setup File server on ubuntu 14.04 ( Samba )
» Setup DHCP server on ubuntu 14.04
» How to install VNC server on ubuntu 14.04
» How to setup SVN server on ubuntu 14.04
» How to configure DNS server in ubuntu 14.04
» Setup NFS server on ubuntu 14.04
» How to install eclipse in ubuntu 14.04
» How to install skype on ubuntu 14.04
» How to install adobe reader in ubuntu 14.04
» How to install tomcat 7 on ubuntu 14.04
http://www.krizna.com/ubuntu/install-tomcat-7-ubuntu-12-04/ 4/5
05/01/2015 How to install tomcat 7 on ubuntu 12.04
Join the discussion…
Martin Wojtuś • 10 months ago
this URL http://apache.osuosl.org/tomca... doesn't work... use
http://archive.apache.org/dist...
1 △ ▽ • Reply • Share ›
parker • 7 months ago
Really thanks for this post .
great work.. it works in the first attempt .
△ ▽ • Reply • Share ›
ALSO ON KRIZNA WHAT'S THIS?
How to Setup network on centos 7 How to setup FTP server on ubuntu
1 comment • 4 months ago 14.04 ( VSFTPD )
Fabiano Santos — This article is easier. I 13 comments • 7 months ago
was searching something like this. Thank krizna — Use d while creating
you. usernamessudo useradd m d
/var/www/john john g ftpaccess s …
How to install eclipse in ubuntu 12.04 How to install google chrome on ubuntu
18 comments • 2 years ago 14.04
Ahmed Uthumansha — To copy .desktop 3 comments • 8 months ago
file change your working directory which rbrehton — Got it working. In the terminal I
contained .desktop file and type … entered: googlechromestableChrome
opened and I right clicked on the icon …
« How to setup network on Ubuntu server 12.04 How to setup nfs server on centos 6 »
14.04 57 comments received
How to install phpmyadmin on centos 7 Setup mail server on ubuntu 14.04 (
How to install LAMP server on centos 7 Postfix dovecot )
How to install VNC server on Centos 7 36 comments received
How to Setup network on centos 7
How to install webmin on centos 6 How to install phpmyadmin on centos 6
How to setup SVN server on ubuntu 34 comments received
14.04 How to install dns server in centos 6
32 comments received
http://www.krizna.com/ubuntu/install-tomcat-7-ubuntu-12-04/ 5/5