Diskless client can be very useful for educational institutes, testing setups or the networks that have limited hardware resources available with them. Linux offers a robust diskless environment that can be configured on CentOS with ease.

Server Setup

To configure server we need (NFS, xinetd, tftp and dhcp server). I hope all these services already installed in your system. If you do not find these services in your system you can install all of them as follow

yum install  xinetd tftp-server nfs-utils nfs-utils-lib sytem-config-nfs busybox-anaconda system-config-netboot

Create a directory on the NFS server to contain the diskless environment such as /diskless/i386/TECHBABU/ e.g

mkdir -p /diskless/i386/TECHBABU/root/
mkdir -p /diskless/i386/TECHBABU/snapshot

In the above configuration I have selected (TECHBABU) as operating identifier. You can change according to your need.

Configuring the NFS Server

Edit file /etc/exports

/diskless/i386/TECHBABU/root/     *(rw,sync,no_root_squash)
/diskless/i386/TECHBABU/snapshot/ *(rw,sync,no_root_squash)

Next we need to start NFS Server

service nfs start

Let’s copy a running Linux OS in diskless environment through rsync utility. For example: Read the rest of this entry »

linux_media_server

Linux media server for music allows users to save space on their PCs. The Firefly Media Server (previously called mt-daap) is fast DAAP server which is easy to install and configure. Firefly needs a simple Linux machine which in our case is Ubuntu Server.

The Firefly server has the following features:

  • Supports Unix/POSIX
  • On the fly transcoding of OGG, FLAC, Apple Lossless, and WM
  • User-created smart playlist support
  • Integrates with iTunes and many other DAAP-supporting media players
  • Serve streaming radio stations

Installation

sudo apt-get install mt-daapd

Configuring Media Server

There is no lengthy configuration required. We only need to to create an directory for our media files. For this just find mp3_dir keyword from media server configuration file /etc/mnt-daapd.conf

In my system’s configuration I have found (/home/media/music). Now lets create this directory.

sudo mkdir /home/media/music Read the rest of this entry »

Text processing in Linux can be done using sed, cut, grep commands and with vi editor. We can find and replace a string, find and delete string etc.

Finding IP Addresses from Apache Log file through cut command

cut -d ‘-’ -f1   /var/log/httpd/access_log
  • The -d ‘-’ refers to delimeter –
  • The -f1 is for first field in Apache log file

Remove particular IP Addresses from Apache log through sed command

sed -ie ‘/^10\.0\./d’ /var/log/httpd/access_log
  • The -ie refers to inline edit in file
  • The ‘/^10 indicates that IP must start with 10
  • The \ indicates that special character . is text
  • The /d indicates that delete this line

Remove lines containing a key word through sed

sed -i  ’1,30{/index/d}’ /var/log/httpd/access_log
  • The 1,30 refers to first 30 lines
  • The {/index/d} indicates delete lines containing word “index”

Remove blank lines from a text file using vi editor

:g/^$/ d
  • The g refers globally
  • The ^$/ d indicates delete blank lines

Remove special character # from a text file using vi editor

:1,$s/\#//g
  • The $s/ refers search from start
  • The \# indicates take # as character
  • The //g replace it with nothing i.e remove character

source here

Secure Email Server On Centos   June 4th, 2010

Qmailtoaster is a project whose purpose is to install Qmail with RPMs on RPM based Linux and these RPMs are source RPMs. The advantage of Qmailtoaster is that it contains all patches needed for Qmail for example domainkeys etc.

Included Featureset by Qmailtoaster

  • Source RPM packages easily rebuilt for multiple distributions
  • SMTP with SMTP-AUTH, TLS, REMOTE-AUTH
  • DomainKeys, SPF “Sender Policy Framework” and SRS “Sender Rewriting Scheme”
  • Integrated SpamAssassin, ClamAV and Simscan
  • Warlord virus and worm loader realtime MIME signature scanning
  • CHKUSER 2.0 functions for qmail-smtpd
  • Qmail-Tap provides email archive capability
  • Virtual Domains and Virtual Users using MySQL
  • Autoresponder for vacation/away from office messages
  • Integrated Mailing List (ezmlm)
  • Web-based email system using Squirrelmail
  • Web-based administration tools
  • POP3, POP3-SSL, IMAP and IMAP-SSL
  • Submission port (587) allows roaming users to skip RBL checks and port 25 blocks
  • eMPF patch for advanced policy control over email

Qmailtoaster has support for RHEL/CentOS (3.x, 4.x, 5.x , Fedora, Suse, Mandriva. We are going to install Qmailtoaster for CentOS 5.x

Prerequisites: Install Centos 5 base system, remaining packages and dependencies will be installed automatically with qmailtoaster scripts.

1) Configuration Read the rest of this entry »