Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Maven with Yum on Amazon Linux
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
@jamesontriplett

This comment has been minimized.

Show comment
Hide comment
@jamesontriplett

jamesontriplett Nov 20, 2014

This is awesome. Thanks, exactly what I wanted

jamesontriplett commented Nov 20, 2014

This is awesome. Thanks, exactly what I wanted

@zeitos

This comment has been minimized.

Show comment
Hide comment
@zeitos

zeitos commented Dec 17, 2014

Thanks!

@adriaanm

This comment has been minimized.

Show comment
Hide comment
@adriaanm

adriaanm commented Jan 27, 2015

@cupdike

This comment has been minimized.

Show comment
Hide comment
@cupdike

cupdike Mar 9, 2015

Seems like this repo is not working at the moment. I get:
http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-6Server/x86_64/repodata/194b1dce25e9483ae3ce34f3e4f807770dd77705-primary.sqlite.bz2: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"

If you look in https://repos.fedorapeople.org/repos/dchen/apache-maven/epel-6Server/x86_64/repodata/repomd.xml, that file, 194b..., is listed for "primary_db" but is not served under ./repodata (I assume that is how it is supposed to work). Perhaps something is out of sink at the moment. BTW, I tried all manner of yum clean metadata; yum clean all; beforehand.

cupdike commented Mar 9, 2015

Seems like this repo is not working at the moment. I get:
http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-6Server/x86_64/repodata/194b1dce25e9483ae3ce34f3e4f807770dd77705-primary.sqlite.bz2: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"

If you look in https://repos.fedorapeople.org/repos/dchen/apache-maven/epel-6Server/x86_64/repodata/repomd.xml, that file, 194b..., is listed for "primary_db" but is not served under ./repodata (I assume that is how it is supposed to work). Perhaps something is out of sink at the moment. BTW, I tried all manner of yum clean metadata; yum clean all; beforehand.

@IvanFernandez

This comment has been minimized.

Show comment
Hide comment
@IvanFernandez

IvanFernandez Mar 10, 2015

still down :(

IvanFernandez commented Mar 10, 2015

still down :(

@zoltan-fedor

This comment has been minimized.

Show comment
Hide comment
@zoltan-fedor

zoltan-fedor Mar 10, 2015

Yes, unfortunately it is still down...

zoltan-fedor commented Mar 10, 2015

Yes, unfortunately it is still down...

@zoltan-fedor

This comment has been minimized.

Show comment
Hide comment
@zoltan-fedor

zoltan-fedor Mar 11, 2015

Yeay, it is back now.

zoltan-fedor commented Mar 11, 2015

Yeay, it is back now.

@mlindhout

This comment has been minimized.

Show comment
Hide comment
@mlindhout

mlindhout commented Apr 9, 2015

thanx!

@cbibbs

This comment has been minimized.

Show comment
Hide comment
@cbibbs

cbibbs May 10, 2015

Thanks for the assistance

cbibbs commented May 10, 2015

Thanks for the assistance

@williansmartins

This comment has been minimized.

Show comment
Hide comment
@williansmartins

williansmartins commented May 28, 2015

Valeu!!!!!!

@anshuiisc

This comment has been minimized.

Show comment
Hide comment
@anshuiisc

anshuiisc Jun 20, 2015

ohhhh.. its so easy ... thanks alot

anshuiisc commented Jun 20, 2015

ohhhh.. its so easy ... thanks alot

@juanino

This comment has been minimized.

Show comment
Hide comment
@juanino

juanino Jul 6, 2015

thanks. perfect.

juanino commented Jul 6, 2015

thanks. perfect.

@dimerman

This comment has been minimized.

Show comment
Hide comment
@dimerman

dimerman commented Jul 8, 2015

πŸ‘

@sprzedwojski

This comment has been minimized.

Show comment
Hide comment
@sprzedwojski

sprzedwojski Jul 10, 2015

Perfect, thanks

sprzedwojski commented Jul 10, 2015

Perfect, thanks

@avnarun

This comment has been minimized.

Show comment
Hide comment
@avnarun

avnarun Jul 20, 2015

This worked for me ... thanks a ton !!

avnarun commented Jul 20, 2015

This worked for me ... thanks a ton !!

@javadba

This comment has been minimized.

Show comment
Hide comment
@javadba

javadba Jul 25, 2015

Worked on amazon linux.

javadba commented Jul 25, 2015

Worked on amazon linux.

@DreamFlasher

This comment has been minimized.

Show comment
Hide comment
@DreamFlasher

DreamFlasher commented Jul 28, 2015

Thank you!

@afsbd

This comment has been minimized.

Show comment
Hide comment
@afsbd

afsbd Jul 29, 2015

this is fantastic, thank you.

afsbd commented Jul 29, 2015

this is fantastic, thank you.

@tomkast

This comment has been minimized.

Show comment
Hide comment
@tomkast

tomkast commented Aug 9, 2015

thanks

@peterkshultz

This comment has been minimized.

Show comment
Hide comment
@peterkshultz

peterkshultz Sep 1, 2015

If only there were more scripts like this floating around the Internet---thank you!

peterkshultz commented Sep 1, 2015

If only there were more scripts like this floating around the Internet---thank you!

@flnj

This comment has been minimized.

Show comment
Hide comment
@flnj

flnj Sep 10, 2015

Thank you!

flnj commented Sep 10, 2015

Thank you!

@freaksterz

This comment has been minimized.

Show comment
Hide comment
@freaksterz

freaksterz Sep 18, 2015

this is real handy ..saved my time. Thanks

freaksterz commented Sep 18, 2015

this is real handy ..saved my time. Thanks

@plashkary

This comment has been minimized.

Show comment
Hide comment
@plashkary

plashkary Sep 23, 2015

Thank u for precise steps.

plashkary commented Sep 23, 2015

Thank u for precise steps.

@freaksterz

This comment has been minimized.

Show comment
Hide comment
@freaksterz

freaksterz Sep 28, 2015

thanks for sharing. works like charm

freaksterz commented Sep 28, 2015

thanks for sharing. works like charm

@jgwerner

This comment has been minimized.

Show comment
Hide comment
@jgwerner

jgwerner Oct 21, 2015

thanks for the gist, works great.

jgwerner commented Oct 21, 2015

thanks for the gist, works great.

@dipurane

This comment has been minimized.

Show comment
Hide comment
@dipurane

dipurane Nov 27, 2015

Worked like charm ... Thanks a lot for sharing this.

dipurane commented Nov 27, 2015

Worked like charm ... Thanks a lot for sharing this.

@andersoncarubelli

This comment has been minimized.

Show comment
Hide comment
@andersoncarubelli

andersoncarubelli commented Dec 2, 2015

Thank you!

@wsh

This comment has been minimized.

Show comment
Hide comment
@wsh

wsh Dec 21, 2015

THANK YOU!

wsh commented Dec 21, 2015

THANK YOU!

@cjhope

This comment has been minimized.

Show comment
Hide comment
@cjhope

cjhope Jan 21, 2016

Very nice - thanks

cjhope commented Jan 21, 2016

Very nice - thanks

@dyerrington

This comment has been minimized.

Show comment
Hide comment
@dyerrington

dyerrington Jan 21, 2016

Awesome! Thank you!

dyerrington commented Jan 21, 2016

Awesome! Thank you!

@Yaswanthgandra

This comment has been minimized.

Show comment
Hide comment
@Yaswanthgandra

Yaswanthgandra commented Feb 5, 2016

Thanks!

@collinkrawll

This comment has been minimized.

Show comment
Hide comment
@collinkrawll

collinkrawll Feb 7, 2016

This worked great but set maven (and my default java) to use Java 1.7. If you want to use Java 1.8, follow the above gist and then do:

yum search java | grep openjdk
yum install java-1.8.<revision number from yum search>-openjdk-headless.x86_64
yum install java-1.8.<revision number from yum search>-openjdk-devel.x86_64
update-alternatives --config java #pick java 1.8
update-alternatives --config javac #pick java 1.8

collinkrawll commented Feb 7, 2016

This worked great but set maven (and my default java) to use Java 1.7. If you want to use Java 1.8, follow the above gist and then do:

yum search java | grep openjdk
yum install java-1.8.<revision number from yum search>-openjdk-headless.x86_64
yum install java-1.8.<revision number from yum search>-openjdk-devel.x86_64
update-alternatives --config java #pick java 1.8
update-alternatives --config javac #pick java 1.8
@naveenwashere

This comment has been minimized.

Show comment
Hide comment
@naveenwashere

naveenwashere Apr 1, 2016

@collinkrawll: Thanks for the command to switch to jdk8

naveenwashere commented Apr 1, 2016

@collinkrawll: Thanks for the command to switch to jdk8

@nexus49

This comment has been minimized.

Show comment
Hide comment
@nexus49

nexus49 commented Apr 19, 2016

thanks!

@jfairchild

This comment has been minimized.

Show comment
Hide comment
@jfairchild

jfairchild Apr 25, 2016

Still works! πŸ‘

jfairchild commented Apr 25, 2016

Still works! πŸ‘

@kaiprt

This comment has been minimized.

Show comment
Hide comment
@kaiprt

kaiprt Apr 28, 2016

Thank you!

kaiprt commented Apr 28, 2016

Thank you!

@kbens

This comment has been minimized.

Show comment
Hide comment
@kbens

kbens May 5, 2016

Very nice. πŸ‘

kbens commented May 5, 2016

Very nice. πŸ‘

@alexruzenhack

This comment has been minimized.

Show comment
Hide comment
@alexruzenhack

alexruzenhack May 5, 2016

Thank you! πŸ†—

alexruzenhack commented May 5, 2016

Thank you! πŸ†—

@arti-bol

This comment has been minimized.

Show comment
Hide comment
@arti-bol

arti-bol May 7, 2016

Exactly what I wanted. Just needed to so sudo su

arti-bol commented May 7, 2016

Exactly what I wanted. Just needed to so sudo su

@sabs47

This comment has been minimized.

Show comment
Hide comment
@sabs47

sabs47 May 7, 2016

thx this is exactly what im lookig for

sabs47 commented May 7, 2016

thx this is exactly what im lookig for

@YutaroSoejima

This comment has been minimized.

Show comment
Hide comment
@YutaroSoejima

YutaroSoejima commented May 12, 2016

thx!

@mrbkt

This comment has been minimized.

Show comment
Hide comment
@mrbkt

mrbkt May 13, 2016

@collinkrawll: thanks for the switch

mrbkt commented May 13, 2016

@collinkrawll: thanks for the switch

@ramx

This comment has been minimized.

Show comment
Hide comment
@ramx

ramx Jun 14, 2016

Thanks!

ramx commented Jun 14, 2016

Thanks!

@ulymarins

This comment has been minimized.

Show comment
Hide comment
@ulymarins

ulymarins commented Jun 29, 2016

πŸ‘

@ImHimanShoe

This comment has been minimized.

Show comment
Hide comment
@ImHimanShoe

ImHimanShoe commented Jun 30, 2016

Thanks!

@paulograbin

This comment has been minimized.

Show comment
Hide comment
@paulograbin

paulograbin commented Jul 28, 2016

Awesome!

@tribbloid

This comment has been minimized.

Show comment
Hide comment
@tribbloid

tribbloid commented Aug 4, 2016

All hail @sebsto!

@markchou

This comment has been minimized.

Show comment
Hide comment
@markchou

markchou Aug 25, 2016

thx this is exactly what im lookig for!!!

markchou commented Aug 25, 2016

thx this is exactly what im lookig for!!!

@garyden

This comment has been minimized.

Show comment
Hide comment
@garyden

garyden commented Sep 18, 2016

Cool!

@githoov

This comment has been minimized.

Show comment
Hide comment
@githoov

githoov commented Sep 21, 2016

hero

@timle

This comment has been minimized.

Show comment
Hide comment
@timle

timle Nov 3, 2016

Thank you! Worked for me on the following docker image: sequenceiq/hadoop-docker:2.7.1
which is running CentOS release 6.6
(but did install wget first, 'yum install wget')

timle commented Nov 3, 2016

Thank you! Worked for me on the following docker image: sequenceiq/hadoop-docker:2.7.1
which is running CentOS release 6.6
(but did install wget first, 'yum install wget')

@ThaddeusAid

This comment has been minimized.

Show comment
Hide comment
@ThaddeusAid

ThaddeusAid Nov 6, 2016

perfect thanks!

ThaddeusAid commented Nov 6, 2016

perfect thanks!

@anherrera

This comment has been minimized.

Show comment
Hide comment
@anherrera

anherrera commented Nov 29, 2016

Thanks!

@calebbarr

This comment has been minimized.

Show comment
Hide comment
@calebbarr

calebbarr Dec 1, 2016

Seriously great.

calebbarr commented Dec 1, 2016

Seriously great.

@chisni

This comment has been minimized.

Show comment
Hide comment
@chisni

chisni Dec 10, 2016

Thanks for the article.To make maven point to java8 instead of java7,did the following instead.

Create a new file ~/.mavenrc with the following content
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-1.b15.25.amzn1.x86_64

chisni commented Dec 10, 2016

Thanks for the article.To make maven point to java8 instead of java7,did the following instead.

Create a new file ~/.mavenrc with the following content
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-1.b15.25.amzn1.x86_64

@stevelinnovations

This comment has been minimized.

Show comment
Hide comment
@stevelinnovations

stevelinnovations Jan 6, 2017

Worked for me, many thanks!

stevelinnovations commented Jan 6, 2017

Worked for me, many thanks!

@manojpardeshi

This comment has been minimized.

Show comment
Hide comment
@manojpardeshi

manojpardeshi Jan 11, 2017

very nice!!!!

manojpardeshi commented Jan 11, 2017

very nice!!!!

@isshwar

This comment has been minimized.

Show comment
Hide comment
@isshwar

isshwar Feb 25, 2017

sudo sed -i s/$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo

can someone please explain what this command will do? and the path where maven actually gets installed after the above command?

isshwar commented Feb 25, 2017

sudo sed -i s/$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo

can someone please explain what this command will do? and the path where maven actually gets installed after the above command?

@hoangngo237

This comment has been minimized.

Show comment
Hide comment
@hoangngo237

hoangngo237 commented Feb 27, 2017

Thanks

@Henry31

This comment has been minimized.

Show comment
Hide comment
@Henry31

Henry31 Mar 2, 2017

@collinkrawll: Thanks for that. I need to change maven also to jdk 1.8.

But how could I provide this in ansible? Because with your command, there is always a prompt, where I must select the right version.

Henry31 commented Mar 2, 2017

@collinkrawll: Thanks for that. I need to change maven also to jdk 1.8.

But how could I provide this in ansible? Because with your command, there is always a prompt, where I must select the right version.

@sptkrishnan

This comment has been minimized.

Show comment
Hide comment
@sptkrishnan

sptkrishnan Mar 7, 2017

@isshwar 'sed' is a unix/linux utility and stands for "stream editor". It takes an input file and rewrites some parts of it using REGEX. In this case, it is replacing "$releasever" with "6". The reason being $releasever makes sense in fedora OS and not in Amazon Linux. Do a "man sed" on a linux system for more details. Hope this helps.

sptkrishnan commented Mar 7, 2017

@isshwar 'sed' is a unix/linux utility and stands for "stream editor". It takes an input file and rewrites some parts of it using REGEX. In this case, it is replacing "$releasever" with "6". The reason being $releasever makes sense in fedora OS and not in Amazon Linux. Do a "man sed" on a linux system for more details. Hope this helps.

@nancydwong

This comment has been minimized.

Show comment
Hide comment
@nancydwong

nancydwong Mar 10, 2017

Thanks for the time save!

nancydwong commented Mar 10, 2017

Thanks for the time save!

@alanwds

This comment has been minimized.

Show comment
Hide comment
@alanwds

alanwds Mar 18, 2017

Work like a charm! Tks!

alanwds commented Mar 18, 2017

Work like a charm! Tks!

@JayasreeJayachandran

This comment has been minimized.

Show comment
Hide comment
@JayasreeJayachandran

JayasreeJayachandran Mar 30, 2017

it shows network is unreachable in centos6.8(acadgild vm)

JayasreeJayachandran commented Mar 30, 2017

it shows network is unreachable in centos6.8(acadgild vm)

@wh211212

This comment has been minimized.

Show comment
Hide comment
@wh211212

wh211212 Apr 7, 2017

it's good.

wh211212 commented Apr 7, 2017

it's good.

@xuexb

This comment has been minimized.

Show comment
Hide comment
@xuexb

xuexb May 2, 2017

πŸ‘

xuexb commented May 2, 2017

πŸ‘

@mohanreddy-mca

This comment has been minimized.

Show comment
Hide comment
@mohanreddy-mca

mohanreddy-mca May 14, 2017

Very Nice... Awesome....:-)

mohanreddy-mca commented May 14, 2017

Very Nice... Awesome....:-)

@altrofimov

This comment has been minimized.

Show comment
Hide comment
@altrofimov

altrofimov commented Jun 13, 2017

Thank you!

@rishabkdoshi

This comment has been minimized.

Show comment
Hide comment
@rishabkdoshi

rishabkdoshi Jun 16, 2017

This worked like a charm, Thank you!

rishabkdoshi commented Jun 16, 2017

This worked like a charm, Thank you!

@nduka145

This comment has been minimized.

Show comment
Hide comment
@nduka145

nduka145 Jun 28, 2017

I used this,

sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version;

and here is my output;
bash: /opt/apache-maven-3.5.0/bin/mvn: No such file or directory

How can i fix this. Thanks

nduka145 commented Jun 28, 2017

I used this,

sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version;

and here is my output;
bash: /opt/apache-maven-3.5.0/bin/mvn: No such file or directory

How can i fix this. Thanks

@fookingthg

This comment has been minimized.

Show comment
Hide comment
@fookingthg

fookingthg Jul 3, 2017

Thank you. worked like a charm πŸ‘

fookingthg commented Jul 3, 2017

Thank you. worked like a charm πŸ‘

@Japster24

This comment has been minimized.

Show comment
Hide comment
@Japster24

Japster24 Jul 5, 2017

Resolving Dependencies
--> Running transaction check
---> Package apache-maven.noarch 0:3.3.9-3.el7 will be installed
--> Processing Dependency: plexus-sec-dispatcher for package: apache-maven-3.3.9-3.el7.noarch
--> Processing Dependency: aether-util for package: apache-maven-3.3.9-3.el7.noarch
--> Processing Dependency: aether-spi for package: apache-maven-3.3.9-3.el7.noarch
--> Processing Dependency: aether-impl for package: apache-maven-3.3.9-3.el7.noarch
--> Processing Dependency: aether-api for package: apache-maven-3.3.9-3.el7.noarch
--> Finished Dependency Resolution
Error: Package: apache-maven-3.3.9-3.el7.noarch (epel-apache-maven)
Requires: aether-impl
Error: Package: apache-maven-3.3.9-3.el7.noarch (epel-apache-maven)
Requires: plexus-sec-dispatcher
Error: Package: apache-maven-3.3.9-3.el7.noarch (epel-apache-maven)
Requires: aether-util
Error: Package: apache-maven-3.3.9-3.el7.noarch (epel-apache-maven)
Requires: aether-spi
Error: Package: apache-maven-3.3.9-3.el7.noarch (epel-apache-maven)
Requires: aether-api
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Japster24 commented Jul 5, 2017

Resolving Dependencies
--> Running transaction check
---> Package apache-maven.noarch 0:3.3.9-3.el7 will be installed
--> Processing Dependency: plexus-sec-dispatcher for package: apache-maven-3.3.9-3.el7.noarch
--> Processing Dependency: aether-util for package: apache-maven-3.3.9-3.el7.noarch
--> Processing Dependency: aether-spi for package: apache-maven-3.3.9-3.el7.noarch
--> Processing Dependency: aether-impl for package: apache-maven-3.3.9-3.el7.noarch
--> Processing Dependency: aether-api for package: apache-maven-3.3.9-3.el7.noarch
--> Finished Dependency Resolution
Error: Package: apache-maven-3.3.9-3.el7.noarch (epel-apache-maven)
Requires: aether-impl
Error: Package: apache-maven-3.3.9-3.el7.noarch (epel-apache-maven)
Requires: plexus-sec-dispatcher
Error: Package: apache-maven-3.3.9-3.el7.noarch (epel-apache-maven)
Requires: aether-util
Error: Package: apache-maven-3.3.9-3.el7.noarch (epel-apache-maven)
Requires: aether-spi
Error: Package: apache-maven-3.3.9-3.el7.noarch (epel-apache-maven)
Requires: aether-api
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

@dukeForsyth

This comment has been minimized.

Show comment
Hide comment
@dukeForsyth

dukeForsyth Sep 16, 2017

Pretty late but thanks this helped me a lot!

dukeForsyth commented Sep 16, 2017

Pretty late but thanks this helped me a lot!

@kirkryan

This comment has been minimized.

Show comment
Hide comment
@kirkryan

kirkryan Oct 10, 2017

Thanks for this!

kirkryan commented Oct 10, 2017

Thanks for this!

@nikhilvs

This comment has been minimized.

Show comment
Hide comment
@nikhilvs

nikhilvs commented Oct 17, 2017

πŸ‘

@senisas

This comment has been minimized.

Show comment
Hide comment
@senisas

senisas Nov 4, 2017

Thanks πŸ‘

senisas commented Nov 4, 2017

Thanks πŸ‘

@sdeepaks

This comment has been minimized.

Show comment
Hide comment
@sdeepaks

sdeepaks Nov 8, 2017

Thanks (Y)

sdeepaks commented Nov 8, 2017

Thanks (Y)

@7--

This comment has been minimized.

Show comment
Hide comment
@7--

7-- Jan 11, 2018

This is useless without being able to specify where it installs and persisting the env variables.
This is the proper way to do it. Installing in your current directory.

wget http://apache.mirrors.lucidnetworks.net/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz
tar xzvf apache-maven-3.5.2-bin.tar.gz

Add these lines to the ~/.bashrc file

PATH="$PATH:<DIR WHERE YOU RAN ABOVE COMMANDS>/apache-maven-3.5.2/bin"
M2_HOME=<DIR WHERE YOU RAN ABOVE COMMANDS>/apache-maven-3.5.2

Logout and back in. Now mvn -v will work for this user even if you logout and back in!

7-- commented Jan 11, 2018

This is useless without being able to specify where it installs and persisting the env variables.
This is the proper way to do it. Installing in your current directory.

wget http://apache.mirrors.lucidnetworks.net/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz
tar xzvf apache-maven-3.5.2-bin.tar.gz

Add these lines to the ~/.bashrc file

PATH="$PATH:<DIR WHERE YOU RAN ABOVE COMMANDS>/apache-maven-3.5.2/bin"
M2_HOME=<DIR WHERE YOU RAN ABOVE COMMANDS>/apache-maven-3.5.2

Logout and back in. Now mvn -v will work for this user even if you logout and back in!

@haldhafari82

This comment has been minimized.

Show comment
Hide comment
@haldhafari82

haldhafari82 Jan 29, 2018

Thanks!!
I wish it was as simple as "yum install maven"

haldhafari82 commented Jan 29, 2018

Thanks!!
I wish it was as simple as "yum install maven"

@josh-padnick

This comment has been minimized.

Show comment
Hide comment
@josh-padnick

josh-padnick Mar 28, 2018

You can automatically install OpenJDK 8 with:

sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
# Note I've replaced the "6" with "7" here.
sudo sed -i s/\$releasever/7/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version

Of course, in my case, I actually prefer Oracle JDK.

josh-padnick commented Mar 28, 2018

You can automatically install OpenJDK 8 with:

sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
# Note I've replaced the "6" with "7" here.
sudo sed -i s/\$releasever/7/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version

Of course, in my case, I actually prefer Oracle JDK.

@sdindiver

This comment has been minimized.

Show comment
Hide comment
@sdindiver

sdindiver commented Apr 6, 2018

thank you

@pacomedomagni

This comment has been minimized.

Show comment
Hide comment
@pacomedomagni

pacomedomagni Apr 16, 2018

thank you man

pacomedomagni commented Apr 16, 2018

thank you man

@easikoglu

This comment has been minimized.

Show comment
Hide comment
@easikoglu

easikoglu Apr 26, 2018

I suggest you first download jdk from oracle website via wget, then install 1.8, after that set up environment variable in bash profile, as :
export JAVA_HOME=/usr/java/jdk1.8.0_171-amd64/
export JRE_HOME=//usr/java/jdk1.8.0_171-amd64/jre
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin

Then you do not need to deal with java version after executed in the upper gist.

easikoglu commented Apr 26, 2018

I suggest you first download jdk from oracle website via wget, then install 1.8, after that set up environment variable in bash profile, as :
export JAVA_HOME=/usr/java/jdk1.8.0_171-amd64/
export JRE_HOME=//usr/java/jdk1.8.0_171-amd64/jre
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin

Then you do not need to deal with java version after executed in the upper gist.

@Server4001

This comment has been minimized.

Show comment
Hide comment
@Server4001

Server4001 Jun 3, 2018

Very helpful, thank you.

Server4001 commented Jun 3, 2018

Very helpful, thank you.

@Amitsharma045

This comment has been minimized.

Show comment
Hide comment
@Amitsharma045

Amitsharma045 Jun 21, 2018

Thank you, very helpful

Amitsharma045 commented Jun 21, 2018

Thank you, very helpful

@connectometeam

This comment has been minimized.

Show comment
Hide comment
@connectometeam

connectometeam Jul 19, 2018

Brilliant, thanks for this!

connectometeam commented Jul 19, 2018

Brilliant, thanks for this!

@raghava118mf

This comment has been minimized.

Show comment
Hide comment
@raghava118mf

raghava118mf Jul 22, 2018

Thank you very much.....:)

raghava118mf commented Jul 22, 2018

Thank you very much.....:)

@jeffdiederiks-pyramid

This comment has been minimized.

Show comment
Hide comment
@jeffdiederiks-pyramid

jeffdiederiks-pyramid Aug 20, 2018

Beautiful. Thanks man.

jeffdiederiks-pyramid commented Aug 20, 2018

Beautiful. Thanks man.

@arunodayraja

This comment has been minimized.

Show comment
Hide comment
@arunodayraja

arunodayraja Aug 26, 2018

Thanks Mister

arunodayraja commented Aug 26, 2018

Thanks Mister

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment