linux部署tomcat8(基於centOS7)
#創建路徑和用戶
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
linux部署tomcat8(基於centOS7)