Install Sonar – Tomcat

SONAR Installation de TomcatWe have seen how to install a JDK in our environment (Windows 7 Professional Edition), we will now look at how to install Tomcat.

But first, what is Tomcat? As before, I will not go into a detailed description of each tool that we install, you can find all the literature you want on Internet.

Let’s just say that Tomcat is an application server, which will allow us to use different components of our platform of code analysis, such as SONAR and Jenkins.

There are several ways to use and thus install Tomcat. Our choice will be to use Tomcat as a Windows service. Personally, this is what I find the most simple, the most flexible and easiest way to use it.

Downloading Tomcat

I have downloaded Tomcat directly through this link: A download window appears, allowing you to specify where you want to save the file to install Tomcat.

Installing Tomcat

Once this executable file has been downloaded, we launch it to install Tomcat. This first page appears:

Sonar Install - Tomcat

Click the ‘Next’ button to continue and see a page that asks us to accept the Apache license …

Sonar Install - Tomcat

… which we do by clicking the button ‘I Agree’.

The next page asks us to choose which Tomcat components we want to install:

Sonar Install - Tomcat

We will let the default options. The ‘Next’ button leads to a configuration window:Sonar Install - Tomcat

I change the (HTTP) port to connect to Tomcat with the value ‘8888’. For what reason? In fact, I am used to do it because some software (Oracle for instance) had previously the bad practice to use the default 8080 port. You can leave this value or otherwise do as I do and change it, but it is not mandatory.

Then enter a login for the Tomcat Administrator. I do simple: user / password = admin / admin. If you decide to install Tomcat on a server accessible from the network by different people or teams, you can choose other login settings, but for a local installation on our workstation, no need to do it complicated to remember.

Sonar Install - Tomcat

Tomcat also asks us where is located the JVM (Java Virtual Machine) and our JRE. We have seen these concepts in our previous post about ‘how to install a JDK‘.

And finally, Tomcat will ask us in which directory we want it to be installed:

l'installation d'un JDK

Again, I suggest you let the default installation directory: in case of trouble, any person to whom you could ask for help will first check in this directory and could think that Tomcat is not installed if found empty.

Finally, a click on the button ‘Install’ starts the installation, which goes very quickly.

Launching Tomcat

Tomcat is installed as a Windows service. A Windows service is simply an application launched (or not) by Windows at startup. To view and configure the Tomcat service, the easiest way is to type ‘Services’ in the search bar of the Windows programs, which appears when you click on ‘Start’ or press the ‘Windows’ key on your keyboard.

Windows will then offer you different choices, including a program called ‘View local services’. It is also available via the Control Panel, but it is more difficult to find in this way. In addition, our research allows us to drag-and-drop this program to an icon in the main screen / folder of Windows. I thus call these services with a single click on this icon, and stop / start them whenever I need.Tomcat en Service Windows

Once launched the Services window, we find the Tomcat we just have installed.

Right click on a service allows us to access to the ‘Properties’ screen from the contextual menu, and define the startup mode of the service, or stop and / or start it. It is an operation that we may need to make quite often, especially for the installation of new applications as SONAR and Jenkins.

We must also wait to install them to see a little more how Tomcat works.

But first, we will need a database. This will be the topic of the next post dedicated to Oracle installation. In the meantime, have a good week!


Leave a Reply

Your email address will not be published. Required fields are marked *