{"id":41386,"date":"2022-09-05T12:30:54","date_gmt":"2022-09-05T17:30:54","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=41386"},"modified":"2024-11-23T22:30:29","modified_gmt":"2024-11-24T04:30:29","slug":"how-to-install-tomcat-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/","title":{"rendered":"How to Install Tomcat on Ubuntu 22.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-42948\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/how-to-install-tomcat-on-ubuntu-22.04.webp\" alt=\"how to install tomcat on ubuntu 22.04\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/how-to-install-tomcat-on-ubuntu-22.04.webp 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/how-to-install-tomcat-on-ubuntu-22.04-300x150.webp 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/how-to-install-tomcat-on-ubuntu-22.04-150x75.webp 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>Apache Tomcat or Tomcat is a widely known and used Java application server. It is an open-source web server and servlet container developed and maintained by a community of developers of the Apache Software Foundation. In this tutorial, we will guide you through the steps of <a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-20-04\/\">installing Tomcat<\/a> on Ubuntu 22.04. At the time of this writing, Tomcat 10 is the latest stable version available to download.<\/p>\n<p><!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_1 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69c40cfd2c110\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69c40cfd2c110\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#Step-1-Log-in-to-the-server-and-update\" >Step 1. Log in to the server and update<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#Step-2-Install-Java\" >Step 2. Install Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#Step-3-Create-a-System-User\" >Step 3. Create a System User<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#Step-4-Install-Tomcat\" >Step 4. Install Tomcat<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#Step-5-Create-a-Systemd-Service-File-for-Tomcat\" >Step 5. Create a Systemd Service File for Tomcat<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#Step-6-Configure-Tomcat\" >Step 6. Configure Tomcat<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>An Ubuntu 22.04 VPS<\/li>\n<li>Full SSH root access or a user with sudo privileges is required<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Step-1-Log-in-to-the-server-and-update\"><\/span>Step 1. Log in to the server and update<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Login to your Ubuntu 22.04 VPS via SSH. In this article, we will use \u2018root\u2019 to run the shell commands. If you want to use your regular system user with sudo privileges to run the commands, make sure to append \u2018sudo\u2019 in front of the commands.<\/p>\n<pre>ssh root@IP_Address -p Port_Number<\/pre>\n<p>You need to replace &#8220;IP_Address&#8221; and &#8220;Port_number&#8221; with your server\u2019s actual IP address and SSH port number.<\/p>\n<p>Once logged in, you can check whether you have the proper Ubuntu version installed on your server with the following command:<\/p>\n<p># lsb_release -a<\/p>\n<p>You should get this output:<\/p>\n<pre>No LSB modules are available.\nDistributor ID: Ubuntu\nDescription: Ubuntu 22.04 LTS\nRelease: 22.04\nCodename: jammy<\/pre>\n<p>To make sure that all installed packages are up to date, we can run these commands.<\/p>\n<pre># apt update\n# apt upgrade<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-2-Install-Java\"><\/span>Step 2. Install Java<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You must have Java runtime environment (JRE) installed on your system. Tomcat 10 requires JRE 8 or higher version installed on your system. Let&#8217;s run the command below to install JRE fro Ubuntu repository.<\/p>\n<pre># apt install default-jdk -y<\/pre>\n<p>Once installed, we can check the version using this command:<\/p>\n<pre># java --version<\/pre>\n<p>It will return an output like this:<\/p>\n<pre>openjdk 11.0.15 2022-04-19\nOpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1)\nOpenJDK 64-bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1, mixed mode, sharing)<\/pre>\n<p><img decoding=\"async\" class=\"alignnone wp-image-42943 size-full\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-java-version.webp\" alt=\"\" width=\"746\" height=\"79\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-java-version.webp 746w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-java-version-300x32.webp 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-java-version-150x16.webp 150w\" sizes=\"(max-width: 746px) 100vw, 746px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-3-Create-a-System-User\"><\/span>Step 3. Create a System User<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>For security reasons, it is not recommended to run Tomcat as user &#8216;root&#8217;, so we will create a new system user to run Tomcat.<\/p>\n<pre># useradd -m -d \/opt\/tomcat -U -s \/bin\/false tomcat<\/pre>\n<p>After running the command above, the \/opt\/tomcat directory will be automatically created.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-4-Install-Tomcat\"><\/span>Step 4. Install Tomcat<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Instead of installing Tomcat from the Ubuntu repository, we are going to install Tomcat 10 using the binary distribution file. First, we need to download the Tomcat binary distribution file. To check the latest version, you can go to their download page at <a href=\"https:\/\/tomcat.apache.org\/download-10.cgi\">https:\/\/tomcat.apache.org\/download-10.cgi<\/a>.<\/p>\n<pre># wget https:\/\/dlcdn.apache.org\/tomcat\/tomcat-10\/v10.0.20\/bin\/apache-tomcat-10.0.20.tar.gz -O \/tmp\/tomcat-10.tar.gz\n# sudo -u tomcat tar -xzvf \/tmp\/tomcat-10.tar.gz --strip-components=1 -C \/opt\/tomcat<\/pre>\n<p>With the command above, the binary distribution file is downloaded and extracted in \/opt\/tomcat and the files\/directories are owned by user &#8216;tomcat&#8217;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-5-Create-a-Systemd-Service-File-for-Tomcat\"><\/span>Step 5. Create a Systemd Service File for Tomcat<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To manage Tomcat services, we need to create a systemd service file.<\/p>\n<pre># nano \/etc\/systemd\/system\/tomcat.service<\/pre>\n<p>Then add the following in to the file<\/p>\n<pre>[Unit]\nDescription=Apache Tomcat\nAfter=network.target\n\n[Service]\nType=forking\n\nUser=tomcat\nGroup=tomcat\n\nEnvironment=JAVA_HOME=\/usr\/lib\/jvm\/java-11-openjdk-amd64\nEnvironment=CATALINA_PID=\/opt\/tomcat\/tomcat.pid\nEnvironment=CATALINA_HOME=\/opt\/tomcat\nEnvironment=CATALINA_BASE=\/opt\/tomcat\nEnvironment=\"CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC\"\n\nExecStart=\/opt\/tomcat\/bin\/startup.sh\nExecStop=\/opt\/tomcat\/bin\/shutdown.sh\n\nExecReload=\/bin\/kill $MAINPID\nRemainAfterExit=yes\n\n[Install]\nWantedBy=multi-user.target<\/pre>\n<p>Save the file and exit.<\/p>\n<p>Run the following command to reload the systemd manager configuration:<\/p>\n<pre># systemctl daemon-reload<\/pre>\n<p>To run Tomcat now and make the service run upon reboot, we can run this command:<\/p>\n<pre># systemctl enable --now tomcat<\/pre>\n<p>We can check and verify Tomcat service by running this command:<\/p>\n<pre># systemctl status tomcat<\/pre>\n<p>It will show you an output like this:<\/p>\n<pre>root@ubuntu22:~# systemctl status tomcat\n\u25cf tomcat.service - Apache Tomcat\nLoaded: loaded (\/etc\/systemd\/system\/tomcat.service; enabled; vendor preset: enabled)\nActive: active (running) since Mon 2022-05-09 11:34:31 UTC; 1s ago\nProcess: 29526 ExecStart=\/opt\/tomcat\/bin\/startup.sh (code=exited, status=0\/SUCCESS)\nMain PID: 29533 (java)\nTasks: 15 (limit: 4697)\nMemory: 85.4M\nCPU: 3.575s\nCGroup: \/system.slice\/tomcat.service\n\u2514\u250029533 \/usr\/lib\/jvm\/java-11-openjdk-amd64\/bin\/java -Djava.util.logging.config.file=\/opt\/tomcat\/conf\/logging.properties -Djava.util.logging.manager=org.&gt;\n\nMay 09 11:34:31 ubuntu22.rosehosting.com systemd[1]: Starting Apache Tomcat...\nMay 09 11:34:31 ubuntu22.rosehosting.com startup.sh[29526]: Tomcat started.\nMay 09 11:34:31 ubuntu22.rosehosting.com systemd[1]: Started Apache Tomcat.<\/pre>\n<p><img decoding=\"async\" class=\"alignnone wp-image-42944 size-full\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-systemctl-status.webp\" alt=\"\" width=\"1024\" height=\"186\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-systemctl-status.webp 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-systemctl-status-300x54.webp 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-systemctl-status-150x27.webp 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-systemctl-status-768x140.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>As you can see, Tomcat is now running and listening on its default port 8080. You can open your web browser and navigate to http:\/\/YOUR_SERVER_IP_ADDRESS:8080<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-42945 size-full\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-homepage.webp\" alt=\"\" width=\"1024\" height=\"854\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-homepage.webp 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-homepage-300x250.webp 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-homepage-150x125.webp 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-homepage-768x641.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-6-Configure-Tomcat\"><\/span>Step 6. Configure Tomcat<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Tomcat Manager is a web interface application that is packaged with Tomcat server. This tool allows us to add, remove and manage Tomcat applications running on the same server.<\/p>\n<p>In order to access the Tomcat Manager App, we need to create a user and use it to log in. Let proceed with editing the tomcat-users.xml file<\/p>\n<pre># nano \/opt\/tomcat\/conf\/tomcat-users.xml<\/pre>\n<p>Then, add the following content just before the closing line &lt;\/tomcat-users&gt;:<\/p>\n<pre>&lt;role rolename=\"manager-gui\" \/&gt;\n&lt;role rolename=\"admin-gui\" \/&gt;\n&lt;user username=\"admin\" password=\"m0d1fyth15\" roles=\"manager-gui,admin-gui\"\/&gt;<\/pre>\n<p>Make sure to replace m0d1fyth15 with a stronger password.<\/p>\n<p>We would need to make another configuration because by default Tomcat restricts access to the Manager and Host Manager. Tomcat only allows connection from the server IP address itself. To remove the IP address restrictions, open the appropriate context.xml files.<\/p>\n<p>To remove the restriction on the Manager Application, we need to modify \/opt\/tomcat\/webapps\/manager\/META-INF\/context.xml file. And, to remove the restriction on the Host Manager, we need to modify the \/opt\/tomcat\/webapps\/host-manager\/META-INF\/context.xml file.<\/p>\n<p>In the files mentioned above, find these two lines:<\/p>\n<pre>&lt;Valve className=\"org.apache.catalina.valves.RemoteAddrValve\"\nallow=\"127\\.\\d+\\.\\d+\\.\\d+|::1|0:0:0:0:0:0:0:1\" \/&gt;<\/pre>\n<p>Then comment them out. The lines should look like the following:<\/p>\n<pre>&lt;!--\n&lt;Valve className=\"org.apache.catalina.valves.RemoteAddrValve\"\nallow=\"127\\.\\d+\\.\\d+\\.\\d+|::1|0:0:0:0:0:0:0:1\" \/&gt;\n--&gt;<\/pre>\n<p>That\u2019s it, now you should be able to access Tomcat Web Application Manager and Virtual Host Manager using the user credentials in the \/opt\/tomcat\/conf\/tomcat-users.xml file.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-42946 size-full\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-webapp-manager.webp\" alt=\"\" width=\"1024\" height=\"513\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-webapp-manager.webp 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-webapp-manager-300x150.webp 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-webapp-manager-150x75.webp 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-webapp-manager-768x385.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-42947 size-full\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-host-manager.webp\" alt=\"\" width=\"1024\" height=\"501\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-host-manager.webp 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-host-manager-300x147.webp 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-host-manager-150x73.webp 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/tomcat-host-manager-768x376.webp 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Congratulation! You have successfully installed Tomcat 10 at http:\/\/YOUR_SERVER_IP_ADDRESS:8080 and you can open it using any web browser you like, then build and customize it.<\/p>\n<p>If you are one of our web hosting customers and use our managed Linux Hosting, you don\u2019t have to follow this tutorial and install Tomcat on <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting\/\">Ubuntu 22.04<\/a> yourself, our Linux admins will set up and configure a Tomcat VPS for you. They are available 24\u00d77 and will take care of your request immediately, and all you need to do is to submit a ticket.<\/p>\n<p>PS. If you liked this post please share it with your friends on social networks or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache Tomcat or Tomcat is a widely known and used Java application server. It is an open-source web server and &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install Tomcat on Ubuntu 22.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#more-41386\" aria-label=\"Read more about How to Install Tomcat on Ubuntu 22.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":42948,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,1698,1712,1707],"tags":[90,2013],"class_list":["post-41386","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-ubuntu","category-web-frameworks","category-web-servers","tag-tomcat","tag-ubuntu-22","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install Tomcat on Ubuntu 22.04 | RoseHosting<\/title>\n<meta name=\"description\" content=\"How to Install Tomcat on Ubuntu 22.04 | RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Tomcat on Ubuntu 22.04\" \/>\n<meta property=\"og:description\" content=\"How to Install Tomcat on Ubuntu 22.04 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-05T17:30:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-24T04:30:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/how-to-install-tomcat-on-ubuntu-22.04.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install Tomcat on Ubuntu 22.04\",\"datePublished\":\"2022-09-05T17:30:54+00:00\",\"dateModified\":\"2024-11-24T04:30:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/\"},\"wordCount\":812,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/how-to-install-tomcat-on-ubuntu-22.04.webp\",\"keywords\":[\"tomcat\",\"ubuntu 22\"],\"articleSection\":[\"Tutorials\",\"Ubuntu\",\"Web Frameworks\",\"Web Servers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/\",\"name\":\"How to Install Tomcat on Ubuntu 22.04 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/how-to-install-tomcat-on-ubuntu-22.04.webp\",\"datePublished\":\"2022-09-05T17:30:54+00:00\",\"dateModified\":\"2024-11-24T04:30:29+00:00\",\"description\":\"How to Install Tomcat on Ubuntu 22.04 | RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#primaryimage\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/how-to-install-tomcat-on-ubuntu-22.04.webp\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/how-to-install-tomcat-on-ubuntu-22.04.webp\",\"width\":742,\"height\":372,\"caption\":\"how to install tomcat on ubuntu 22.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.rosehosting.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Tomcat on Ubuntu 22.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RoseHosting\",\"https:\/\/x.com\/rosehosting\",\"https:\/\/www.linkedin.com\/in\/rosehosting\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\/\/www.rosehosting.com\",\"https:\/\/www.facebook.com\/rosehosting.helpdesk\"],\"url\":\"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install Tomcat on Ubuntu 22.04 | RoseHosting","description":"How to Install Tomcat on Ubuntu 22.04 | RoseHosting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Tomcat on Ubuntu 22.04","og_description":"How to Install Tomcat on Ubuntu 22.04 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2022-09-05T17:30:54+00:00","article_modified_time":"2024-11-24T04:30:29+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/how-to-install-tomcat-on-ubuntu-22.04.webp","type":"image\/webp"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install Tomcat on Ubuntu 22.04","datePublished":"2022-09-05T17:30:54+00:00","dateModified":"2024-11-24T04:30:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/"},"wordCount":812,"commentCount":2,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/how-to-install-tomcat-on-ubuntu-22.04.webp","keywords":["tomcat","ubuntu 22"],"articleSection":["Tutorials","Ubuntu","Web Frameworks","Web Servers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/","name":"How to Install Tomcat on Ubuntu 22.04 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/how-to-install-tomcat-on-ubuntu-22.04.webp","datePublished":"2022-09-05T17:30:54+00:00","dateModified":"2024-11-24T04:30:29+00:00","description":"How to Install Tomcat on Ubuntu 22.04 | RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/how-to-install-tomcat-on-ubuntu-22.04.webp","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/08\/how-to-install-tomcat-on-ubuntu-22.04.webp","width":742,"height":372,"caption":"how to install tomcat on ubuntu 22.04"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-tomcat-on-ubuntu-22-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install Tomcat on Ubuntu 22.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/41386","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=41386"}],"version-history":[{"count":7,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/41386\/revisions"}],"predecessor-version":[{"id":49582,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/41386\/revisions\/49582"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/42948"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=41386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=41386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=41386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}