- 将jdk-8u191-linux-x64.tar.gz上传到linux服务器
- tar -zvxf jdk-8u191-linux-x64.tar.gz
- sudo mkdir /usr/java
- sudo mv jdk1.8.0_191/ /usr/java
- vim /etc/profile 添加下面3行
export JAVA_HOME=/usr/java/jdk1.8.0_191
export CLASSPATH=.:%JAVA_HOME%/lib/dt.jar.%JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
- source /etc/profile 使配置生效
- java -version进行验证
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
部署apache
- 上传apache-tomcat-8.5.35.tar.gz 到linux服务器
- tar -zvxf apache-tomcat-8.5.35.tar.gz
- sudo mv apache-tomcat-8.5.35 /usr/local/
- cd /usr/local/
- sudo mv apache-tomcat-8.5.35/ tomcat8
部署maven
1.cd soft/
2.wget http://mirror.csclub.uwaterloo.ca/apache/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz
3.tar -xvzf apache-maven-3.6.0-bin.tar.gz
4.sudo mv apache-maven-3.6.0 /usr/local/
5.cd /usr/local/
6.sudo mv apache-maven-3.6.0/ maven
7.sudo vim /etc/profile
- 在/etc/profile中添加
export MAVEN_HOME=/usr/local/maven
export PATH=$PATH:$MAVEN_HOME/bin
9.source /etc/profile
-
用mvn -v 进行验证
image.png - 修改远程仓库地址
在maven目录中conf/settings.xml中 添加一个mirror
<mirrors>
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus aliyun.</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
网友评论