![]() For additional help or useful information, we recommend you check the official Apache Tomcat website. Thanks for using this tutorial for installing Apache Tomcat 9 in Ubuntu 18.04 LTS system. If you are using a firewall, please open port 80 to enable access to the control panel: Ĭongratulations! You have successfully installed Apache Tomcat. Access tomcat in the web browser by connecting your server on port 8080. Tomcat server default works on port 8080. You can verify the service running, by default tomcat runs on port no 8080. Save and exit and reload the systemd service: systemctl daemon-reload Next, run the commands below to create a server account for Tomcat: nano /etc/systemd/system/rviceĪdd lines below into the file and save: Įnvironment=CATALINA_PID=/opt/tomcat9/tomcat9.pidĮnvironment=JAVA_HOME=/usr/lib/jvm/java-8-oracle/Įnvironment="CATALINA_OPTS=-Xms512m -Xmx512m"Įnvironment="JAVA_OPTS=-Dfile.encoding=UTF-8 -Dnet.sf.ehcache.skipUpdateCheck=true -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+UseParNewGC" Place the following two lines just above the last line. Add this text to the file: nano /opt/tomcat9/conf/tomcat-users.xml You can do this by adding the users in the conf/tomcat-users.xml file with your favorite text editor. Then give the user control of the directory:Ĭonfigure Tomcat users so they can access admin/manager sections. sudo apt install -y openjdk-11-jdk Once Java is installed, you can verify the Java version by using the following command. You can either install Oracle JDK or OpenJDK. sudo apt update Install Java Tomcat requires Java JDK to be installed on the machine. Next, create a directory for Tomcat files: sudo useradd -r tomcat9 -shell /bin/false Prerequisites Update the repository index. The first thing to do is to go to Apache Tomcat’s download page and download the latest stable version of Apache Tomcat, At the moment of writing this article it is version 9: cd /opt Installing Apache Tomcat on Ubuntu 18.04 LTS. Verify the Java version by running the following command: java -version Sudo apt install oracle-java8-set-default Add the Oracle Java PPA to Apt with the following command: sudo add-apt-repository ppa:webupd8team/java By default, Java is not available in Ubuntu’s repository. sudo apt-get updateĪpache Tomcat requires Java to be installed on your server. First, make sure that all your system packages are up-to-date by running the following apt-get commands in the terminal. Install Apache Tomcat on Ubuntu 18.04 LTS Bionic Beaver We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root. A non-root sudo useror access to the root user. ![]() SSH access to the server (or just open Terminal if you’re on a desktop).It’s recommended that you use a fresh OS install to prevent any potential issues.A server running one of the following operating systems: Ubuntu 18.04, and any other Debian-based distribution like Linux Mint. ![]()
0 Comments
Leave a Reply. |