#创建路径和用户
mkdir -p /data/app/tomcat8
#解压tomcat包
wget -p /data/download http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.32/bin/apache-tomcat-8.5.32.tar.gz
tar -xvf /data/download/apache-tomcat-8.5.32.tar.gz -C /data/app/tomcat8
#修改conf/tomcat-users.xml
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="admin"/>
<user username="admin" password="admin12345" roles="admin,manager,manager-gui"/>
#同时还需要修改,如无则新建conf/Catalina/localhost/manager.xml 内容如下:
<Context privileged="true" antiResourceLocking="false"
docBase="${catalina.home}/webapps/manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
</Context>
#启动tomcat
cd /data/app/tomcat8/apache-tomcat-8.5.32/bin
./startup.sh