![]() ![]() May 09 11:34:31 startup.sh: Tomcat started. May 09 11:34:31 systemd: Starting Apache Tomcat. └─29533 /usr/lib/jvm/java-11-openjdk-amd64/bin/java .file=/opt/tomcat/conf/logging.properties =org.> Process: 29526 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=0/SUCCESS) Loaded: loaded (/etc/systemd/system/rvice enabled vendor preset: enabled)Īctive: active (running) since Mon 11:34:31 UTC 1s ago It will show you an output like this: systemctl status tomcat We can check and verify Tomcat service by running this command: # systemctl status tomcat To run Tomcat now and make the service run upon reboot, we can run this command: # systemctl enable -now tomcat Run the following command to reload the systemd manager configuration: # systemctl daemon-reload Then add the following in to the file Įnvironment=JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64Įnvironment=CATALINA_PID=/opt/tomcat/tomcat.pidĮnvironment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC" To manage Tomcat services, we need to create a systemd service file. With the command above, the binary distribution file is downloaded and extracted in /opt/tomcat and the files/directories are owned by user ‘tomcat’ Step 5. # sudo -u tomcat tar -xzvf /tmp/ -strip-components=1 -C /opt/tomcat To check the latest version, you can go to their download page at. First, we need to download the Tomcat binary distribution file. Instead of installing Tomcat from the Ubuntu repository, we are going to install Tomcat 10 using the binary distribution file. # useradd -m -d /opt/tomcat -U -s /bin/false tomcatĪfter running the command above, the /opt/tomcat directory will be automatically created. OpenJDK 64-bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1, mixed mode, sharing)įor security reasons, it is not recommended to run Tomcat as user ‘root’, so we will create a new system user to run Tomcat. It will return an output like this: openjdk 11.0.15 Once installed, we can check the version using this command: # java -version Let’s run the command below to install JRE fro Ubuntu repository. Tomcat 10 requires JRE 8 or higher version installed on your system. You must have Java runtime environment (JRE) installed on your system. To make sure that all installed packages are up to date, we can run these commands. You should get this output: No LSB modules are available. Once logged in, you can check whether you have the proper Ubuntu version installed on your server with the following command: You need to replace “IP_Address” and “Port_number” with your server’s actual IP address and SSH port number. ![]() ![]() If you want to use your regular system user with sudo privileges to run the commands, make sure to append ‘sudo’ in front of the commands. In this article, we will use ‘root’ to run the shell commands. Full SSH root access or a user with sudo privileges is required. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |