Download from: ftp://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.gz
tar -xzvf octave-4.0.0.tar.gz export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.51-1.b16.el6_7.x86_64 ./configure --exec-prefix=/opt/octave/4.0.0 --datarootdir=/opt/octave/4.0.0/share --datadir=/opt/octave/4.0.0/share --infodir=/opt/octave/4.0.0/share/info --includedir=/opt/octave/4.0.0/include --oldincludedir=/opt/octave/4.0.0/include make -j64 # if you want to compile on 64 cores... make install
Create module file /etc/modulefiles/octave/4.0.0:
#%Module1.0####################################################################
##
## octave modulefile
##
##
##
prepend-path PATH /opt/octave/4.0.0/bin
prepend-path LD_LIBRARY_PATH /opt/octave/4.0.0/lib
prepend-path MANPATH /opt/octave/4.0.0/share/man