Sunday, June 13, 2010

Changing IP Address or Server Name for Gallery configuration file

I was searching how to change the IP Address / Server Name for the  Open Source Gallery software. Finally realise how to change with command line
# vim /var/www/html/gallery/config.php
sdsdsd

.......
$gallery->app->photoAlbumURL = "http://linuxtoolkit.blogspot.com/gallery";
$gallery->app->albumDirURL = "http://linuxtoolkit.blogspot.com/gallery";
.......

Monday, June 7, 2010

Installng E-Book Reader - FBReader for Fedora 12


FBReader is an e-book reader for various platforms. Currently FBReader works on both Linux and Windows.

FBReader supports a number of format including: epub, fb2, chm etc. For more information on the supported format, read Electronic Book Formats (supported and unsupported). However, pdf is not fully supported except for text which is quite a waste.

It s definitely a very light and low resource footprint application. You may want to consider Evince for a Desktop Document Reader Gnome evine - Document Viewer

To install for fedora 12, just do a
# yum install fbreader

Sunday, June 6, 2010

Setting ProFTPD on Fedora and CentOS

I have not setup FTP server for a long time. Most of the time when I want to transfer files, I usually use SCP of SFTP. But this blog entry is a simple instruction set how to setup and configure basic FTP service. I'm using the ProFTPD on Fedora 12. Most of the material has been taken and modified from Linux Format Magazine

First thing first. What is ProFTP?

 ProFTPD is a stable and full-featured FTP Server. It can be run as a standalone server or from xinetd. It supports anonymous, authenticated logins, authenticated with LDAP directories or even sql databases.

 Installation of ProFTP Server
yum install proftpd
chkconfig --levels 235 ptoftpd on

To enable anonymous logins, edit the /etc/sysconfig/proftpd file
# vim /etc/sysconfig/proftpd

Inside the /etc/sysconfig/proftpd file
PROFTPD_OPTIONS="-DANONYMOUS_FTP"

# service proftpd restart

The default home directory of the anonymous logins is /var/ftp/
The default directory to place content for anymous users to put is at /var/ftp/pub
The default directory for anonymous users to upload to /var/ftp/upload


2. Virtual Hosting
Unfortunately, FTP require different IP Address for each site even though it is supposed to be virtual hosting. Unlike HTTP protocol which includes a host header field.

 Assuming you have several IP Addresses which you can use uniquely for your Virtual Hosting, you still need to set up IP Alias on the network card and a "VirtualHost" section in the proftpd.conf

Create a Network Card Alias
Step 2a - Create a network card alias for the network card
# touch /etc/sysconfig/network-scripts/ifcfg-eth0:N 
(where N is the alias number)

Step 2b: Inside ifcfg-eth0:N
DEVICE=eth0:1
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.2
HARDWARE=xx:xx:xx:xx:xx:xx

Step 2c: Restart Network Service
# service network restart


Step 3: Configure the VirtualHost inside the /etc/proftpd.conf
The script is rather long, you can get a sample from http://www.proftpd.org/docs/configs/virtual_authuserfile.conf

Bascially, you can change the Default Chdir to a new path ie /var/ftp/site2/pub. You can also change the message /var/ftp/site2/welcome.msg


Further Notes:
  1. List of Directives for ProFTPD configuration files 
  2. Active FTP vs. Passive FTP, a Definitive Explanation
  3. Virtual Hosting With Proftpd And MySQL (Incl. Quota)
  4. PROFTPD virtual user – quick howto

Wednesday, June 2, 2010

Reading the Linux manual pages online

I know that there are many online manual for Linux. I particularly like "Linux man pages" from http://linux.die.net/man/ as it not only have hyperlinks and quite a large repositories of linux tools. Not too bad

Tuesday, June 1, 2010

Voltaire 40 Gb InfiniBand Switch Module for IBM BladeCenter (IBM Redbook)

This Voltaire 40 Gb InfiniBand Switch Module for IBM BladeCenter (IBM Redbook) is a good writeup on hardware requirements to setup Voltaire 40 Gb InfiniBand Switch Module on IBM Blade Center H