1. 程式人生 > >Linux安裝apache-maven

Linux安裝apache-maven

1.下載 apache-maven-3.6.0-bin.tar.gz

         maven官網下載

2.上傳到linux虛擬機器上去 /usr/local/packages

[[email protected] ~]# cd /usr/local/packages/
[[email protected] packages]# ls

3.解壓

[[email protected] packages]# tar -zxvf apache-maven-3.6.0-bin.tar.gz 

4.把解壓的檔案移動到/usr/local/src/目錄下

[[email protected] packages]# mv apache-maven-3.6.0 /usr/local/src/
[[email protected] packages]# cd /usr/local/src/
[[email protected] src]# ls

5.配置環境變數

[[email protected] src]# vi /etc/profile
#mvn安裝目錄
#export MVN_HOME=/usr/local/src/apache-maven-3.6.0
#配置MVN啟動目錄
#export PATH=$PATH:${MVN_HOME}/bin
[
[email protected]
src]# source /etc/profile [[email protected] src]# cd [[email protected] ~]# mvn -version