How to Install Apache Maven on CentOS 7

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

2 Responses

  1. Andrici Cristina says:

    I have no file “maven.sh” under /etc/profile.d/ directory.

    I cannot go further.

    Please help me..

    • Dmytro says:

      Cristina, this file had to be created, but really you don’t need it. Do the same thing simpler way:

      $ sudo nano /etc/environment  #this opens the configuration file
      

      Add lines:

      M2_HOME=/usr/local/src/apache-maven
      PATH=${M2_HOME}/bin:${PATH}
      
      Press Ctrl+O to save changes and Press Ctrl+X to quite.
      
      Run a command.
      
      $ source /etc/environment to reload
      

      Now you can check the effect with:

      $ mvn --version
      

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.