Differences between revisions 2 and 42 (spanning 40 versions)
Revision 2 as of 2020-02-20 01:36:09
Size: 6374
Editor: buildqa
Comment:
Revision 42 as of 2020-05-03 22:28:48
Size: 5355
Editor: buildqa
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Linux Install and Setup == ## page was renamed from dev7beta1_linux
== Linux Install & Setup ==
Line 3: Line 4:
On Linux systems, the tar archive file (.tar.gz) can be expanded under any convenient path/subdirectory on your machine you have permission to write to. For example, you can expand the tar archive under your $HOME directory. To install freesurfer under a recommended shared system location, e.g., {{{/usr/local}}}, you will typically need sudo or root privileges. Please note that if you have sudo/root privileges, then you should consider using the RPM file (.rpm) to install the freesurfer 7.0.0 beta 1 release under {{{/usr/local}}}. The linux package management tools provide the advantage of trying to install any software packages freesurfer depends upon that are not already installed on your system as part of installing freesurfer under {{{/usr/local/freesurfer/<package version>}}}. === CentOS 6, 7 and 8 ===
The examples below show how to unpack the Freesurfer 7.0.0 CentOS 7 tar archive, '''freesurfer-linux-centos7_x86_64-7.0.0.tar.gz''', or how to install the rpm file, '''freesurfer-CentOS7-7.0.0-1.x86_64.rpm'''.
Line 5: Line 7:
''Example of placing the CentOS7 tar archive under the $HOME directory for user "tester" w/o any sudo/root privileges. Setup commands follow. Shell is bash or Bourne shell.'' If you are using CentOS8, then you would use the '''freesurfer-linux-centos8_x86_64-7.0.0.tar.gz''' or the '''freesurfer-CentOS8-7.0.0-1.x86_64.rpm''' file in the examples below instead of the centOS7 files. Please note the instructions are a bit different for using the RPM in the CentOS8 section compared to the CentOS7 section.

If you are still working with CentOS 6 (which will no longer be supported by RedHat/CentOS projects after November 2020), then you would use the '''freesurfer-linux-centos6_x86_64-7.0.0.tar.gz''' or the '''freesurfer-CentOS6-7.0.0-1.x86_64.rpm.''' file in the examples below instead of the CentOS7 files.


=== Ubuntu 14-18 ===
Use the example below where the CentOS7 tar archive, '''freesurfer-linux-centos7_x86_64-7.0.0.tar.gz''', is unpacked - and do the same on your Ubuntu system. We hope to provide an Ubuntu .deb installer package in the near future.

==== Installation with the Tar Archive ====

On Linux systems, the tar archive file (.tar.gz) can be expanded under any convenient path/subdirectory on your machine you have permission to write to. For example, you can expand the tar archive under your $HOME directory.

To install freesurfer under a recommended shared system location, e.g., '''/usr/local''', you will typically need sudo or root privileges. Please note that if you have sudo/root privileges, then we recommend using the '''Installation with the Yum Package Manager''' process listed below. The linux package management tools provide the advantage of trying to install any system software packages freesurfer requires to run.

''Example of placing the CentOS7 tar archive under the $HOME directory belonging to user "tester" '''without using sudo/root privileges'''. Setup commands follow. Shell is bash or Bourne shell.''
Line 11: Line 27:
$ tar -zxvpf freesurfer-linux-centos7_x86_64-7.0.0-beta.tar.gz $ tar -zxvpf freesurfer-linux-centos7_x86_64-7.0.0.tar.gz
Line 23: Line 39:
$ export FREESURFER_HOME=/home/tester/freesurfer $ export FREESURFER_HOME=$HOME/freesurfer
Line 26: Line 42:
-------- freesurfer-local-build-xxxxxx -------- -------- freesurfer-linux-centos7_x86_64-7.0.0-20200427-5b17a0d --------
Line 39: Line 55:
''Example of placing the CentOS7 tar archive under the system location /usr/local by user "tester" with sudo/root privileges. Setup commands follow. Shell is bash or Bourne shell.'' ''Example of placing the CentOS7 tar archive under the system location /usr/local by user "tester" '''using sudo/root privileges'''. Setup commands follow. Shell is bash or Bourne shell.''
Line 45: Line 61:
$ sudo tar -C /usr/local -zxvpf freesurfer-linux-centos7_x86_64-7.0.0-beta.tar.gz $ sudo tar -C /usr/local -zxvpf freesurfer-linux-centos7_x86_64-7.0.0.tar.gz
Line 57: Line 73:
-------- freesurfer-local-build-xxxxxx -------- -------- freesurfer-linux-centos7_x86_64-7.0.0-20200427-5b17a0d --------
Line 69: Line 85:
==== Using the Linux Package Manager ==== ==== Installation with the Yum Package Manager on CentOS 6, 7, and 8 ====
Line 71: Line 87:
The "yum" package manager command is available on Redhat linux and its derivatives (like CentOS) to install, manage, and update the system software. System packages in the form of *.rpm files typically contain source, binaries and/or libraries to install on the system. The *.rpm package also usually contains a list of the system libraries and programs the *.rpm package contents will need in order to run after installation. Yum compares the system dependency information in the *.rpm package against what is currently installed on the system. Then it determines what if any other *.rpm packages need to be downloaded and installed first in order to satisfy the dependencies in the package(s) you have listed on the yum install command line. Yum will present a list of all packages it determines should be installed before installing the packages you ask for. You can accept or refuse to install the list of packages yum provides. A no answer to yum will leave the system unchanged. The "yum" package manager command is available on Redhat/CentOS linux and its derivatives to install, manage, and update the system software. Please note that you will need sudo/root privileges on the system to install software with yum.
Line 73: Line 89:
Exploring yue broad range of yum options is beyond the scope of this freesurfer install example. But it's not surprising that sudo or root privileges to install and change the system contents. (Though a non-privileged user should be able to run yum without sudo and see what is/is not installed on the system). System packages in the form of *.rpm files may contain source, binaries and/or libraries to install on the system. The *.rpm package also usually contains a list of the system libraries and programs the *.rpm package contents will need from the system in order to run after installation. Yum compares the system dependency information in the *.rpm package against what is currently installed on the system. Then it determines what if any other *.rpm packages need to be downloaded and installed in order to satisfy the dependencies for the package(s) you have listed to install on the command. Depending upon what is already installed on your system, yum will figure out what if any system software is missing, and then install it for you. Hence the builtin yum/RPM tools can save you the hassle of trying to figure out what software is missing on your system before you attempt to install and run freesurfer.
Line 75: Line 91:
If the yum command has not been run in a while, the first thing it will do is update the list of the package repositories on the web it uses to search for and download packages from. If we ask yum to tell us if freesurfer is already installed, you might see output like this from yum updating it's list of packages and the sites to fetch them from. [[https://surfer.nmr.mgh.harvard.edu/fswiki/cos67_rpm|CentOS 6 and 7 RPM install]].
Line 77: Line 93:
{{{
$ yum list installed | grep -i freesurfer
updates
(1/2) epel/x86_64 updateinfo
(2/2) updates/7/x86_64/primary_db
...
.. <output deleted / your output will vary>
.
Determining fastest mirrors
* base: mirror.siena.edu
* epel: ewr.edge.kernel.org
...
.. <output deleted / your output will vary>
.
$
}}}

The result of the above command is that nothing was printed out listing an installed freesurfer package and a revision number. Or in the example below, the assumption is that no freesurfer package is currently installed on the system.

We provide a freesurfer *.rpm package for download that is not part of an existing Redhat, CentOS or third-party repository. Yum by default assumes the package is available from an existing collection it has been configured to search for. So in response to the most basic command to install a "freesurfer" package, yum will search through every repository it knows about, find nothing, and then give up.

{{{
$ sudo yum install freesurfer
Loaded plugins: fastestmirror, langpacks
base
centos-sclo-rh
centos-sclo-sclo
epel/x86_64/metalink
epel
extras
fpco
rpmforge
updates
...
.. <output deleted / your output will vary>
.
No package freesurfer available.
Error: Nothing to do
$
}}}

The remedy is to provide command line options to tell yum: (1) the package is not signed as it would be in an online repository; (2) the freesurfer rpm is local to the machine and not to be searched for or downloaded from a repository.

{{{
$ sudo yum --nogpgcheck localinstall freesurfer-CentOS7-7.0.0-0.1.b1.x86_64.rpm
}}}

Screens shots from running the commands above on a CentOS 7.4 system are pictured below.

{{attachment:Cos7_preinstall_1_4.png}}

{{attachment:Cos7_preinstall_2_4.png}}

{{attachment:Cos7_preinstall_3_4.png}}

{{attachment:Cos7_preinstall_4_4.png}}
[[https://surfer.nmr.mgh.harvard.edu/fswiki/cos8_rpm|CentOS 8 RPM install]].

Linux Install & Setup

CentOS 6, 7 and 8

The examples below show how to unpack the Freesurfer 7.0.0 CentOS 7 tar archive, freesurfer-linux-centos7_x86_64-7.0.0.tar.gz, or how to install the rpm file, freesurfer-CentOS7-7.0.0-1.x86_64.rpm.

If you are using CentOS8, then you would use the freesurfer-linux-centos8_x86_64-7.0.0.tar.gz or the freesurfer-CentOS8-7.0.0-1.x86_64.rpm file in the examples below instead of the centOS7 files. Please note the instructions are a bit different for using the RPM in the CentOS8 section compared to the CentOS7 section.

If you are still working with CentOS 6 (which will no longer be supported by RedHat/CentOS projects after November 2020), then you would use the freesurfer-linux-centos6_x86_64-7.0.0.tar.gz or the freesurfer-CentOS6-7.0.0-1.x86_64.rpm. file in the examples below instead of the CentOS7 files.

Ubuntu 14-18

Use the example below where the CentOS7 tar archive, freesurfer-linux-centos7_x86_64-7.0.0.tar.gz, is unpacked - and do the same on your Ubuntu system. We hope to provide an Ubuntu .deb installer package in the near future.

Installation with the Tar Archive

On Linux systems, the tar archive file (.tar.gz) can be expanded under any convenient path/subdirectory on your machine you have permission to write to. For example, you can expand the tar archive under your $HOME directory.

To install freesurfer under a recommended shared system location, e.g., /usr/local, you will typically need sudo or root privileges. Please note that if you have sudo/root privileges, then we recommend using the Installation with the Yum Package Manager process listed below. The linux package management tools provide the advantage of trying to install any system software packages freesurfer requires to run.

Example of placing the CentOS7 tar archive under the $HOME directory belonging to user "tester" without using sudo/root privileges. Setup commands follow. Shell is bash or Bourne shell.

$ cd $HOME
$ pwd
/home/tester
$ tar -zxvpf freesurfer-linux-centos7_x86_64-7.0.0.tar.gz
x freesurfer/
x freesurfer/WMParcStatsLUT.txt
x freesurfer/sessions/
x freesurfer/sessions/README
...
..
<rest of output deleted>

$ cd freesurfer
$ pwd
/home/tester/freesurfer
$ export FREESURFER_HOME=$HOME/freesurfer
$ export SUBJECTS_DIR=$FREESURFER_HOME/subjects
$ source $FREESURFER_HOME/SetUpFreeSurfer.sh
-------- freesurfer-linux-centos7_x86_64-7.0.0-20200427-5b17a0d --------
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME   /home/tester/freesurfer
FSFAST_HOME       /home/tester/freesurfer/fsfast
FSF_OUTPUT_FORMAT nii.gz
SUBJECTS_DIR      /home/tester/freesurfer/subjects
MNI_DIR           /home/tester/freesurfer/mni

$ which freeview
/home/tester/freesurfer/bin/freeview

Example of placing the CentOS7 tar archive under the system location /usr/local by user "tester" using sudo/root privileges. Setup commands follow. Shell is bash or Bourne shell.

$ cd $HOME
$ pwd
/home/tester
$ sudo tar -C /usr/local -zxvpf freesurfer-linux-centos7_x86_64-7.0.0.tar.gz
x freesurfer/
x freesurfer/WMParcStatsLUT.txt
x freesurfer/sessions/
x freesurfer/sessions/README
...
..
<rest of output deleted>

$ export FREESURFER_HOME=/usr/local/freesurfer
$ export SUBJECTS_DIR=$FREESURFER_HOME/subjects
$ source $FREESURFER_HOME/SetUpFreeSurfer.sh
-------- freesurfer-linux-centos7_x86_64-7.0.0-20200427-5b17a0d --------
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME   /usr/local/freesurfer
FSFAST_HOME       /usr/local/freesurfer/fsfast
FSF_OUTPUT_FORMAT nii.gz
SUBJECTS_DIR      /usr/local/freesurfer/subjects
MNI_DIR           /usr/local/freesurfer/mni

$ which freeview
/usr/local/freesurfer/bin/freeview

Installation with the Yum Package Manager on CentOS 6, 7, and 8

The "yum" package manager command is available on Redhat/CentOS linux and its derivatives to install, manage, and update the system software. Please note that you will need sudo/root privileges on the system to install software with yum.

System packages in the form of *.rpm files may contain source, binaries and/or libraries to install on the system. The *.rpm package also usually contains a list of the system libraries and programs the *.rpm package contents will need from the system in order to run after installation. Yum compares the system dependency information in the *.rpm package against what is currently installed on the system. Then it determines what if any other *.rpm packages need to be downloaded and installed in order to satisfy the dependencies for the package(s) you have listed to install on the command. Depending upon what is already installed on your system, yum will figure out what if any system software is missing, and then install it for you. Hence the builtin yum/RPM tools can save you the hassle of trying to figure out what software is missing on your system before you attempt to install and run freesurfer.

CentOS 6 and 7 RPM install.

CentOS 8 RPM install.

FS7_linux (last edited 2021-10-13 04:48:20 by buildqa)