RSS DEV Community

Ubuntu 24.X Üzerinde Apache TOMCAT 9 Kurulumu (Java 8)

This article will guide you through the installation of Apache Tomcat 9 on an Ubuntu 24 system, which also requires the installation of Java 8. To install Java 8, run the commands `sudo apt update` and `sudo apt install openjdk-8-jdk -y`. After installation, verify that Java is installed by checking the version with `java -version`. Next, create a Tomcat user with the command `sudo useradd -m -U -d /opt/tomcat -s /bin/false tomcat`. Then, create a directory for Tomcat and extract the archive with the commands `sudo mkdir /opt/tomcat` and `sudo tar -xzf apache-tomcat-9.0.105.tar.gz -C /opt/tomcat --strip-components=1`. Set the permissions for the Tomcat directory and bin files with the commands `sudo chown -R tomcat: /opt/tomcat` and `sudo chmod +x /opt/tomcat/bin/*.sh`. Create a service file for Tomcat with the command `sudo nano /etc/systemd/system/tomcat.service` and paste the provided content. Finally, start and enable the Tomcat service with the commands `sudo systemctl daemon-reexec`, `sudo systemctl daemon-reload`, `sudo systemctl enable tomcat`, and `sudo systemctl start tomcat`.
dev.to
dev.to
Create attached notes ...