다운로드 URL : https://maven.apache.org/download.cgi
[root@docker-compose-vm ~]# mkdir /tools [root@docker-compose-vm ~]# cd /tools [root@docker-compose-vm tools]# wget http://apache.tt.co.kr/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz --2019-04-27 05:08:27-- http://apache.tt.co.kr/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz Resolving apache.tt.co.kr (apache.tt.co.kr)... 211.47.69.77 Connecting to apache.tt.co.kr (apache.tt.co.kr)|211.47.69.77|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 9136463 (8.7M) [application/x-gzip] Saving to: 'apache-maven-3.6.1-bin.tar.gz' 100%[==================================================================================================================>] 9,136,463 5.77MB/s in 1.5s 2019-04-27 05:08:29 (5.77 MB/s) - 'apache-maven-3.6.1-bin.tar.gz' saved [9136463/9136463] [root@docker-compose-vm tools]# [root@docker-compose-vm tools]# tar xvfz apache-maven-3.6.1-bin.tar.gz [root@docker-compose-vm tools]# ln -s apache-maven-3.6.1 maven [root@docker-compose-vm tools]# [root@docker-compose-vm tools]# [root@docker-compose-vm tools]# ls -al total 8924 drwxr-xr-x. 3 root root 82 Apr 27 05:20 . dr-xr-xr-x. 19 root root 250 Apr 26 02:38 .. drwxr-xr-x. 6 root root 99 Apr 27 05:08 apache-maven-3.6.1 -rw-r--r--. 1 root root 9136463 Apr 4 19:30 apache-maven-3.6.1-bin.tar.gz lrwxrwxrwx. 1 root root 18 Apr 27 05:20 maven -> apache-maven-3.6.1 [root@docker-compose-vm tools]# [root@docker-compose-vm tools]# vi ~/.bash_ .bash_history .bash_logout .bash_profile [root@docker-compose-vm tools]# vi ~/.bash_ .bash_history .bash_logout .bash_profile [root@docker-compose-vm tools]# vi ~/.bash_profile [root@docker-compose-vm tools]# [root@docker-compose-vm tools]# cat ~/.bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin PATH=${MAVEN_HOME}/bin:${PATH} export MAVEN_HOME=/tools/maven export PATH [root@docker-compose-vm tools]# [root@docker-compose-vm tools]# source ~/.bash_profile [root@docker-compose-vm tools]# [root@docker-compose-vm tools]# echo $MAVEN_HOME /tools/maven