{"id":56869,"date":"2020-06-30T11:57:55","date_gmt":"2020-06-30T15:57:55","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/?p=56869"},"modified":"2021-10-20T09:22:44","modified_gmt":"2021-10-20T13:22:44","slug":"how-to-install-apache-tomcat-8-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/","title":{"rendered":"How to Install Apache Tomcat 8 on Ubuntu"},"content":{"rendered":"\n<p>Apache Tomcat (sometimes referred to as simply Tomcat) is a popular open-source web server software used to set up Java-based server environments. The technologies used in Tomcat include Java Servlet, Java Server Pages, Java Expression Language, and WebSocket and provides an HTTP server environment ideal for running Java-based applications. Apache Tomcat can be installed on most popular operating systems such as Ubuntu and <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-on-centos-7\/\" target=\"_blank\" rel=\"noreferrer noopener\">CentOS<\/a>. In this article, we will outline how to install Apache Tomcat 8 on your Ubuntu server.&nbsp;Please note, in order to complete the steps in this guide you will need to ensure you have <a href=\"https:\/\/www.inmotionhosting.com\/support\/amp\/obtain-root-access\/\" target=\"_blank\" rel=\"noreferrer noopener\">root SSH access<\/a>. <\/p>\n\n\n\n<p>Topics Include:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"#install\">Installing Apache Tomcat<\/a><\/li><li><a href=\"#test\">Testing Apache Tomcat<\/a><\/li><\/ul>\n\n\n\n<p class=\"alert alert-info\">Install Apache Tomcat 8 on your <a href=\"https:\/\/www.inmotionhosting.com\/dedicated-servers\" target=\" _blank\" rel=\"noreferrer noopener\">Dedicated Hosting<\/a> server and start running your Java applications today!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install\">Installing Apache Tomcat<\/h2>\n\n\n\n<ol class=\"article_list wp-block-list\"><li>First, you will need to <strong>make (mkdir)<\/strong> a Tomcat folder and <strong>change directory<\/strong> <strong>(cd)<\/strong> into it using the following commands:<br><br><pre>mkdir \/opt\/tomcat<\/pre><br><pre>cd \/opt\/tomcat<\/pre><\/li><li>Next, you will <strong>download the Apache Tomcat archive file<\/strong> and then <strong>extract the archive<\/strong> using the following commands:<br><br><pre>wget tomcat.tar.gz<\/pre><br><pre>tar -xvzf tomcat.tar.gz<\/pre><\/li><li>Then, ensure that Java is installed with the following command:<br><br><pre>java -version<\/pre><br>If Java is not installed, you must first <a rel=\"noreferrer noopener\" href=\"https:\/\/www.inmotionhosting.com\/support\/product-guides\/vps-hosting\/install-java-on-centos\/\" target=\"_blank\">install it<\/a> before proceeding. <br><\/li><li>Then, you will need to <strong>configure your .bashrc file<\/strong> and <strong>set the environment variables<\/strong>. To do this, you will use the <strong>nano text editor<\/strong> to modify the .bashrc file using the following command:<br><strong><br><\/strong><pre>nano ~\/.bashrc&nbsp;<\/pre><\/li><li>Add the following lines to the bottom of the .bashrc file:<br><br><pre>export JAVA_HOME=\/usr\/lib\/jvm\/java-1.8.0-openjdk-amd64<\/pre><br><pre>export CATALINA_HOME=\/opt\/tomcat\/apache-tomcat-8.5.32&nbsp;<\/pre><\/li><li>Press <strong>Ctrl + X<\/strong> to save the file and exit the nano text editor.<\/li><li>Register the changes to the .bashrc file with the following command:<br><br><pre>~\/.bashrc<\/pre><\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"test\">Testing Apache Tomcat&nbsp;<\/h2>\n\n\n\n<ol class=\"article_list wp-block-list\"><li>Before testing to see if Tomcat was set up successfully, <strong>run the startup script<\/strong> with the following command:<br><br><pre>$CATALINA_HOME\/bin\/startup.sh<\/pre><br><\/li><li>If the installation was successful, you can <strong>visit your server IP<\/strong> followed by :8080 and you should see a Tomcat splash page.&nbsp;<\/li><\/ol>\n\n\n\n<p>Congratulations, you have successfully installed Apache Tomcat!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache Tomcat (sometimes referred to as simply Tomcat) is a popular open-source web server software used to set up Java-based server environments. The technologies used in Tomcat include Java Servlet, Java Server Pages, Java Expression Language, and WebSocket and provides an HTTP server environment ideal for running Java-based applications. Apache Tomcat can be installed on<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/\"> Read More ><\/a><\/p>\n","protected":false},"author":57014,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4360],"tags":[],"class_list":["post-56869","post","type-post","status-publish","format-standard","hentry","category-software"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install Apache Tomcat 8 on Ubuntu<\/title>\n<meta name=\"description\" content=\"In this article, we will outline how to set up a Java-based server environment by installing and configuring Apache Tomcat 8 on Ubuntu.\" \/>\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.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Apache Tomcat 8 on Ubuntu\" \/>\n<meta property=\"og:description\" content=\"In this article, we will outline how to set up a Java-based server environment by installing and configuring Apache Tomcat 8 on Ubuntu.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-30T15:57:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-20T13:22:44+00:00\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\"},\"headline\":\"How to Install Apache Tomcat 8 on Ubuntu\",\"datePublished\":\"2020-06-30T15:57:55+00:00\",\"dateModified\":\"2021-10-20T13:22:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/\"},\"wordCount\":314,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Software\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/\",\"name\":\"How to Install Apache Tomcat 8 on Ubuntu\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2020-06-30T15:57:55+00:00\",\"dateModified\":\"2021-10-20T13:22:44+00:00\",\"description\":\"In this article, we will outline how to set up a Java-based server environment by installing and configuring Apache Tomcat 8 on Ubuntu.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Apache Tomcat 8 on Ubuntu\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/inmotion-hosting\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Apache Tomcat 8 on Ubuntu","description":"In this article, we will outline how to set up a Java-based server environment by installing and configuring Apache Tomcat 8 on Ubuntu.","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.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Apache Tomcat 8 on Ubuntu","og_description":"In this article, we will outline how to set up a Java-based server environment by installing and configuring Apache Tomcat 8 on Ubuntu.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2020-06-30T15:57:55+00:00","article_modified_time":"2021-10-20T13:22:44+00:00","author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644"},"headline":"How to Install Apache Tomcat 8 on Ubuntu","datePublished":"2020-06-30T15:57:55+00:00","dateModified":"2021-10-20T13:22:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/"},"wordCount":314,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Software"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/","name":"How to Install Apache Tomcat 8 on Ubuntu","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2020-06-30T15:57:55+00:00","dateModified":"2021-10-20T13:22:44+00:00","description":"In this article, we will outline how to set up a Java-based server environment by installing and configuring Apache Tomcat 8 on Ubuntu.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-apache-tomcat-8-on-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Install Apache Tomcat 8 on Ubuntu"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/56869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/57014"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=56869"}],"version-history":[{"count":13,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/56869\/revisions"}],"predecessor-version":[{"id":90000,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/56869\/revisions\/90000"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=56869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=56869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=56869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}