Difference between revisions of "Octave for Red Hat Linux systems"

From Octave
Jump to navigation Jump to search
m (Mtmiller moved page Octave for RedHat Systems to Octave for Red Hat Linux systems: fix spacing and naming convention)
 
(12 intermediate revisions by 8 users not shown)
Line 1: Line 1:
For RedHat-based distributions like RedHat, CentOS, Fedora, Scientific Linux ...
+
For RedHat-based distributions like RedHat, CentOS, Fedora, Scientific Linux, ...
  
=== Unspecific RH ===
+
=== Generic RedHat ===
 +
 
 +
Tested Fedora 33, but not completely.
 +
 
 +
  dnf install libtool make automake autoconf gcc gcc-devel \
 +
  g++ g++-devel gcc-fortran gawk gperf less ncurses
  
 
Tested Fedora 20, but not completely.
 
Tested Fedora 20, but not completely.
Line 8: Line 13:
 
   lapack pcre-devel readline-devel readline fftw-devel glpk-devel suitesparse suitesparse-devel gnuplot libcurl-devel zlib-devel \
 
   lapack pcre-devel readline-devel readline fftw-devel glpk-devel suitesparse suitesparse-devel gnuplot libcurl-devel zlib-devel \
 
   flex texlive gperf fltk-devel qhull-devel hdf5-devel gl2ps-devel qrupdate-devel arpack-devel qscintilla-devel llvm-devel qt-devel \
 
   flex texlive gperf fltk-devel qhull-devel hdf5-devel gl2ps-devel qrupdate-devel arpack-devel qscintilla-devel llvm-devel qt-devel \
   bison ghostscript-devel librsvg2-tools icoutils
+
   bison ghostscript-devel librsvg2-tools icoutils texlive-metapost
  
 
=== CentOS ===
 
=== CentOS ===
  
Install base CentOS 6.4 system from minimal install disk.
+
Enable use of [https://fedoraproject.org/wiki/EPEL Extra Packages for Enterprise Linux (EPEL)] AND THEN install octave dependencies development packages:
netinstall disk does not work from local iso disk image.
 
 
 
==== Setup Network ====
 
 
 
reboot and start the network because it is disabled by default:
 
 
 
    ifup eth0
 
    dhclient eth0
 
 
 
edit `/etc/sysconfig/network-scripts/ifcfg-eth0` to enable on next boot. change `ONBOOT` to yes
 
 
 
 
 
==== Install X11/DE ====
 
 
 
update yum
 
 
 
    yum update -y
 
 
 
install desktop environment using:
 
 
 
    yum -y groupinstall basic-desktop desktop-platform x11 fonts
 
 
 
set system to boot to graphical interface by default
 
 
 
    edit /etc/inittab and set default run level to 5
 
    init 5
 
 
 
==== Prepare system and dependencies ====
 
 
 
finish setting up system and creating user
 
 
 
configure sudo
 
 
 
    su
 
    edit /etc/sudoers file to enable sudo for wheel group
 
    edit /etc/group and add new user to wheel group
 
 
 
Remaining commands done with sudo
 
 
 
enable use of Extra Packages for Enterprise Linux (EPEL)
 
 
 
    yum -y install wget
 
    wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
 
    rpm -Uvh epel-release-6-8.noarch.rpm
 
 
 
install octave dependencies development packages:
 
  
 
     yum -y install yum-utils
 
     yum -y install yum-utils
Line 65: Line 24:
 
     yum -y install epstool transfig pstoedit qscintilla-devel
 
     yum -y install epstool transfig pstoedit qscintilla-devel
  
 +
The arpack-devel package distributed with CentOS 7 (arpack-devel-3.1.3-2.el7.x86_64) seems a bit old, as routine "seupdate" seems not recognized during
 +
the "configure" step. This can be solved by installing arpack from github:
 +
    git clone git@github.com:opencollab/arpack-ng.git
 +
    cd arpack-ng
 +
    ./bootstrap
 +
    ./configure --prefix="some local prefix"
 +
    make; make install
 +
 +
Current release as of Aug. 20th 2018 seems to compile OK with CentOS blas-devel
  
===== prepare installation of octave =====
+
===== Prepare installation of Octave =====
  
 
The remaining steps do not need to be done as root, except for
 
The remaining steps do not need to be done as root, except for
Line 84: Line 52:
 
     mkdir src build
 
     mkdir src build
  
===== get source code of octave and compile it=====
+
===== Compiling Octave from source =====
  
check out a copy of the octave sources in the src directory
+
Check out a copy of the octave sources in the src directory
  
 
     cd src
 
     cd src
Line 109: Line 77:
  
 
     make install
 
     make install
 +
 +
==== Installing using snap ====
 +
 +
https://snapcraft.io/install/octave/centos - Easiest way to install.
 +
 +
* Enable snapd. Snap is available for CentOS 7.6+, and Red Hat Enterprise Linux 7.6+, from the Extra Packages for Enterprise Linux (EPEL) repository. The EPEL repository can be added to your system with the following command:
 +
 +
    sudo yum install epel-release
 +
 +
* Snap can now be installed as follows:
 +
 +
    sudo yum install snapd
 +
 +
* Once installed, the systemd unit that manages the main snap communication socket needs to be enabled:
 +
 +
    sudo systemctl enable --now snapd.socket
 +
 +
* To enable classic snap support, enter the following to create a symbolic link between /var/lib/snapd/snap and /snap:
 +
 +
    sudo ln -s /var/lib/snapd/snap /snap
 +
 +
Either log out and back in again, or restart your system, to ensure snap’s paths are updated correctly.
 +
 +
* Install octave. To install octave, simply use the following command:
 +
 +
    sudo snap install octave
 +
 +
===Redhat Enterprise Linux workstation 6.4-2.6.32-358===
 +
Use the rpms to install
 +
octave version: 3.4.3
 +
 +
yum install gnuplot
 +
 +
* Download and install lcms
 +
 +
rpm -ivh lcms2-2.8-6.el6.x86_64.rpm
 +
 +
* Download and install libwmf
 +
 +
rpm -ivh libwmf-lite-0.2.8.4-25.el6_7.x86_64.rpm
 +
 +
* Download GraphicsMagick and GraphicsMagick-c++ and install them
 +
 +
rpm -ivh GraphicsMagick-1.3.32-1.el6.x86_64.rpm
 +
rpm -ivh GraphicsMagick-c++-1.3.32-1.el6.x86_64.rpm
 +
 +
*Install suitesparse
 +
 +
yum install suitesparse
 +
 +
* Install fftw3
 +
 +
yum install fftw
 +
 +
yum install glpk
 +
 +
* Download and install fltk
 +
 +
rpm -ivh fltk-1.1.10-1.el6.x86_64.rpm
 +
 +
* Download and install hdf5
 +
 +
rpm -ivh hdf5-1.8.5.patch1-10.el6.x86_64.rpm
 +
 +
* Download and install qhull
 +
 +
rpm -ivh qhull-2003.1-14.el6.x86_64.rpm
 +
 +
* Install blas
 +
 +
yum install blas
 +
 +
* Download and install qrupdate
 +
 +
rpm -ivh qrupdate-1.1.2-1.el6.x86_64.rpm
 +
 +
* Install texinfo
 +
 +
yum install texinfo
 +
 +
* Lastly, install octave
 +
 +
rpm -ivh octave-3.4.3-2.el6.x86_64.rpm
 +
 +
 +
[[Category:GNU/Linux]]
 +
[[Category:Installation]]

Latest revision as of 15:13, 24 July 2022

For RedHat-based distributions like RedHat, CentOS, Fedora, Scientific Linux, ...

Generic RedHat[edit]

Tested Fedora 33, but not completely.

 dnf install libtool make automake autoconf gcc gcc-devel \
 g++ g++-devel gcc-fortran gawk gperf less ncurses

Tested Fedora 20, but not completely.

 yum install gcc gcc-c++ kernel-devel make mercurial libtool libtool-ltdl-devel libtool-ltdl autoconf cmake lapack-devel \
 lapack pcre-devel readline-devel readline fftw-devel glpk-devel suitesparse suitesparse-devel gnuplot libcurl-devel zlib-devel \
 flex texlive gperf fltk-devel qhull-devel hdf5-devel gl2ps-devel qrupdate-devel arpack-devel qscintilla-devel llvm-devel qt-devel \
 bison ghostscript-devel librsvg2-tools icoutils texlive-metapost

CentOS[edit]

Enable use of Extra Packages for Enterprise Linux (EPEL) AND THEN install octave dependencies development packages:

   yum -y install yum-utils
   yum-builddep -y octave
   yum -y install qt-devel mercurial gcc-c++ lapack-devel libtool
   yum -y install epstool transfig pstoedit qscintilla-devel

The arpack-devel package distributed with CentOS 7 (arpack-devel-3.1.3-2.el7.x86_64) seems a bit old, as routine "seupdate" seems not recognized during the "configure" step. This can be solved by installing arpack from github:

   git clone git@github.com:opencollab/arpack-ng.git
   cd arpack-ng
   ./bootstrap
   ./configure --prefix="some local prefix"
   make; make install

Current release as of Aug. 20th 2018 seems to compile OK with CentOS blas-devel

Prepare installation of Octave[edit]

The remaining steps do not need to be done as root, except for possibly the final installation step. I recommend you create an installation directory like /usr/local/octave/VERSION so that it is easy to uninstall a given version simply by removing a directory tree. Then to use the installed version, put /usr/local/octave/VERSION/bin in your PATH. If you create the /usr/local/octave/VERSION directory with appropriate permissions, it is not necessary to be root to install Octave. For example,

   mkdir -p /usr/local/octave/dev
   chown jwe.jwe /usr/local/octave/dev

create src and build directories:

   mkdir src build
Compiling Octave from source[edit]

Check out a copy of the octave sources in the src directory

   cd src
   hg clone http://hg.savannah.gnu.org/hgweb/octave
  • bootstrap the build system
   cd octave
   ./bootstrap
  • build Octave in the build directory. choose whatever prefix is appropriate for your system. the -jN option builds in parallel
   cd ../../build
   ../src/octave/configure --prefix=/usr/local/octave/dev
   make -j6 all
  • Run the test suite
   make check
  • If everything looks OK (a few failures are probably normal for the development version) install it
   make install

Installing using snap[edit]

https://snapcraft.io/install/octave/centos - Easiest way to install.

  • Enable snapd. Snap is available for CentOS 7.6+, and Red Hat Enterprise Linux 7.6+, from the Extra Packages for Enterprise Linux (EPEL) repository. The EPEL repository can be added to your system with the following command:
   sudo yum install epel-release
  • Snap can now be installed as follows:
   sudo yum install snapd
  • Once installed, the systemd unit that manages the main snap communication socket needs to be enabled:
   sudo systemctl enable --now snapd.socket
  • To enable classic snap support, enter the following to create a symbolic link between /var/lib/snapd/snap and /snap:
   sudo ln -s /var/lib/snapd/snap /snap

Either log out and back in again, or restart your system, to ensure snap’s paths are updated correctly.

  • Install octave. To install octave, simply use the following command:
   sudo snap install octave

Redhat Enterprise Linux workstation 6.4-2.6.32-358[edit]

Use the rpms to install octave version: 3.4.3

yum install gnuplot
  • Download and install lcms
rpm -ivh lcms2-2.8-6.el6.x86_64.rpm
  • Download and install libwmf
rpm -ivh libwmf-lite-0.2.8.4-25.el6_7.x86_64.rpm
  • Download GraphicsMagick and GraphicsMagick-c++ and install them
rpm -ivh GraphicsMagick-1.3.32-1.el6.x86_64.rpm
rpm -ivh GraphicsMagick-c++-1.3.32-1.el6.x86_64.rpm
  • Install suitesparse
yum install suitesparse
  • Install fftw3
yum install fftw
yum install glpk
  • Download and install fltk
rpm -ivh fltk-1.1.10-1.el6.x86_64.rpm
  • Download and install hdf5
rpm -ivh hdf5-1.8.5.patch1-10.el6.x86_64.rpm
  • Download and install qhull
rpm -ivh qhull-2003.1-14.el6.x86_64.rpm
  • Install blas
yum install blas
  • Download and install qrupdate
rpm -ivh qrupdate-1.1.2-1.el6.x86_64.rpm
  • Install texinfo
yum install texinfo
  • Lastly, install octave
rpm -ivh octave-3.4.3-2.el6.x86_64.rpm