Please share this post and join our telegram channel. Edit your BASHRC file to add the M2HOME environment variable (use your preferred editor).
That is why today you have learned to install Apache Maven on OpenSUSE 15.2 / 15.1.Īlso, you can read more post about OpenSUSE and Maven. Besides this, we have that OpenSUSE is more and more chosen as the main distribution by many developers. ConclusionĪpache Maven is a necessary tool for the development of Java applications. In case, wget command is missing, you can install it using apt-get install wget -y command. Where is Maven in Windows You run Maven by invoking a command-line tool: mvn.cmd from the bin directory. We can download the latest stable version of Apache Maven from the official website: using wget command. This means that everything is fine and Apache Maven is ready for work. We will change our current working directory to /opt/ directory: cd /opt/. Now, display the installed version using the mvn command. So, create a configuration file using the nano text editor and add the following: :~$ sudo nano /etc/profile.d/maven.sh export M2_HOME=/opt/maven/ģ.- Installing Apache maven on OpenSUSE 15.2 / 15.1 Once you have done this, you have to define the environment variables to be able to use it from the terminal as one more command. :~$ unzip apache-maven-3.6.3-bin.zipĪnd move it to /opt/ :~$ sudo mv apache-maven-3.6.3 /opt/maven Wait for the installation to finish then check the version of Apache Maven installed on your RHEL 8 system. Run the command below as a user with sudo privileges.
How to install maven in linux zip file#
Since I downloaded the ZIP file I unzipped it. The Apache Maven package is available on RHEL 8 upstream repositories. Then it’s time to unzip it and move it to another folder. So the best way to get the latest version of Apache Maven on our OpenSUSE 15.2 / 15.1 is to download it directly.ġ.- Downloading and installing Apache Maven on OpenSUSE 15.2 / 15.1Īt the time of this post, the latest stable version is 3.6.3. Install Apache Maven on OpenSUSE 15.2 / 15.1 Step 2: Setting M2HOME and Path Variables Add the following lines to the user profile file (.profile).
How to install maven in linux update#
Once the system update is completed, we can now continue with the rest of the steps.Īpache Maven requires Java to run, so the next step is to install it: :~$ sudo zypper in java-11-openjdk java-11-openjdk-devel Installing Maven on Linux/Ubuntu Step 1: Download the Maven Binaries Go to the URL: Copy the link for the Binary. Open a terminal session and run: :~$ sudo zypper up