Install VSFTPD on CentOS Enable local user to log in to their home directory

Install VSFTPD on CentOS, enable L

$ yum install vsftpd

Make necessary configurations for vsftpd

$ vim /etc/vsftpd/vsftpd.conf

There are many configuration options, configure according to your needs.

Disable anonymous FTP

anonymous_enable=NO

Allow local user to log in

local_enable=YES

trap FTP users in their own /home/username directory

chroot_local_user=YES

 

Start the vsftpd service

$ /etc/init.d/vsftpd start

 Turn on vsftpd service on boot

$chkconfig vsftpd on

 

If you can not get access to the FTP server, check the iptables at /etc/sysconfig/iptables to allow whichever port you used for your vsftpd

and restart the iptables /etc/init.d/iptables restart

 

Find and replcae across multiple files in linux

I have been looking a better way to replace certain string in a file accross many folders under one directory and come up with two sultions.

$ find . -name "*.html" -print | xargs sed -i 's/base_site.html/base.html/g'
$ grep -lir "base.html" * | xargs sed -i 's/base.html/base_site.html/g'

The differences are find-- looking for files based on the file names, means it only modifies certain type of file

                                grep-- looking for files based on the content of the file, any files contains "base.html" string will be replaced.

 

Installing HTSeq on CentOS 5.4

Installing lapack, blas and atlas on CentOS 5

1. Installing lapack and atlas on CentOS 5.4 is very simple if you have enabled EPEL and RPMForge on CentOS.

For how to enable this repositories, go to http://wiki.centos.org/AdditionalResources/Repositories

$ sudo yum install atlas.x86_64 lapack.x86_64

2. Install numpy and scipy make sure you use the correct pip tool

$ sudo pip2.7 install numpy

Before installing Scipy do the followings to prevent the failure:

sudo ln -s /usr/lib64/liblapack.so.3.0.3 /usr/lib64/liblapack.so

$ sudo ln –s /usr/lib64/liblapack.so.3.0.3 /usr/lib64/liblapack.so
$ sudo ln –s /usr/lib64/libblas.so.3.0.3 /usr/lib64/libblas.so

then do the installation

$ sudo pip2.7 install scipy

3. Install HTSeq

$ sudo pip2.7 install HTSeq

 Test installation:

$ python2.7
>>>import HTSeq
 

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...