How To Install Apache Tomcat In Linux Step By Step
- Advertisement -
In this tutorial, we will see step-by-pace guidelines and the process of installing Apache Tomcat 10 on OpenSuse 15.
STEP 1: Install Coffee
Before diving into the installation procedure nosotros need to brand sure that coffee is installed on our system, to install java on OpenSUSE click here
STEP 2: Download Apache Tomcat
At present download the latest version of Apache Tomcat 10 on our system. to download run the following commands one by i
cd /usr/local/ https://dlcdn.apache.org/tomcat/tomcat-10/v10.0.16/bin/apache-tomcat-10.0.16.tar.gz
after download, extract the annal by running the following control
tar -zxvf tomcat-10.0.xvi.tar.gz
as we can run across from the in a higher place epitome, files have been extracted successfully. if y'all want you tin can rename the folder proper noun to whatever you want and it's optional.
Pace three: Directory Configuration
you can run tomcat from any directory you want, only it's suggested to store files under /usr/local/ or /opt/tomcat( you may demand to create the binder if non exist) directory. for the fourth dimension being, nosotros proceed our files under /opt/tomcat/. run the following command to move files from extract directory to /opt/tomcat directory
mv /usr/local/apache-tomcat-ten.0.16 /opt/tomcat as we tin can see all files have been moved to under /opt/ directory from /usr/local directory.
Pace 4: Get-go Tomcat Server.
offset tomcat server by running the following command. make certain you are in the correct directory to starting time the tomcat server else you demand to write the full path of that location y'all store tomcat files.
/opt/tomcat/bin/startup.sh
We can see from the above image that, the tomcat server is started. now type server IP on a browser as follow
http://IP:8080
BOOM! we take successfully installed tomcat 10 in our system.
STEP 5: Create systemd service
Since the idea is to manage Tomcat 10 as one more service of openSUSE Leap 15, it is good to create a configuration file to manage this new service. now create a new service file with the name tomcat.service using text editor under /etc/systemd/system/ directory.
vim /etc/systemd/organisation/tomcat.service Now copy the post-obit lines, save the file and exit the editor
[Unit] Description=Apache Tomcat 10 Web Application Container Wants=network.target After=network.target [Service] Type=forking Surroundings="JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:///dev/urandom" Environment="CATALINA_BASE=/opt/tomcat" Environment="CATALINA_HOME=/opt/tomcat" Environment="CATALINA_TMPDIR=/opt/tomcat/temp" Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -Twenty:+UseParallelGC" ExecStart=/opt/tomcat/bin/startup.sh ExecStop=/opt/tomcat/bin/shutdown.sh [Install] WantedBy=multi-user.target Now run the following commands ane past ane
systemctl daemon-reload # Star Tomcat service automatically during kicking fourth dimension systemctl enable tomcat.service # Start Tomcat Server systemctl outset tomcat # Verify Tomcat service running or not systemctl status tomcat.service
Conclusion
In this tutorial, nosotros learned how to install and configure the tomcat service in OpenSUSE operating organisation.
Source: https://unixcop.com/install-apache-tomcat-10-opensuse-15-step-by-step/
Posted by: shumatesorece.blogspot.com

0 Response to "How To Install Apache Tomcat In Linux Step By Step"
Post a Comment