Friday, October 29, 2010

Usage of find command in redhat linux rhel5


Usage of find command in linux and Unix:

Find command is used to search dynamically in Linux systems. In this tutorial  we'll see various practical usage examples of find command. This examples are shown in a redhat enterprise Linux system. Same commands will work with other redhat distributions like Centos, Fedora etc and other distributions like ubuntu, debian as well.

The general syntax of find command is as follows.
#find [Directory] [criteria]

Directory is where we want to search
Criteria is what we are giving to search. Eg file name, user name, Inode number etc.

The following command will search a file with file name file_name in current working directory.
#find -name file_name

Thursday, October 21, 2010

What is the difference between hard boot and cold boot in linux


A hard boot (also known as cold boot) involves turning on the power with the on/off switch [Manually],

A soft boot ( also known as warm boot) involves using the operating system to reboot.

Friday, October 15, 2010

How to configure syslog server or a centralized log server in redhat linux rhel5 or centos


This article will explain installing and configuring a syslog log server in redhat enterprise linux. It'll work in other redhat distributions like centos, fedora etc.
Centralized log server (syslog server)
Suppose we have a server and 5 client machines. And we want to monitor the logs of all those client machines. In situations like this, we will use centralized server as a log server. Whatever events are happening in client machines, the logs will be sent to the server. So that we can monitor all the logs from a centralized server. We make use of syslog service for this. You can also check out another log server like syslog-ng
Features of syslog:
1. Logs the daemon information to localhost
2. Logs the daemon information to Remote host
3. Logs the daemon information to List of users
4. Logs the daemon information to console

Thursday, October 14, 2010

How to install and configure Nagios Monitoring tool in redhat linux rhel5 or centos


This article will help you to install and configure Nagios monitoring tool in redhat linux or other redhat distributions like fedora, centos etc.
Nagios Installation :
Installing packages. Apache, PHP, GCC & GD

Installing Apache web server:
#yum -y install httpd*
set hostname in FQDN
#service httpd on

Installing PHP, GCC and GD:
#yum -y install php*
#yum -y install gcc*
#yum -y install gd*

Linux boot process in redhat enterprise linux rhel5


This post explains about the linux boot process and important scripts participating in it. The paper is based on the booting of Redhat Enterprice Linux machines. Version 5.4

Power Cycle -> CPU Reset -> BIOS -> Boot Device -> MBR -> IPL ->/ boot/grub/grub.conf -> /etc/inittab -> /etc/rc.d/rcX.d -> /etc/rc.local -> /etc/isuue -> /etc/motd

Power Cycle
When we power on the system, it'll go to SMPS and will reset chips in CPU.

Power On Self Test (POST)
The computer power-on self-test tests the computer to make sure it meets the necessary system requirements and that all hardware is working properly before starting the remainder of the boot process. If the computer passes the POST, the computer may have a single beep as the computer starts and the computer will continue to start normally, Passing the control to the BIOS.

BIOS [Basic Input Output System]
The BIOS is the first code run by a PC when powered on. The primary function of the BIOS is to load and start an operating system. When the PC starts up, the first job for the BIOS is to initialize and identify system devices such as the video display card, keyboard and mouse, hard disk, CD/DVD drive and other hardware. The BIOS then locates boot device such as a hard disk or a CD, and loads and executes that software, giving it control of the PC.

Thursday, October 7, 2010

What is a sticky bit and how to set a sticky bit on a directory on redhat linux


Users with write permission in a directory can delete the files created by other users. This lets users to destroy the data created by other users.
But with sticky bit set on a directory one can only delete the files created by him.

Setting sticky bit on a directory

By symbolic method:
#chmod o+t directory_path
#chmod o+t /resumes

By numeric method:
If the current permission of the directory is 664, then
#chmod 1664 /resumes

1 on the left end of the permission sets the sticky bit.

Now on the file can be deleted only by the owner of the file.

User administration in redhat linux


User administration in Linux
In Linux there are three type of users.
1. Super user or root user
Super user or the root user is the most powerful user. He is the administrator user.
2. System users
System users are the users created by the softwares or applications. For example if we install Apache it will create a user apache. This kind of users are
known as system users.
3. Normal users
Normal users are the users created by root user. They are normal users like John, Ramu etc. Only the root user has the permission to create or remove a user.