1.jdk安装

[root@mycat-slave ~]# mkdir /app
[root@mycat-slave ~]# tar xvf jdk-8u171-linux-x64.gz
[root@mycat-slave ~]# mv jdk1.8.0_171/ /app/jdk
[root@mycat-slave ~]# sed -i.ori '$a export JAVA_HOME=/app/jdk\nexport PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH\nexport CLASSPATH=.$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar' /etc/profile
[root@mycat-slave ~]# source /etc/profile
[root@mycat-slave ~]# java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

2.tomcat安装

[root@work-2 app]# tar xf apache-tomcat-9.0.8.tar.gz
[root@work-2 app]# mv apache-tomcat-9.0.8 /app/tomcat
[root@work-2 app]# echo 'export TOMCAT_HOME=/app/tomcat' >> /etc/profile
[root@work-2 app]# source /etc/profile

修改server.xml的端口
[root@work-2 conf]# vim server.xml
8080改为8081

启动和关闭
/app/tomcat/bin/startup.sh
/app/tomcat/bin/shutdown.sh

3.tomcat配置详解(转)
https://www.cnblogs.com/kismetv/p/7228274.html

4.maven安装

[root@zookeeper-1 ~]# tar zxf apache-maven-3.5.3-bin.tar.gz 
[root@zookeeper-1 ~]# mv apache-maven-3.5.3 /app/maven
[root@zookeeper-1 ~]# tail -2 /etc/profile
export MAVEN_HOME=/usr/local/maven
export PATH="$MAVEN_HOME/bin:$PATH"
[root@zookeeper-1 ~]# source /etc/profile

[root@zookeeper-1 ~]# which mvn
[root@zookeeper-1 ~]# mvn -version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T14:49:05-05:00)
Maven home: /app/maven
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /app/jdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-327.el7.x86_64", arch: "amd64", family: "unix"