Skip to content

CentOS Imaging installation transcript

christinerogers edited this page Jul 26, 2016 · 21 revisions
  1. Checking if some needed dependencies (needed by the minc toolkit and/or dicom toolkit) are installed:

a) [lorisadmin@ccna mri]$ yum list installed 'libstdc*' b) [lorisadmin@ccna mri]$ yum list installed 'glibc' c) [lorisadmin@ccna ~]$ yum list installed 'gcc*' d) [lorisadmin@ccna mri]$ yum list installed 'perl*'

  1. Creating directories:

[lorisadmin@ccna data]$ sudo mkdir /data/ccna/ [lorisadmin@ccna data]$ cd [lorisadmin@ccna ~]$ [lorisadmin@ccna ~]$ sudo chown -R lorisadmin:lorisadmin /data/ccna [lorisadmin@ccna ~]$ mkdir /data/ccna/bin [lorisadmin@ccna ~]$ mkdir /data/ccna/bin/mri [lorisadmin@ccna ~]$ mkdir /data/ccna/data [lorisadmin@ccna ~]$ mkdir /data/ccna/tarchive [lorisadmin@ccna ~]$ mkdir /data/ccna/trashbin [lorisadmin@ccna ~]$ mkdir /data/ccna/assembly [lorisadmin@ccna ~]$ mkdir /data/ccna/jiv [lorisadmin@ccna ~]$ mkdir /data/ccna/pic [lorisadmin@ccna ~]$ mkdir /data/ccna/logs

[lorisadmin@ccna mri]$ sudo mkdir /data/ccna/data/batch_output [lorisadmin@ccna mri]$ sudo mkdir /data/ccna/bin/mri/dicom-archive/.loris_mri [lorisadmin@ccna dicom-archive]$ sudo chown -R lorisadmin:lorisadmin .loris_mri/

[lorisadmin@ccna ~]$ sudo mkdir /data/incoming [lorisadmin@ccna ~]$ sudo chown -R lorisadmin:lorisadmin /data/incoming

  1. Cloning LORIS-MRI repo

[lorisadmin@ccna ~]$ cd /data/ccna/bin [lorisadmin@ccna bin]$ git clone https://github.com/aces/Loris-MRI.git mri [lorisadmin@ccna mri]$ git submodule init [lorisadmin@ccna mri]$ git submodule sync [lorisadmin@ccna mri]$ git submodule update

  1. Installing ImageMagick needed by the minc toolkit:

[lorisadmin@ccna mri]$ sudo yum install ImageMagick [sudo] password for lorisadmin:

  1. Installing minc tools:

[lorisadmin@ccna mri]$ cd [lorisadmin@ccna ~]$ wget http://packages.bic.mni.mcgill.ca/minc-toolkit/RPM/minc-toolkit-1.0.08-20160205-CentOS_6.7-x86_64.rpm [lorisadmin@ccna opt]$ sudo rpm -Uvh ~/minc-toolkit-1.0.08-20160205-CentOS_6.7-x86_64.rpm [sudo] password for lorisadmin:

  1. Edit the .baschrc file to source the minc tools

[lorisadmin@ccna minc]$ sudo nano ~/.bashrc

I ADDED THE FOLLOWING LINES: Needed for the MincToolkit source /opt/minc/minc-toolkit-config.sh 7) Install dicom toolkit (CharLS was needed first as a dependency)

[lorisadmin@ccna minc]$ cd [lorisadmin@ccna ~]$ wget http://tissuestack.org/downloads/CentOS/dcmtk-3.6.0-0.el6.x86_64.rpm [lorisadmin@ccna ~]$ sudo yum -y install CharLS [sudo] password for lorisadmin: [lorisadmin@ccna ~]$ sudo rpm -i -v dcmtk-3.6.0-0.el6.x86_64.rpm

  1. Cpan to install needed Perl libraries

[lorisadmin@ccna ~]$ sudo cpan cpan1> install Math::Round cpan2> install Getopt::Tabular cpan3> install Time::JulianDay cpan4> install Path::Class THIS FAILED cpan5> install Archive::Extract cpan6> install Archive::Zip cpan7> quit

  1. Install the failed Path library as follows: [lorisadmin@ccna ~]$ sudo yum install perl-Path-Class

  2. [lorisadmin@ccna mri]$ source ~/.bashrc

  3. Use the imaging_install.sh script to do the remaining steps (lines were commented out from the installation script as they were done manually in the steps above; the attached .txt file has the detailed lines that were commented out)

[lorisadmin@ccna mri]$ bash ./imaging_install.sh

MINC Toolkit appears to be installed. What is the database name? ccna What is the database host? 192.168.122.1 What is the MySQL user? lorisdbadmin What is the MySQL password? What is the Linux user which the installation will be based on? lorisadmin What is the project name? ccna What is your email address? [email protected] What prod file name would you like to use? default: prod Enter the list of Site names (space separated) Modifying environment script ./imaging_install.sh: line 119: /data/ccna/bin//environment: No such file or directory

(HERE I JUST ACCIDENTALLY UNCOMMENTED LINE 119 WHICH CREATED THIS MESAGE ON THE LINE ABOVE, SO I JUST COMMENTED BACK AS IT SHOULD BE)

Creating MRI config file config file is located at /data/ccna/bin/mri/dicom-archive/.loris_mri/prod

#9 Updated by Mouna Safi-Harab 5 months ago

Comment I have requested the two following changes from Alden:

a) NFS mount of the /data/ directory makes it such that it needs to be modified (in /etc/fstab) to become exec (from nonexec) https://redmine.cbrain.mcgill.ca/issues/9472

b) Adding to the nginx conf tnl.conf (limits of 2000M), otherwise, Imaging Uploader might issue a "413 Request Entity Too Large" error when uploading a file https://redmine.cbrain.mcgill.ca/issues/9473

c) Setting some php.ini values for the imaging uploader to work as per the recommendations on the Imaging Uploader Loris page (https://github.com/aces/Loris/blob/16.04-dev/modules/imaging_uploader/README.md) https://redmine.cbrain.mcgill.ca/issues/9522

#10 Updated by Mouna Safi-Harab 5 months ago

File InstallationLogScreenShots.txt added #11 Updated by Mouna Safi-Harab 5 months ago

File deleted (InstallationLogScreenShots.txt) #12 Updated by Mouna Safi-Harab 5 months ago

Comment There is an upload issue (imaging_uploader) that is specific to CentOS only. I am adding print statement in a couple of files to trace the problem (more specifically, /var/www/ccna/php/libraries/File_Upload.class.inc and /var/www/ccna/modules/mri_upload/php/NDB_Menu_Filter_mri_upload.class.inc). These changes will all be reverted.

UPDATES:

Issue resolved when item (c) above got resolved (namely the maximum upload file size increased).

#13 Updated by Mouna Safi-Harab 5 months ago

Comment InstallationLogScreenShots.txt file attached is updated because I had to install DBD::mysql needed for the imaging pipeline scripts.

[lorisadmin@ccna ~]$ sudo cpan [sudo] password for lorisadmin: Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9402) Enter 'h' for help.

cpan1> install DBD::mysql

BUT THIS FAILED... the last few lines of the execution gives: make: *** [dbdimp.o] Error 1 CAPTTOFU/DBD-mysql-4.033.tar.gz /usr/bin/make -- NOT OK Warning (usually harmless): 'YAML' not installed, will not store persistent state Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Failed during this command: CAPTTOFU/DBD-mysql-4.033.tar.gz : make NO

So I re-installed using: [lorisadmin@ccna ~]$ sudo yum install "perl(DBD::mysql)" [sudo] password for lorisadmin:

THIS SEEMS TO WORK, with the last few messages:

Installed: perl-DBD-MySQL.x86_64 0:4.013-3.el6

Complete!

#14 Updated by Mouna Safi-Harab 5 months ago

File InstallationLogScreenShots.txtMagnifier added #15 Updated by Mouna Safi-Harab 5 months ago

File deleted (InstallationLogScreenShots.txt) #16 Updated by Mouna Safi-Harab 5 months ago

Comment LORIS-MRI:

  1. switched branch to 15.10 (from master) as follows:

[lorisadmin@ccna mri]$ git tag -l lorismri-14.11 lorismri-15.04 lorismri-15.10-rc1 v15.10 [lorisadmin@ccna mri]$ git checkout tag/v15.10

  1. moved the following directories from /data/ccna/ to within /data/ccna/data/ (those should have been created there in the first place): [lorisadmin@ccna ccna]$ mv tarchive/ data/ [lorisadmin@ccna ccna]$ mv trashbin/ data/ [lorisadmin@ccna ccna]$ mv assembly/ data/ [lorisadmin@ccna ccna]$ mv jiv/ data/ [lorisadmin@ccna ccna]$ mv pic/ data/ [lorisadmin@ccna ccna]$ mv logs/ data/

#17 Updated by Mouna Safi-Harab about 1 month ago

Comment After Alden has changed the permissions and group on our /data/ccna/data directories (see #10142), here are additional changes I made as a follow up:

In /data/ directory, we have to do the same for the incoming directory (so apache can upload using the imaging uploader but we want lorisadmin to be able to process the data as well):

  1. [lorisadmin@ccna data]$ sudo chown lorisadmin:apache incoming/
  2. [lorisadmin@ccna data]$ sudo chmod 770 incoming/
  3. [lorisadmin@ccna data]$ sudo chmod g+s incoming/ Our install script now makes lorisadmin part of apache group (they have to be part of the same group to be able to read/write into same directories for processing and to be able to load brainbrowser in the front-end): sudo usermod -a -G apache lorisadmin In the Front-End, I changed the Paths of the Loris-MRI Code to be /data/ccna/bin/mri/ (from /data/ccna/data/) I copied the prod file from staging to production (in /data/ccna/bin/mri/dicom-archive/.loris-mri/) (the file has two changes: namely in the isFileToBeRegisteredGivenProtocol() function and getSubjectIDs() for phantoms) /data/ccna/bin/mri/environment file updated to reflect latest release (namely source the minc toolkit and umask 0002) updated the Loris-MRI code base to 16.0.0 release as follows: (with Zia) git fetch origin (with Zia) git pull origin master git submodule update (to update the dicom-archive submodule)

in /var/www/ccna/project/config.xml: I added:

/opt/minc/

Clone this wiki locally