#
Tomcat
title: Install Tomcat Server label: Install Tomcat Server order: 100 authors:
- name: Charl Cronje email: charl@webally.co.za link: https://blog.webally.co.za avatar: https://assets.webally.co.za/avatars/darker.jpg edit: repo: "https://github.com/charlpcronje/setup.docs.devserv.me/edit/" base: /src branch: main label: Edit on GitHub editor: enabled: false favicon: favicon.png links:
- text: Projects Portfolio link: https://webally.co.za/projects
- text: Wiki, Tips and Docs link: https://docs.webally.co.zao.za
- text: Resume link: https://cv.webally.co.za
- text: LinkedIn link: https://www.linkedin.com/in/charlpcronje
- text: GitHub link: https://github.com/charlpcronje
- text: Upwork Profile link: https://www.upwork.com/freelancers/~01ccb1439024ec9c50 footer: copyright: "webAlly © Copyright . All rights reserved."---
Tomcat is an application server for JAVA applications. Run the following command to create tomcat user and group.
groupadd tomcat
The above command will create a group named tomcat.
useradd -M -s /bin/nologin -g tomcat -d /opt/tomcat tomcat
The above command will create a user tomcat
having no login shell and home directory as /opt/tomcat
.
Now download the Tomcat archive from Tomcat download page using the following command.
cd ~
wget http://www-us.apache.org/dist/tomcat/tomcat-8/v8.5.32/bin/apache-tomcat-8.5.32.tar.gz
Now we will install the tomcat server in /opt/tomcat
directory. Create a new directory and extract the archive using the following command
mkdir /opt/tomcat
tar xvf apache-tomcat-8*tar.gz -C /opt/tomcat --strip-components=1
Now provide the ownership of the files to tomcat user and group using the following command.
chown -R tomcat:tomcat /opt/tomcat