Tomcat installation in Linuxlite 4.8

                   How to install Tomcat in Linuxlite 4.8?


Step-1: First open https://tomcat.apache.org/ in any browser (chromium-browser in my case).


Step-1


Step-2: Click on Tomcat 9 under the Download (or whatever version you want to download).

Step-2


Step-3: Click on tar.gz. It will be downloaded.

Step-3


Step-4: Now extract it in the Downloads directory as shown in the below snapshot.

Step-4


Step-5: Copy the extracted directory apache-tomcat-9.0.33 to the home path of Linux inside /Web directory as shown in the below snapshot.

Step-5


Step-6: Now set the path of Tomcat server and Java using .bashrc file by adding two lines in this file which are as follows:

1. export JAVA_HOME = /usr/lib/jvm/java-1.8.0-openjdk-amd64 (For setting Java path)

2. export CATALINA_HOME = /home/pglinuxlite/Web/apache-tomcat-9.0.33/conf (For setting

Tomcat server path)

Step-6


Step-7: To start the server go to Web/apache-tomcat-9.0.33/bin path.

Step-7


Step-8: Use sh startup.sh command. after the tomcat server starts, the terminal will look as below snapshot.


Step-8


Step-9: Now, check on localhost:8080 on your browser to see whether its working or not. If it's working it looks like as shown in below snapshot.


Step-9


Step-10: Till now we start the tomcat server successfully but we don’t set the credentials to access the host manager. To do so click on Host Manager, A popup appears that will take id and password but click on cancel button. And copy the text as in below snapshot.


Step-10


Step-11: Edit tomcat-users.xml file under conf directory(i.e. /Web/apache-tomcat-9.0.33/conf) to set user define Id and password by placing the below xml which is just copied earlier, just before </tomcat-users> tag .

<role rolename= ”admin-gui”/ >

<user username= ”admin” password= ”admin” roles= ”admin-gui” />


Put username and password values according to your choice.


Step-11


Step-12: To Shutdown the TomcatServer use below command which is as follows:

sh shutdown.sh

Note:- it will work inside /Web/apache-tomcat-9.0.33/bin directory so first got to the mentioned directory using cd command (i.e. cd Web/apache-tomcat-9.0.33/bin) then use sh shutdown.sh to shutdown the activated server.


Step-12

Comments