install tomcat on linux

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/w_xue/article/details/81273670

ubunt16.04,comcat 9 core package tailed with tar.gz

unzip package

sudo su    // switch to root
cp apache-tomcat-9.0.10 /opt/
cd /opt/
tar vzxf apache-tomcat-9.0.10

add new user&group


sudo su
groupadd tomcat // add group tomcat
useradd -g tomcat -s /usr/sbin/nologin tomcat // add user tomcat which can't login
chown -R tomcat:tomcat /opt/apache-tomcat-9.0.10 // change tomcat directory owner

add current user access permission

usermod -a -G tomcat wxue    // add wxue to tomcat group

auto start on system boot if necessary

ln -s /opt/apache-tomcat-9.0.10/bin/daemon.sh /etc/init.d/tomcat9

tomcat9 start/stop  // manual operation

reference: https://www.cnblogs.com/svili/archive/2017/12/23/8088175.html

猜你喜欢

转载自blog.csdn.net/w_xue/article/details/81273670
今日推荐