설치할 maven 파일을 받는다.
https://maven.apache.org/download.cgi 에서 최근에 업데이트 된 파일을 살펴보자.
wget http://apache.mirror.cdnetworks.com/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
--2015-07-27 17:15:35-- http://apache.mirror.cdnetworks.com/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
Resolving apache.mirror.cdnetworks.com... 14.0.101.165
Connecting to apache.mirror.cdnetworks.com|14.0.101.165|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8042383 (7.7M) [application/x-gzip]
Saving to: “apache-maven-3.3.3-bin.tar.gz”
100%[======================================>] 8,042,383 4.89M/s in 1.6s
2015-07-27 17:15:36 (4.89 MB/s) - “apache-maven-3.3.3-bin.tar.gz” saved [8042383/8042383]
공통으로 사용할 것이므로 위의 파일을 /usr/local 에 압축 푼다.
sudo tar zxvf apache-maven-3.3.3-bin.tar.gz -C /usr/local
apache-maven-3.3.3/boot/plexus-classworlds-2.5.2.jar
apache-maven-3.3.3/lib/maven-embedder-3.3.3.jar
apache-maven-3.3.3/lib/maven-settings-3.3.3.jar
apache-maven-3.3.3/lib/plexus-utils-3.0.20.jar
apache-maven-3.3.3/lib/maven-core-3.3.3.jar
apache-maven-3.3.3/lib/maven-model-3.3.3.jar
apache-maven-3.3.3/lib/maven-settings-builder-3.3.3.jar
apache-maven-3.3.3/lib/maven-builder-support-3.3.3.jar
apache-maven-3.3.3/lib/plexus-interpolation-1.21.jar
apache-maven-3.3.3/lib/plexus-component-annotations-1.5.5.jar
apache-maven-3.3.3/lib/plexus-sec-dispatcher-1.3.jar
apache-maven-3.3.3/lib/plexus-cipher-1.7.jar
apache-maven-3.3.3/lib/maven-repository-metadata-3.3.3.jar
apache-maven-3.3.3/lib/maven-artifact-3.3.3.jar
apache-maven-3.3.3/lib/maven-plugin-api-3.3.3.jar
apache-maven-3.3.3/lib/org.eclipse.sisu.plexus-0.3.0.jar
apache-maven-3.3.3/lib/cdi-api-1.0.jar
apache-maven-3.3.3/lib/jsr250-api-1.0.jar
apache-maven-3.3.3/lib/javax.inject-1.jar
apache-maven-3.3.3/lib/org.eclipse.sisu.inject-0.3.0.jar
apache-maven-3.3.3/lib/maven-model-builder-3.3.3.jar
apache-maven-3.3.3/lib/guava-18.0.jar
apache-maven-3.3.3/lib/maven-aether-provider-3.3.3.jar
apache-maven-3.3.3/lib/aether-api-1.0.2.v20150114.jar
apache-maven-3.3.3/lib/aether-spi-1.0.2.v20150114.jar
apache-maven-3.3.3/lib/aether-util-1.0.2.v20150114.jar
apache-maven-3.3.3/lib/aether-impl-1.0.2.v20150114.jar
apache-maven-3.3.3/lib/sisu-guice-3.2.5-no_aop.jar
apache-maven-3.3.3/lib/aopalliance-1.0.jar
apache-maven-3.3.3/lib/maven-compat-3.3.3.jar
apache-maven-3.3.3/lib/wagon-provider-api-2.9.jar
apache-maven-3.3.3/lib/slf4j-api-1.7.5.jar
apache-maven-3.3.3/lib/commons-cli-1.2.jar
apache-maven-3.3.3/lib/wagon-http-2.9-shaded.jar
apache-maven-3.3.3/lib/wagon-http-shared-2.9.jar
apache-maven-3.3.3/lib/jsoup-1.7.2.jar
apache-maven-3.3.3/lib/commons-lang-2.6.jar
apache-maven-3.3.3/lib/commons-io-2.2.jar
apache-maven-3.3.3/lib/wagon-file-2.9.jar
apache-maven-3.3.3/lib/aether-connector-basic-1.0.2.v20150114.jar
apache-maven-3.3.3/lib/aether-transport-wagon-1.0.2.v20150114.jar
apache-maven-3.3.3/lib/slf4j-simple-1.7.5.jar
apache-maven-3.3.3/README.txt
apache-maven-3.3.3/LICENSE
apache-maven-3.3.3/NOTICE
apache-maven-3.3.3/lib/
apache-maven-3.3.3/lib/aether-api.license
apache-maven-3.3.3/lib/aether-connector-basic.license
apache-maven-3.3.3/lib/aether-impl.license
apache-maven-3.3.3/lib/aether-spi.license
apache-maven-3.3.3/lib/aether-transport-wagon.license
apache-maven-3.3.3/lib/aether-util.license
apache-maven-3.3.3/lib/cdi-api.license
apache-maven-3.3.3/lib/jsoup.license
apache-maven-3.3.3/lib/jsr250-api.license
apache-maven-3.3.3/lib/maven-aether-provider.license
apache-maven-3.3.3/lib/maven-artifact.license
apache-maven-3.3.3/lib/maven-builder-support.license
apache-maven-3.3.3/lib/maven-compat.license
apache-maven-3.3.3/lib/maven-core.license
apache-maven-3.3.3/lib/maven-embedder.license
apache-maven-3.3.3/lib/maven-model-builder.license
apache-maven-3.3.3/lib/maven-model.license
apache-maven-3.3.3/lib/maven-plugin-api.license
apache-maven-3.3.3/lib/maven-repository-metadata.license
apache-maven-3.3.3/lib/maven-settings-builder.license
apache-maven-3.3.3/lib/maven-settings.license
apache-maven-3.3.3/lib/org.eclipse.sisu.inject.license
apache-maven-3.3.3/lib/org.eclipse.sisu.plexus.license
apache-maven-3.3.3/lib/plexus-cipher.license
apache-maven-3.3.3/lib/plexus-sec-dispatcher.license
apache-maven-3.3.3/lib/slf4j-api.license
apache-maven-3.3.3/lib/slf4j-simple.license
apache-maven-3.3.3/lib/wagon-file.license
apache-maven-3.3.3/lib/wagon-http-shared.license
apache-maven-3.3.3/lib/wagon-http.license
apache-maven-3.3.3/lib/wagon-provider-api.license
apache-maven-3.3.3/bin/m2.conf
apache-maven-3.3.3/bin/mvn.cmd
apache-maven-3.3.3/bin/mvnDebug.cmd
apache-maven-3.3.3/bin/mvn
apache-maven-3.3.3/bin/mvnDebug
apache-maven-3.3.3/bin/mvnyjp
apache-maven-3.3.3/conf/
apache-maven-3.3.3/conf/logging/
apache-maven-3.3.3/conf/logging/simplelogger.properties
apache-maven-3.3.3/conf/settings.xml
apache-maven-3.3.3/conf/toolchains.xml
apache-maven-3.3.3/lib/ext/
apache-maven-3.3.3/lib/ext/README.txt
프로파일에 등록을 위해 maven.sh 파일을 생성하고 내용을 기입후 재접속한다.
sudo vi /etc/profile.d/maven.sh
export M2_HOME=/usr/local/apache-maven-3.3.3
export PATH=${M2_HOME}/bin:${PATH}
확인
mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T11:57:37+00:00)Maven home: /usr/local/maven
Java version: 1.7.0_85, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-504.30.3.el6.x86_64", arch: "amd64", family: "unix"
출처: http://bhjo0930.tistory.com/entry/CentOS에-Maven-설치하기 [둘러가기]
'OS > Linux' 카테고리의 다른 글
centos 기본강좌 (0) | 2018.02.25 |
---|---|
CentOS 7 기본설정 (0) | 2018.02.23 |
profile bashrc bash profile (0) | 2018.02.22 |
[CentOS 7] Git – 설치 및 사용 (0) | 2018.02.22 |
CentOS 7에 MySQL 설치하기 (0) | 2018.02.22 |