Archive for the ‘Linux’ Category

signal 11 caught by ps | segmentation fault

November 15, 2009 1 comment

If you ever came across “segmentation fault” message in linux [in my case CentOS/RHEL], you know how annoying it can be. Basically it throws every time you invoke “ps | top | killall” – i.e any process related command.
Googleing gave me couple of tips. cyberciti, took my attention.

Since “ps” started to gave me the trouble, i decided to upgrade the “ps”

“ps” comes under a package, so fist i had to locate the package name which provide “ps”.
For that again i had to locate the “ps” executable :-
[root@server1 ~]# whereis ps
ps: /bin/ps /opt/mandriva_root/bin/ps /usr/share/man/man1p/ps.1p.gz

Then i locate the package name :-
[root@server1 ~]# rpm -qf /bin/ps

The procps package contains a set of system utilities that provide system information.

To update “procps” :-
[root@server1 ~]# yum update procps

“procps” update did the trick for me.


Categories: Linux

Little help on Perl

September 28, 2009 Leave a comment

What is Perl?

From the Perl documentation:

Perl is a high-level programming language with an eclectic heritage written by Larry Wall and a cast of thousands. It derives from the ubiquitous C programming language and to a lesser extent from sed, awk, the Unix shell, and at least a dozen other tools and languages. Perl’s process, file, and text manipulation facilities make it particularly well-suited for tasks involving quick prototyping, system utilities, software tools, system management tasks, database access, graphical programming, networking, and world wide web programming. These strengths make it especially popular with system administrators and CGI script authors, but mathematicians, geneticists, journalists, and even managers also use Perl. Maybe you should, too.

  • Get the Perl manual.
    • [root@goliath ~]# man perl
  • View Perl documentation.
    • [root@goliath ~]# man perldoc
  • Perl introduction for beginners.
    • [root@goliath ~]# perldoc perlintro
  • Perl OO tutorial for beginners.
    • [root@goliath ~]# perldoc perlboot
  • Perl OO tutorial, part 1.
    • [root@goliath ~]# perldoc perltoot
  • Perl OO tutorial, part 2.
    • [root@goliath ~]# perldoc perltooc
  • Perl OO tricks and examples.
    • [root@goliath ~]# perldoc perlbot
  • Perl regular expressions quick start.
    • [root@goliath ~]# perldoc perlrequick
  • Perl regular expressions tutorial.
    • [root@goliath ~]# perldoc perlretut
  • List the modules that come pre-installed with the standard Perl package.
    • [root@goliath ~]# perldoc perlmodlib
  • Lists the optional modules that are installed in your system that don’t come with Perl by default.
    • [root@goliath ~]# perldoc perllocal
  • Check if a module is installed
    • [root@goliath ~]# perl -MTie::Hash -e 1
  • Get a list of installed modules – Using a script
    • [root@goliath ~]# perl -MFile::Find=find -MFile::Spec::Functions -Tlw -e ‘find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC’

CPAN is the Comprehensive Perl Archive Network, a large collection of Perl software and documentation. Note that CPAN is also the name of a Perl module,, which is used to download and install Perl software from the CPAN archive.
Reference –

  • Automatic installation using the CPAN module
    • [root@goliath ~]# perl -MCPAN -e ‘install Net::DNS’
  • Installing cpan modules manually
    • unzip
    • perl Makefile.PL
    • make
    • make test
    • make install

Hope thses tip’s will help you to get on with perl.

Categories: Linux

Some book’s i value most

Here’s some of the books .. i simply can’t live with out …

  • Red Hat Certified Engineer Linux Study Guide – Michael Jang
  • Linux Administration Handbook – Evi Nemeth , Garth Snyder , Trent R. Hein
  • Open Source Web Development with LAMP – James Lee , Brent Ware
  • Using Unix – Peter Kuo
  • Beginning PHP5,Apache and MySQL Web Development – Elizabeth Naramore , Jason Gerner , Yann Le Scouarnec , Jeremy Stolz , Michael K. Glass
Categories: Linux

Vote for OrangeHRM here !

Love this application. It’s FREE and It’s open source.

Categories: Linux

Create RHEL/CentOS Boot Disk

Floppies no longer supported in RHEL/CentOS-5. So you need to create boot CD/DVD.

  • Put the RHEL/CentOS-5 DVD/first CD to CDROM/DVDROM -> mount the device.

IF you CD/DVD not get automount ->

  • First find the device -> dmesg | grep -i dvdrom -> then
  • mount the device -> mount /dev/device /mnt/destination

Locate the <images> directory from the CD/DVD contents. Get burn <boot.iso> image to CD/DVD. You can use either k3b OR cdrecord to get this done.


Categories: Linux

NFS kickstart installation

Installing Linux includes several steps. Installation will take some time depending on the number of packages you have selected. If you installing Linux to a single machine, then it’s no big deal. But if you have to perform installation on several machines, then the process is cumbersome.

So the solution is to have a installation server. We discuss in a previous post the setup steps involves in a NFS , FTP installation server. There you boot from a installation media and select installation method, then installation will start. But still need to go through all the installation steps. So in order to make life easy we can make the installation automated by the use of kickstart installation provided by RHEL/CentOS.

To start with kickstart. Invoke “system-config-kickstart” (shell) OR Applications->System Tools->Kickstart
If don’t have kickstart already installed, get it installed.

  • yum -y install system-config-kickstart

Fill all the necessary fields. Save the changes. Place it some where with in the reach of NFS. Let’s say, /var/ftp/pub/ks.cfg
/var/ftp/pub/ -> should be a exported file system by now.

  • showmount -e hostname -> will list the nfs shares of hostname.

Now you ready to start the installation. Boot the system from the boot DVD/CD. In the boot prompt, type :-

  • boot:linux ks=nfs:

Press Enter.System should get on with the installation.  CHEERS 🙂

NOTE :- IP addresses used here are belong to IPV4 private ranges.Replace it with your’s.

Categories: Linux

RHEL/CentOS FTP Installation

As the first step of creating FTP installation server, create a directory under /var/ftp/pub. Let say CentOS-5.2. Copy all CD/DVD contents to the created directory.

  • mkdir -p /var/ftp/pub/CentOS-5.2

Then locate vsftpd configuration file.

  • vim /etc/vsftpd/vsftpd.conf – There …..

anonymous_enable=YES -> will give anonymous access to vsftp
local_enable=YES -> will allow access to local user’s
xferlog_file=/var/log/vsftpd.log -> will create separate log file for vsftp. Once done save the file.

  • service vsftpd restart -> will restart the vsftd service. vsftpd set up should be OK by now.

Next boot the system from boot CD/DVD. Select the Language , keyboard , installation method. Choose FTP for the installation method. Choose static OR DHCP under TCP/IP configuration.

NOTE :- If you choosing DHCP, you should have DHCP server in place already. I will be discussing steps involved in a DHCP server setup in a separate post. So watch out. 🙂

Under the FTP setup ->
FTP site name: – type the IP address of the server. -> WRONG FORMAT
CentOS/RHEL directory:pub/CentOS-5.2 – give the path relative to the /var/ftp directory
/var/ftp/pub/CentOS-5.2 -> WRONG FORMAT

In the vsftp.conf if you have set -> anonymous_enable=NO
Then in the FTP setup, check the “Use non-anonymous ftp” and provide the authentication information for the user.

If everything went right system should start the installation by now.  🙂

Categories: Linux