How to install Apache and Tomcat onto Ubuntu server

Posted on 2010-09-03
Last Modified: 2013-12-02
How to install Apache and Tomcat onto Ubuntu server
Question by:1030071002
LVL 83

Accepted Solution

Dave Baldwin earned 300 total points
ID: 33598268
Follow the directions on this page:  I recommend you use the builtin commands to do this because you will get a version configured for Ubuntu.  Something like : sudo apt-get install apache2

And here's a page on Tomcat:

Author Comment

ID: 33598770
one more question for this 500 points good job answer is good
is there any way to refrence a microsoft server 2005 on a different machine from ubuntu
I dont want mysql
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 300 total points
ID: 33598843
Yes, you can access Microsoft SQL Server 2005 thru PHP and probably other languages but it must be running on a different machine because it requires Windows to run.  I don't know about accessing it thru JSP on Linux.  The SQL Server must be set up with a user that is allowed to remotely access it and the database you want to use.
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!


Author Comment

ID: 33614313
where do I put the source code for the website when I install apache and tomcat
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 300 total points
ID: 33614374
I don't really know.  You'll have to ask someone else about that.

Assisted Solution

andrel39 earned 100 total points
ID: 33621843
The website for Apache defaults to /var/www/

Just create a folder within that directory and then add that name to the end of your URL

mkdir /var/www/aspdev

URL: http://webserver/aspdev/

There is a more complicated way to create the source code anywhere and have Apache link to it buts that's pretty advanced stuff. I have not dealt with Tomcat.

LVL 26

Assisted Solution

arober11 earned 100 total points
ID: 33632232
As to where you stick your html / deploy your Webapps, the directories are specified by two environment variable:

DocumentRoot     =  Apache HTTPD base directory, probably /var/www/htdocs, you'll probably find the variable in a /etc/apache*/*.conf file

CATALINA_HOME  =  Apache Tomcat base directory, applications are deployed into the "webapps" directory off this directory, may be set to "/usr/share/tomcat", you'll probably find the variable set in /etc/tomcat*/tomcat*.conf

The location of the configuration files / CATALINA_HOM can be verified through the following commands:

ps -ef | egrep "httpd|java"
grep DocumentRoot    /etc/apache2/*
grep CATALINA_HOME /etc/tomcat*/*

As to "refrence a microsoft server 2005" I'm guessing you are asking how you connect a Tomcat Web application to a MS SQL Server database. For a start you'll need to download the appropriate JDBC driver (.jar) and drop it into you application lib directory, tweak the applications context and bounce (stop/start) the Tomcat, see:

May also be of use:

Author Comment

ID: 33818952
still working on it

Author Closing Comment

ID: 33968317

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Use tracing facilities in your browser steps 2 117
thymeleaf natural templating vs JSP 2 95
jdbc error in jsp application 20 44
runtime exception 2 27
Users are often faced with high disk consumption without really knowing where the largest amount of data resides. Disk Usage Analyzer (aka Baobab) is is a graphical, menu-driven application to analyse disk usage in any Gnome environment and can e…
Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now