# CentOS

Java下载
------
<pre>
https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html

Linux x64 Compressed Archive | jdk-8u261-linux-x64.tar.gz
</pre>

Java安装
------
<pre>
cd /usr/local

mkdir java

cd java

拷贝 jdk-8u261-linux-x64.tar.gz 到 /usr/local/java

tar -xzvf jdk-8u261-linux-x64.tar.gz

mv jdk1.8.0_261 jdk1.8
</pre>

Java环境变量
------
<pre>
sudo vim /etc/profile

export JAVA_HOME=/usr/local/java/jdk1.8
export JRE_HOME=${JAVA_HOME}/jre
export PATH=$PATH:${JAVA_HOME}/bin:${JRE_HOME}/bin
export CLASSPATH=.:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar:${JRE_HOME}/lib

source /etc/profile
</pre>

Java命令
------
<pre>
ln -s /usr/local/java/jdk1.8/bin/java /usr/bin/java
</pre>

Maven
------
<pre>
http://maven.apache.org/download.cgi

下载 Binary tar.gz archive | apache-maven-3.6.3-bin.tar.gz

tar -xzvf apache-maven-{版本}-bin.tar.gz
</pre>

Maven环境变量
------
<pre>
sudo vim /etc/profile

export MVN_HOME=Gz解压目录/apache-maven-{版本}
export PATH=$PATH:${MVN_HOME}/bin

source /etc/profile
</pre>
