Project

General

Profile

Actions

Instructions for installing CentOS on your computer » History » Revision 1

Revision 1/55 | Next »
Amber Herold, 01/18/2010 02:26 PM


Start from scratch by installing CentOS on your computer

*Appion-CentOS Install Manual: *

by Neil Voss

  • 1. Introduction
  • 2. Install CentOS operating system * 2.1. Download the latest ISO disk of CentOS * 2.2. Burn ISO file to DVD disk * 2.3. Install CentOS 5 with default packages * 2.4. Add yourself to the sudoers file
  • 3. Download additional software * 3.1. Install the additional package repositories * 3.1.1. Extra Packages for Enterprise Linux (EPEL) * 3.1.2. RPM Fusion * 3.2. Update current packages
  • 4. Download and install Leginon and associated packages
  • 5. Compile and setup python (pyappion) programs * 5.1. Compile FindEM * 5.2. Compile Ace2 * 5.3. Compile Radermacher module * 5.4. Test PyAppion
  • 6. Setup MySQL (appiondata) databases
  • 7. Install webpages (appionweb)
  • 8. Install external packages * Compile Xmipp for OpenMPI
  • 9. Install a PBS job submission system

= 1. Introduction =

These are the Steps to install Appion on a CentOS machine

= 2. Install CentOS operating system =

NOTE
CentOS vs. RHEL

CentOS is the exact same as Red Hat Enterprise Linux (RHEL), except that it is free and supported by the community

The reason I mention CentOS is because I wanted to keep the guide really simple. Another student and I run appion on Fedora 10 and we've run appion on SuSe in the past. I know we gotten most bits working on MacOSX, but some of the python libraries contain ancient Fortran code that does not compile easily on a Mac. But CentOS is certainly not a requirement in general, it is just that the first iteration of the guide is written for CentOS.

2.1. Download the latest ISO disk of CentOS # ISO files are available at * http://wiki.centos.org/Download # Click on i386 for 32bit machines or x86_64 for 64bit machines # Pick a mirror and download 'CentOS-5.3-x86_64-bin-DVD.iso' file 2.2. Burn ISO file to DVD disk

Use dvdrecord in Linux to burn disk

{{{
$ dvdrecord -v -dao gracetime=10 dev=/dev/dvd speed=16 CentOS-5.3-i386-bin-DVD.iso
}}}

2.3. Install CentOS 5 with default packages * Only "Desktop - GNOME" is assumed to be installed * More information available at [http://wiki.centos.org/Documentation CentOS Documentation] 2.4. Add yourself to the sudoers file

Add this line below the root version:

{{{
$ username ALL=(ALL) ALL
}}}


= 3. Download additional software =

3.1. Install the additional package repositories

[NOTE]
There are several additional CentOS repositories that you can install.
These repositories provide additional packages, such as patented software (MP3 players),
closed source applications (Flash plugin, Adobe Acrobat Reader)
and lesser used packages (python numpy, Gnu Scientific Library).
But some repositories install packages over other packages,
which can cause problems and conflicts (ATrpms is bad at this). So I recommend only installing
EPEL and RPM Fusion. Read more here:
[http://wiki.centos.org/AdditionalResources/Repositories CentOS Additional Repositories]

=== 3.1.1. Extra Packages for Enterprise Linux (EPEL) ===

.Download repository rpm and install

{{{
$ sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/`uname -i`/epel-release-5-3.noarch.rpm
}}}

=== 3.1.2. RPM Fusion ===

.Download repository rpms and install

{{{
$ sudo rpm -Uhv http://download1.rpmfusion.org/free/el/updates/testing/5/`uname -i`/rpmfusion-free-release-5-0.1.noarch.rpm
$ sudo rpm -Uvh http://download1.rpmfusion.org/nonfree/el/updates/testing/5/`uname -i`/rpmfusion-nonfree-release-5-0.1.noarch.rpm

}}}

3.2. Update current packages

.Update the updater to make life easier

{{{
$ sudo yum -y update yum
}}}

.Update all packages

{{{
$ sudo yum -y update
}}}

[NOTE]
Download was over 129 MB (in July 2009). If you have a slow internet connection you can setup presto/deltarpms, [http://www.linux-archive.org/centos-development/222706-presto-deltarpm.html see this email]

.Install Complete list of additional packages:

  • python tools: python-tools python-devel
  • general applications: subversion ImageMagick grace gnuplot python-matplotlib
  • Tilt Picker: wxPython numpy scipy python-imaging
  • FindEM: gcc-gfortran compat-gcc-34-g77
  • Ace 2: gcc-objc fftw3-devel gsl-devel
  • Sinedon: mysql mysql-server MySQL-python
  • DBEM: httpd php php-mysql phpMyAdmin
  • Xmipp MPI: gcc-c++ openmpi-devel libtiff-devel
  • MRC tools: php-devel gd-devel re2c fftw2-devel php-gd
  • UCSF Chimera imaging: xorg-x11-server-Xvfb

{{{
$ sudo yum -y install \
python-tools python-devel python-matplotlib \
subversion ImageMagick grace gnuplot \
wxPython numpy scipy python-imaging \
gcc-gfortran compat-gcc-34-g77 \
gcc-objc fftw3-devel gsl-devel \
mysql mysql-server MySQL-python \
httpd php php-mysql phpMyAdmin \
gcc-c++ openmpi-devel libtiff-devel \
php-devel gd-devel re2c fftw2-devel php-gd \
xorg-x11-server-Xvfb
}}}

If you have an nVidia video card and setup RPM fusion, install the nVidia binary, will speed things up especially for UCSF Chimera

{{{
$ sudo yum -y install nvidia-x11-drv
}}}

.Clean up packages to save drive space

{{{
$ sudo yum clean all
}}}

.Re-index the hard drive, this will come in handy later

{{{
$ sudo updatedb
}}}

.Enable servers on reboot

{{{
$ sudo /sbin/chkconfig httpd on
}}}

{{{
$ sudo /sbin/chkconfig mysqld on
}}}

You can further configure this with the GUI and turn off unnecessary items

{{{
$ system-config-services
}}}

.Reboot the computer

{{{
$ sudo reboot
}}}

= 4. Download and install Leginon and associated packages =
Refer to [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#5._processing_server-side_installation]
----

= 5. Compile and setup python (pyappion) programs =

5.1. Compile FindEM * Goto pyappion/findem folder to make findem.exe * Compile the libraries and binary

{{{
$ make
}}}

  • Test findem.exe to see if it runs

{{{
$ make test
}}}

[WARNING]
Only if the first part fails, you must add the path to libg2c.so library file.
Otherwise skip to next section.

  • locate libg2c.so library file

{{{
$ ls /usr/lib/gcc/`uname -i`-redhat-linux/3.4.6/libg2c.so
}}}

{{{
$ locate libg2c.so
}}}

  • Edit Makefile with location of libg2c.so

{{{
$ nano Makefile
}}}

  • Example: EXLIBS=-L/usr/lib/gcc/i386-redhat-linux/3.4.6/ -lg2c
  • Re-compile
5.2. Compile Ace2

[WARNING]
ace2 typically requires fftw 3.2 or greater, but you can remove the FFTW_WISDOM_ONLY flag in Image.m

[NOTE]
64 bit binaries are included with pyappion

  • Goto pyappion/ace2
  • compile the libraries and binary
  • test to see if program runs

{{{
$ make
$ ./ace2.exe -h
$ ./ace2correct.exe -h
$ mv -v ./ace2*.exe ../bin
}}}

5.3. Compile Radermacher module * Goto pyappion/radermacher * compile the libraries and binary

{{{
$ python ./setup.py build
}}}

  • install module globally

{{{
$ sudo python ./setup.py install
}}}

  • test installed module

{{{
$ python
}}}

{{{

import radermacher
<Ctrl-D>

}}}

5.4. Test PyAppion * Go into pyappion directory * Add leginon to PYTHONPATH if Leginon is built locally

{{{
$ export PYTHONPATH="$LEGINONPATH:$PYTHONPATH"
}}}

  • Add pyappion lib to PYTHONPATH

{{{
$ export PYTHONPATH="/your-complete-path-to-pyappion/lib:$PYTHONPATH"
}}}

  • Run the test script

{{{
$ ./check.sh
}}}

[NOTE]
You can ignore EMAN, MATLAB, and UCSF Chimera errors at this point


= 6. Setup MySQL (appiondata) databases =

Refer to [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#2._Setup_MySQL_databases]

Configure MySQL

Edit the configuration file:

{{{
$ sudo nano /etc/my.cnf
}}}

Add or edit the following lines:

{{{
query_cache_type = 1
query_cache_size = 100M
query_cache_limit= 100M
}}}

Restart MySQL

{{{
$ sudo /sbin/service mysqld restart
}}}

Configure phpMyAdmin

Edit the phpMyAdmin config file:

{{{
$ sudo nano /etc/phpMyAdmin/config.inc.php
}}}

and change the following lines:

{{{
$cfg['Servers'][$i]['AllowRoot'] = FALSE;
}}}

Edit the phpMyAdmin apache config file:

{{{
$ sudo nano /etc/httpd/conf.d/phpMyAdmin.conf
}}}

and change the following lines:

{{{
<Directory /usr/share/phpMyAdmin/>
order deny,allow
deny from all
allow from 127.0.0.1
allow from YOUR_IP_ADDRESS
</Directory>

}}}


= 7. Install webpages (appionweb) =

Refer to [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#3._web_server-side_installation]

Install MRC Tools

=== Compile MRC tools ===

  • Go to your php devel directory and untar the archive
  • If unsure where it is, use info.php to find it under extension_dir

{{{
$ cd /usr/include/php/ext/
$ sudo mkdir mrc
$ sudo chmod 777 mrc
$ sudo chown $USER mrc
}}}

{{{
$ tar zxvf ~/php_mrc.tgz
$ cd mrc/
}}}

  • Compile and install the MRC module

{{{
$ phpize
$ ./configure
$ make
$ sudo make install
}}}

=== Configure PHP for MRC Tools ===

  • Edit your php configuration file php.ini to add "mrc.so" extension.

{{{
$ sudo nano /etc/php.d/mrc.ini
}}}

  • add mrc.so to extensions

{{{
; Enable mrc extension module
extension=mrc.so
}}}

Configure PHP * increase the memory limit, EM images are big 64MB:

{{{
memory_limit = 256M; Maximum amount of memory
}}}

  • Turn error display on:

{{{
display_errors = On
}}}

{{{
error_reporting = E_ALL & ~E_NOTICE
}}}

  • restart the webserver

{{{
$ sudo /sbin/service httpd restart
}}}

Install DBEM and project php source

Please consult the other [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#3._web_server-side_installation Install guide]

Configuration

=== configure apache ===

  • allow REMOTE_HOST lookups in apache

{{{
$ sudo nano /etc/httpd/conf/httpd.conf
}}}

  • turn HostnameLookups to On

{{{
HostnameLookups On
}}}

  • restart the webserver

{{{
$ sudo /sbin/service httpd restart
}}}

=== configure project_1_2, dbem_1_5_1, and dbem_1_5_1/processing ===

Please consult the other [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#3._web_server-side_installation Install guide]

Initialize database tables from the web tools

Please consult [http://code.google.com/p/appion/wiki/AppionInstall_with_Leginon#4._Create_a_test_project_and_processing_database]

Potential problems

=== Firewall settings ===

You may need to configure your firewall to allow incoming HTTP (port 80) and MySQL (port 3306) traffic:

{{{
$ system-config-securitylevel
}}}

=== Security-enhanced linux ===

[http://en.wikipedia.org/wiki/Security-Enhanced_Linux Security-enhanced linux (SELinux)] may be preventing your files from loading. To fix this run the following command:

{{{
$ sudo /usr/bin/chcon -R -t httpd_sys_content_t /var/www/html/
}}}

see [http://docs.fedoraproject.org/selinux-apache-fc3/sn-simple-setup.html this website] for more details on SELinux


= 8. Install external packages =
Please follow individual package installation instruction provided with them

Compile Xmipp for OpenMPI * For more info, see http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/InstallingTheSoftware * Go into Xmipp source directory * Find openmpi directory

{{{
$ locate libmpi.so
}}}

{{{
/usr/lib/openmpi/1.2.7-gcc/lib/libmpi.so
}}}

  • Setup Xmipp to use openmpi by changing three lines in SConstruct

{{{
$ cp SConstruct SConstruct.orig
}}}

{{{
$ nano SConstruct
}}}

{{{
opts.Add('MPI_INCLUDE', 'MPI headers dir ', '/usr/lib/openmpi/1.2.7-gcc/include/')
opts.Add('MPI_LIBDIR', 'MPI libraries dir ', '/usr/lib/openmpi/1.2.7-gcc/lib/')
opts.Add('MPI_LIB', 'MPI library', 'mpi')

}}}

  • Compile

{{{
$ sudo mpi-selector --yes --system --set `rpm --qf '%{NAME}-%{VERSION}-gcc-%{ARCH}\n' -q openmpi`
}}}

{{{
$ export PATH=$PATH:/usr/lib/openmpi/1.2.7-gcc/bin
}}}

{{{
$ ./scons.configure
}}}

you should see the line: {{{
  • Checking for MPI ... yes
    }}}

{{{
$ ./scons.compile
}}}

= 9. Install a PBS job submission system =

You'll need to install a [http://en.wikipedia.org/wiki/Portable_Batch_System Portable Batch System] for job submission, such as [http://en.wikipedia.org/wiki/TORQUE_Resource_Manager TORQUE]. I know Torque comes with Fedora 10, but not CentOS.

  • An RPM is available in the EPEL testing section

{{{
$ sudo yum -y --enablerepo=epel-testing install torque
}}}

or another way to get packages

{{{
$ wget http://centos.karan.org/el5/extras/testing/`uname -i`/RPMS/torque-2.1.9-1.el5.kb.`uname -i`.rpm
$ sudo yum -y localinstall --nogpgcheck torque-2.1.9-1.el5.kb.`uname -i`.rpm
$ #sudo rpm -Uhv torque-2.1.9-1.el5.kb.`uname -i`.rpm
}}}

After installing torque it needs to be configured. Sorry, we have no documentation for configuring torque at this time. You may try http://www.clusterresources.com/products/torque-resource-manager.php

Updated by Amber Herold almost 15 years ago · 1 revisions