Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: I've update the wget command for java, and i added some section for centos 7 users

...

The yum command manages the the dependences, that's why we use it instead of rpm.

You can If check you have the right version on your system and your version you should see something like that.

Code Block
$ java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)

If no you may have OpenJDK installed by default on your system, like this.

Code Block
$ java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

...

Code Block
$ sudo alternatives --config java

There are 3 programs which provide 'java'.

Sélection    Commande
----------------------------------------------
*  1           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/jre/bin/java)
   2           java-1.7.0-openjdk.x86_64 (/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.161-2.6.12.0.el7_4.x86_64/jre/bin/java)
 + 3           /usr/java/jdk1.8.0_151/jre/bin/java
Enter to keep the current selection[+], or type selection number:3

Now you are using the Oracle Java8.


For maven I followed this guide instead: http://preilly.me/2013/05/10/how-to-install-maven-on-centos/

...

Code Block
languagetext
$ echo 0 >/selinux/enforce
$ vi /etc/selinux/config  # replace "SELINUX=enforcing" to "SELINUX=disabled"

Configure Firewalld and SELinux (Centos 7)

CentOS 7 is using a new firewall interface, Firewalld. As for Centos 6.X system we disable them.

Deactivate Firewalld

Code Block
$ sudo systemctl stop firewalld
$ sudo systemctl disabled firewalld

Deactivate SELinux

Code Block
$ sudo setenforce 0
$ vi /etc/selinux/config  # replace "SELINUX=enforcing" to "SELINUX=disabled"

...