java环境部署、apache部署、maven部署

  1. 将jdk-8u191-linux-x64.tar.gz上传到linux服务器
  2. tar -zvxf jdk-8u191-linux-x64.tar.gz
  3. sudo mkdir /usr/java
  4. sudo mv jdk1.8.0_191/ /usr/java
  5. 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
  1. source /etc/profile 使配置生效
  2. 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

  1. 上传apache-tomcat-8.5.35.tar.gz 到linux服务器
  2. tar -zvxf apache-tomcat-8.5.35.tar.gz
  3. sudo mv apache-tomcat-8.5.35 /usr/local/
  4. cd /usr/local/
  5. 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

  1. 在/etc/profile中添加
export MAVEN_HOME=/usr/local/maven
export PATH=$PATH:$MAVEN_HOME/bin

9.source /etc/profile

  1. 用mvn -v 进行验证


    image.png
  2. 修改远程仓库地址
    在maven目录中conf/settings.xml中 添加一个mirror

    
        nexus-aliyun
        *
        Nexus aliyun.
        http://maven.aliyun.com/nexus/content/groups/public
    

你可能感兴趣的:(java环境部署、apache部署、maven部署)