Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
The wget https://dlcdn.apache.org/tomcat/tomcat-10/v10.0.20/bin/apache-tomcat-10.0.20.tar.gz link is not working.
I searched from “https://archive.apache.org/dist/tomcat/tomcat-10/v10.0.20/” the originak link and replaced it, after that it worked.
Currently working link is: https://archive.apache.org/dist/tomcat/tomcat-10/v10.0.20/bin/apache-tomcat-10.0.20.tar.gz
Note: If you prefer other version of Tomcat you can download from the “https://archive.apache.org/dist/” archive.
Hello,
This tutorial isn’t working. First, I have the error below,
vagrant@tomcat2:/opt/tomcat/bin$ sudo systemctl status tomcat ● tomcat.service - Apache Tomcat Web Application Container Loaded: loaded (/etc/systemd/system/tomcat.service; disabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Fri 2023-02-10 12:23:15 UTC; 5s ago Process: 5053 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=2) Main PID: 5053 (code=exited, status=2)
Feb 10 12:23:15 tomcat2 startup.sh[5053]: /opt/tomcat/bin/catalina.sh: 504: cannot create /opt/tomcat/logs/catalina.out: Permission denied Feb 10 12:23:15 tomcat2 systemd[1]: tomcat.service: Main process exited, code=exited, status=2/INVALIDARGUMENT Feb 10 12:23:15 tomcat2 systemd[1]: tomcat.service: Failed with result ‘exit-code’. sudo
I created the logs file and granted 777 permission sudo chmod 777 /opt/tomcat/logs
The service came up but port 8080 was not opened. I opened it with the sudo ufw 8080, I still can’t connect to my tomcat server.
Have you tested the above script to make sure that is it working?
If after following this process and you’re unable to connect, simply update your java version to at least 9 for tomcat 10.1*. And go back to this process to update the JAVA_ENVIRONMENT “sudo update-java-alternatives -l”
Good tutorial, but 1 mistake.
After you navigated to the /tmp directory, you forgot to navigate back to the root directory after downloading and extracting the tomcat archive file.
For anyone following the tutorial, after running the following command sudo tar xzvf apache-tomcat-10*tar.gz -C /opt/tomcat --strip-components=1, run cd ~ to navigate back to the root directory, then proceed with the rest of the tutorial.
Happy coding!
This comment has been deleted
I’ve commented out the valves but am still getting this message when trying to upload a WAR. Any ideas? “By default the Manager is only accessible from a browser running on the same machine as Tomcat. If you wish to modify this restriction, you’ll need to edit the Manager’s context.xml file.”
I think that this method of installing Tomcat is flawed and should not be used. We should use apt to install apps on Ubuntu. Besides of automatically doing most of what is described here, in a correct manner (because even copying and pasting can be done wrong), this method doesn’t support easy updates with apt-upadate and apt-upgrade. I guess that the reason for not installing directly from apt by just typing “sudo apt install tomcat” (and boom!) is that the version of tomcat will be a bit older. It is still a better choice and anyway, a smarter approach would be to expand the Ubuntu repository to include reliable sources for newer version of tomcat and then use “apt install tomcat”. I used this complexed method on my production server and I regret it and can’t change because it is a risk of messing up a production server with many users. When upgrading from “apt upgrade” all of the webapps that were installed are still there in the newer version. There are other symptoms i.e the log files will be inside the opt/tomcat folder rather than in the usual path. I ask the author to link from the guide to another guide that explains how to upgrade to a newer version of tomcat. Thank you very much.