tomcat8权限分离

tar xf jdk-8u121-linux-x64.tar.gz

mv jdk-*  /usr/local/jdk1.8

vi /etc/profile

export JAVA_HOME=http://www.likecs.com/usr/local/jdk1.8
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

source  /etc/profile

# java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

tar xf apache-tomcat-8.5.12.tar.gz

mv apache-tomcat-* /usr/local/tomcat8

cd /usr/local/tomcat8/bin

tar xf commons-daemon-native.tar.gz

cd commons-daemon-native-src/unix

./configure

make    # make后,会在当前文件夹下生成一个名为 jsvc的文件,将其复制到$CATALINA_HOME/bin目录

cp jsvc ../../

useradd tomcat -M -d / -s /usr/sbin/nologin

cd ../../  # 回到$CATALINA_HOME/bin目录下

# 接下来便是修改$CATALINA_HOME/bin目录下的 daemon.sh 文件

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wpfgdx.html