Compiling the python-igraph with Python 2.7 on CentOS 5

Step 1: Install Python 2.7

python-igraph requires Python 2.5 and above. Do look at Installing and Compiling Python 2.7.8 on CentOS 5

Step 2: Download and unpack python-igraph from python-igraph.

The current version is python-igraph 0.7

Step 3: Unpack and compile

# tar -zxvf python-igraph-0.7.0
# cd  python-igraph-0.7.0
# python setup.py install

If you encounter errors similar to /usr/lib64/libxml2.a: could not read symbols: Bad value

Step 4: Copy and update to /usr/local/

If you want to put all the packages in an easier to find directory. Copy

# mkdir -p /usr/local/python-igraph-0.7.0/bin
# mkdir -p /usr/local/python-igraph-0.7.0/lib
# cp $PYTHON-IGRAPH-HOME/build/scripts-2.7/igraph /usr/local/python-igraph-0.7.0/bin
# cp -rv $PYTHON-IGRAPH-HOME/build/scripts-2.7/lib.linux-x86_64-2.7/igraph /usr/local/python-igraph-0.7.0/lib
# cp -rv $PYTHON-IGRAPH-HOME/igraphcore/lib/libigraph.so* /usr/local/python-igraph-0.7.0/lib

Step 5: Test the python-igraph libraries.
Update .bashrc

export PATH=$PATH:/usr/local/python-igraph-0.7.0/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/python-igraph-0.7.0/lib

Test with python on the command line

$ python2.7
Python 2.7.8 (default, Jul 17 2014, 14:44:57)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import igraph
>>>

 


*Easier Method*

You can use pip to install. For more information on how to install and use pip, see Installing and Compiling Python 2.7.8 on CentOS 5

 

References:

  1. Python, igraph in CentOS
  2. Installing python-igraph on linux

 

Installing and Compiling Python 2.7.8 on CentOS 5

Step 1: Download the Python 2.7.8 from Python Site

Step 2: Use GCC44 to compile. If you have not done it, do

# yum install gcc44 gcc44-c++ gcc44-gfortran

Step 3: Update your alias in your  .bashrc

alias gcc='gcc44'

Step 4: Configure python 2.7.8

# cd python-2.7.8
# ./configure --prefix=/usr/local/python-2.7.8
# make -j 8
# make install

Step 5: Update the PATH and LD_LIBRARY_PATH in your .bashrc

export PATH=$PATH:/usr/local/python-2.7.8/bin.........
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/python-2.7.8/lib

Step 6: Download get-pip.py
For more information see pip installation site

Create a directory inside python2.7 directory and put pip in that directory

# mkdir /usr/local/python-2.7.8/pip
# wget https://bootstrap.pypa.io/get-pip.py .

Step 7: Install pip with Administrator rights

# python2.7 get-pip.py

If setuptools (or distribute) is not already installed, get-pip.py will install setuptools for you.
To upgrade an existing setuptools (or distribute), run

# pip install -U setuptools
# pip install numpy

Installing and Configuring GIT on CentOS 5

Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Branching and merging are fast and easy to do.

Step 1: Installing Dependencies required by GIT

# yum -y install zlib-devel openssl-devel perl cpio expat-devel gettext-devel

Step 2: Compile and Installing CURL

What is CURL? curl is a command line tool for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP.

# wget http://curl.haxx.se/download/curl-7.18.2.tar.gz
# tar xzvf curl-7.18.2.tar.gz
# cd curl-7.18.2
# ./configure
# make
# make install

Step 3: ldconfig /usr/local/lib

# vim /etc/ld.so.conf.d/common.conf

 

/usr/local/lib

Step 4: Install GIT

# wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz
# tar xzvf git-latest.tar.gz
# cd git
# autoconf
#./configure –with-curl=/usr/local
# make
# make install

Horray it is done.

Credits: Much of the credit of the materials must go to http://turbolinux.org/tag/centos-git/

Installing dokuwiki on CentOS 6

This writeup is a modification from Installing dokuwiki on CentOS

 

Step 1: Get the latest dokuwiki  from http://download.dokuwiki.org/

# wget http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
# tar -xzvf dokuwiki-stable.tgz

Step 2: Move dokuwiki files to apache directory

# mv dokuwiki-stable /var/www/html/docuwiki

Step 3a: Set Ownership and Permission for dokuwiki

# chown -R apache:root /var/www/html/dokuwiki
# chmod -R 664 /var/www/html/dokuwiki/
# find /var/www/html/dokuwiki/ -type d -exec chmod 775 {} \;

Step 3b: Remember to modify your mod_security or disable your selinux

# setenforce 0

Step 4: Continue the installation http://192.168.1.1/docuwiki/install.php

Ignore the security warning, we can only move the data directory after installing.
fill out form and click save

Step 5: Delete install.php for security

# rm /var/www/html/dokuwiki/install.php

Step 6: Create and move data, bin (CLI) and cond directories out of apache directories for security

Assuming apache does not access /var/www, only /var/www/html and /var/cgi-bin secure dokuwiki (or use different directory):

# mkdir /var/www/dokudata
# mv /var/www/html/dokuwiki/data/ /var/www/dokudata/
# mv /var/www/html/dokuwiki/conf/ /var/www/dokudata/
# mv /var/www/html/dokuwiki/bin/ /var/www/dokudata/

 Step 7: Update dokuwiki where the conf directory

# vim /var/www/html/dokuwiki/inc/preload.php
<?php
// DO NOT use a closing php tag. This causes a problem with the feeds,
// among other things. For more information on this issue, please see:
// http://www.dokuwiki.org/devel:coding_style#php_closing_tags

define('DOKU_CONF','/var/www/dokudata/conf/');

* Note the comments why there is no closing php

Step 8: Update dokuwiki where the data directory is

# vim /var/www/dokudata/conf/local.php
$conf['savedir'] = '/var/www/dokudata/data/';

Step 9: Set permission for dokuwiki again for the new directory with same permissions

# chown -R apache:root /var/www/html/dokuwiki
# chmod -R 664 /var/www/html/dokuwiki/
# find /var/www/html/dokuwiki/ -type d -exec chmod 775 {} \;

# chown -R apache:root /var/www/dokudata
# chmod -R 664 /var/www/dokudata/
# find /var/www/dokudata/ -type d -exec chmod 775 {} \;

 

Step 10: Go to wiki http://192.168.1.1/docuwiki/install.php

Installing and Compiling Mankai Common Lisp on CentOS 5

ManKai Common Lisp (MKCL) aims to be a full implementation of the Common Lisp language in compliance with the ANSI X3J13 Common Lisp standard.

MKCL supports the operating systems Linux and Microsoft Windows, running on top of Intel x86 or AMD64 compatible processors.

For more information on installation of MKCL, do look at http://common-lisp.net/project/mkcl/

Do note that Starting with MKCL 1.1.0, MKCL requires the platform supplied GMP
library, and GMP development version when compiling MKCL from its
sources.

Installing GMP can be taken from a section Compiling GNU 4.7.2 on CentOS 5

GMP

  Download the following prerequistics applications libraries from ftp://gcc.gnu.org/pub/gcc/infrastructure/

1. Install gmp-4.3.2

# bunzip2 gmp-4.3.2.tar.bz2
# tar -zxvf gmp-4.3.2.tar
# cd gmp-4.3.2
# ./configure --prefix=/usr/local/gmp-4.3.2
# make
# make install

Update your .bashrc

.....
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/gmp-4.3.2/lib........
......

Compiling mkl

# tar xvf mkcl-1.1.8.tar.gz
# cd mkcl-1.1.8
#./configure
# make -j 8 install

Compiling Java 7 on CentOS 5 and 6

Step 1: Go to Oracle Java Download site and select the

Step 2: Unpack the Archive

# cd /usr/local/
# tar -zxvf jdk-7u51-linux-x64.tar.gz

Step 3: Setup the Environmental Variables. At your .bashrc

export JAVA_HOME=/usr/local/jdk1.7.0_51
export JRE_HOME=/usr/local/jdk1.7.0_51/jre
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin

Step 4: Check the version

# java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

Compiling gnuplot 4.6.4 on CentOS 5

I compiled gnuplot 4.6.4 on CentOS 5.4

Step 1: Install prerequisites,

(a) wxGTK and wxGTK-devel,

(b) readline, readline-devel

(c) gd, gd-devel

# yum install wxGTK wxGTK-devel readline readline-devel gd gd-devel

Step 2: Compile gnuplot-4.6.4

# tar -zxvf  gnuplot-4.6.4
# cd gnuplot-4.6.4
# ./configure --prefix=/usr/local/gnuplot-4.6.4
# make
# make install

If you are having issues, do take a note at the fedora forum below

References:

  1. http://forums.fedoraforum.org/showthread.php?p=1397790
  2. gnuplot homepage

Compiling R-3.0.2 on CentOS 5

Do note that R-3.0.2 requires a higher version of gfortran 4.4.4 and above. To help ensure that the gfortran44 is installed, do check that the gnu44 are installed. For more information how to install, see Installing GNU 4.4 of C, C++ and gfortran for CentOS 5

Compiling R-3.0.2

# tar -zxvf 3.0.2.tar.gz 
# ./configure --prefix=/usr/local/R-3.0.2/ CC=gcc44 CXX=g++44 F77=gfortran44 FC=gfortran44
# make
# make install