INSTALL TOMCAT 9

ON 

UBUNTU 18.04

Эхлээд жава

Text

Эхлээд жава

sudo add-apt-repository ppa:webupd8team/java

sudo apt update

sudo apt install oracle-java8-installer

java -version

openjdk version "1.8.0_162"
OpenJDK Runtime Environment (build 1.8.0_162-8u162-b12-1-b12)
OpenJDK 64-Bit Server VM (build 25.162-b12, mixed mode)

Дараа нь Эрэгтэй муур

Tom cat

wget https://www-us.apache.org/dist/tomcat/tomcat-9/v9.0.13/bin/apache-tomcat-9.0.13.tar.gz

tar -xzvf apache-tomcat-9.0.13.tar.gz

mv apache-tomcat-9.0.13 tomcat 

sudo mv tomcat/ /opt/

 echo "export CATALINA_HOME='/opt/tomcat/'" >> ~/.bashrc

The purpose of a .bashrc file is to provide a place where you can set up variables, functions and aliases, define your (PS1) prompt and define other settings that you want to use every start you open a new terminal window

source ~/.bashrc

./script runs the script as an executable file, launching a new shell to run it
source script reads and executes commands from filename in the current shell environment

sh /opt/tomcat/bin/startup.sh 

sh /opt/tomcat/bin/shutdown.sh

sh stands for "shell" and shell is the old, Unix like command line interpreter. An interpreter is an program that executes specific instructions written in a programming or scripting language. So basically you say "Execute that file for me".

nano /opt/tomcat/conf/tomcat-users.xml 

< !-- linuhelp зөвхөн manager section руу хандана -->
<role rolename=" manager-gui"  /> 

< user username="linuhelp"  password=" 123"  roles=" manager-gui"  /> 

< !-- Admin нь manager болон admin section руу хандана -->

< role rolename="admin-gui"  /> 

< user username="admin"  password=" admin"  roles=" admin-gui"  />

how to install tomcat on ubuntu

By usott

how to install tomcat on ubuntu

  • 24