Installing git and maven on Ubuntu

git

Installing git is very straight forward:

  1. Update the system
    sudo apt-get update -y && sudo apt-get upgrade -y
  2. Install git
    sudo apt-get install git

maven

Maven can be installed by using apt-get. Here, the manual way of doing it is described. Ubuntu 14.04 Trusty installs maven 3.0.5 and for building Zeppelin maven 3.1.0 or higher version is required.

In this case, maven is installed under /usr/apache. Reason for that is Hortonworks’ Hadoop installation is under /usr as well – /usr/hdp.

  1. Go on maven’s website and copy the link to the last stable version.https://maven.apache.org/download.cgi
  2. Go to the folder where maven will be installed.
    cd /usr/apache
  3. Download the file.
    sudo wget http://mirror.switch.ch/mirror/apache/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
  4. Unpack the file.
    sudo tar xzvf apache-maven-3.3.9-bin.tar.gz
  5. Update the global system environment variables.
    sudo vi /etc/environment
    export M2_HOME=/usr/apache/apache-maven-3.3.9
    export M2=$M2_HOME/bin
  6. Add maven’s bin folder to the PATH and save and exit the file.

    /usr/apache/apache-maven-3.3.9/bin

  7. Source the file.
    source /etc/environment
  8. Test if maven is properly installed.
    mvn -v

maven-version

Advertisements