Installing Maven, Tomcat and MySQL in Windows 10

·

3 min read

Before learning Spring frameworks we need to install maven, tomcat and MySQL. This blog gives a comprehensive guide via step by step process to install the three mentioned.

Installing maven on Windows

Before installing start by searching maven in your system. For this repeat the following steps

1 . Open command prompt 2 . Search the following mvn --version and hit enter 3. You will get a message

If the message states that 'mvn is not recognized', it means windows needs maven installation.

Installation

Go to Google and search for Maven. The first link is usually of Apache Maven. Click on it. In case you don't find APache Maven, click this link

Click on the installation link. Under the files section you will see the 4 options, we are interested in 'Binary zip archive'. Click on it and it will be downloaded. Extract the folder into any folder, rename it to maven and copy the full path of the folder named maven.

Follow these steps for Windows 10.

Now open Control System > System Settings > About > Advanced System Settings > Environment Variables

Click on new. An name it M2_HOME. Then add the path of the folder that you copied after extracting the downloaded files.

M2_HOME - path

After this click save.

Click new again and name it M2 and give it %M2_HOME%\bin and click save.

M2 - %M2_HOME%\bin

Now go to the path variable click edit and write %M2_HOME%\bin. Click save.

Now open command prompt again and type

'mvn --version'.

You will the version of the maven installed. The installation is now complete for Apache Maven.

Tomcat Installation for Windows

Open your browser and search 'Apache Tomcat' and hit enter.

Go to the first link or click here

Download the 64 bit version. Extract the folder to any destination and name it to 'Tomcat'. Copy the path of the Tomcat folder.

Follow these steps for Windows 10.

Now open Control System > System Settings > About > Advanced System Settings > Environment Variables

Create a new variable. Name it CATALINE_HOME and paste the path of Tomcat.

CATALINA_HOME - path

This will create a server for us. Open the command prompt, go to the bin directory of Tomcat folder and run startup.bat file

Open your browser and run localhost:8080

Consider you have the folder in D:\All softwares\tomcat, open the cmd and repeat the following commands

d: cd "All softwares" cd tomcat

You will be in the directory. Now enter the following in cmd

cd bin dir startup.bat

Now open localhost:8080, your server will be running. If you see a page of Tomcat on localhost:8080, it means the installation was successful.

Installing MySQL

Open the web browser and enter MySQL download. You will find MYSQL page, incase you don't find it this is the link

Click on the My SQL community server link or here. Select the web installer and you can choose to make an account or skip it.

On downloading the .msi file, open it and choose the set up type to 'developer'.

Click next and click execute. It will download the missing packages. Wait for download to finish.

Then click next until password is being asked. Enter the password, add a new user. Set a password and click next.

Follow the set up instruction till you are asked to password again.

On finishing the setup, open My SQL workbench.

You will a '+' sign on the dashboard, click on it. Click Test Connection. Name the database as 'travel_agency', enter the password. Click finish and then next. You will see the tavel agency name on the dashboard.

Click on it. Enter the password. Following are some sample commands that you can run and click the 'thunder' icon.


 create database travel_agency;
 use travel_agency;
 show databases;

That's all for now. Feel free to ask for any doubts.