TOMCAT_BIN Directory

Hello Community,
For the below question , we need to run tomcat but there is no bin Directory in sudo /opt/apache-tomcat-8/bin/startup.sh

Now run tomcat with default settings.
Open the localhost tab to see the tomcat web page in web browser.

And also there is no Webapps folder in tomcat Directory for the below question we need to move it to tomcat directory to complete the question.

We have downloaded sample war file under /opt/sample.war . It is simple Hello world application. Set it for apache tomcat to serve.

root@host01 /opt/apache-tomcat-8# pwd
/opt/apache-tomcat-8
root@host01 /opt/apache-tomcat-8# ls
build.xml deployer-howto.html images lib LICENSE NOTICE README.md RELEASE-NOTES

can you please look in-to this and do the needful.

Regards,
Challapuram

Hello @Saikumar-Reddy-Chall,
Kindly check the steps in the attached gif.
tomcat

Hello Ayman,

Cool, Awesome…!!!

Thank you for your prompt response.

Regards,
Challapuram

You are welcome.
Happy learning!

can you tell me why chmod +x catalina.sh command used ? can we start direct sudo sh ./startup.sh

ans also if download the tar.gz file of apache -tomcat , after using the tar -xvf commnad and extract it , there is no file of /bin ? why it is ?

This is what I got when trying to run the startup.sh script

thor@host01 ~$ sudo /opt/apache-tomcat-11/bin/startup.sh
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program

This suggests you need to install some version of java, or a different version than what you have installed. Tomcat v11 needs java v17 or greater. This will probably get you working in this lab:

yum install java-17-openjdk