Wednesday, February 1, 2012

Postfix Mail Server on RedHat 6 /CentOS 6

In this setup:
IP address of server = 161.101.234.62
Hostname = mail
Domain Name = yeswedeal.com
Full Computer name (FQDN) = mail.yeswedeal.com

Note: Make sure DNS Server is properly configured.

Install Required package:
yum install postfix dovecot squirrelmail http  -y

# vim  /etc/postfix/main.cf

inet_interface   =   all
# inet_interface   =  localhost
mydestination =  $myhostname,  localhost.$mydomain, localhost,  $mydomain
home_mailbox =  Maildir/


vim  /etc/dovecot.conf
protocols  =  imap  imaps  pop3  pop3s
mail_location  = maildir:~/Maildir
pop3_uidl_format  =  %09Xu%09Xv
imap_client_workarounds = outlook-idle  delay-newmail  netscape-eoh
pop3_client_workarounds = outlook-no-nuls    oe-ns-eoh

vim  /etc/squirrelmail/config.php
$domain                       = ‘yeswedeal.com’;
$imapServerAddress    = ‘161.101.234.62’;
$smtpServerAddress    = ‘161.101.234.62’;
$default_folder_prefix   = ‘Maildir/’;

service  postfix  restart
service   dovecot   restart
service httpd  restart

Tuesday, January 31, 2012

Linux Easy Admin Utilities For RHEL, FEDORA, CENTOS, OPENSUSE, UBUNTU, DEBIAN, SLACKWARE

The IT Infrastructure Analyst, IT Ops Engg., Systems Admin, IT Support Engg., IT Helpdesk Engg. Companies changes and Job titles change but the responsibilities over lap and mix. My quest to make work fun, simple, joy and easy has lead to write, collect, source and use various scripts and tools that will help in a very easy and fun filled work flow with computers and IT systems.

This project is to write and collect tools and utilities that make System Administration easy and simple. If a hard working Admin cannot have a beautiful wallpaper on his screen then the Admin can at least have one complete set utility tools that make the brow sweat free and achieve deadlines.

The current list of tools:

Password Generator<br> Network & Firewall Auditor<br> Disk Auditor<br> FS Auditor<br> General System Auditor

Download at:

http://code.google.com/p/linux-easy-admin-utilities/
http://sourceforge.net/projects/lnxesyadmutil/

 # wget http://linux-easy-admin-utilities.googlecode.com/files/linux-easy-admin-util-v0.2.tar.gz
# tar -zxvf linux-easy-admin-util-v0.2.tar.gz
# cp easy-admin/* /usr/local/bin/
# adtdepchk

genadtchk - General Audit Checker: This script generates a simple information information about your system. Basic system, Memory, Disk, File System, Network data is audited.
dksadtchk - Disk Audit Checker: This script generates a complete and compressive information about your systems disk and storage. Total disks at boot time, contained partitions, partitions used, removable disks, capacity and free capacity etc.
fsadtchk - File System Audit Checker: This script generates a complete and compressive information about the systems FS usage and current mounted, total available, type, size, free, and space occupying number one folder or file from the FS.
netadtchk - Network Audit Checker: This script  generates a complete and compressive information about the network interfaces - hardware, virtual, local and other , firewall and its status, outgoing firewall status, current process that are having listening processes, port - ip - process - executable table, IPV4/6 feature, forwarding, masquerading for the system.

Monday, January 30, 2012

Install Xserver(windows) and Gnome on Centos/RedHat using Yum

# yum groupinstall "X Window System" "GNOME Desktop Environment"

# yum groupinstall "X Window System" "KDE (K Desktop Environment)"  


#yum groupinstall gnome
 
#yum groupinstall kde

Wednesday, January 25, 2012

ext3 or ext4 partition recover deleted files Centos /Fedora

Extundelete is a utility that can recover deleted files from an ext3 or ext4 partition. The ext3 file system is the most common file system when using Linux, and ext4 is its successor. extundelete uses the information stored in the partition's journal to attempt to recover a file that has been deleted from the partition. There is no guarantee that any particular file will be able to be undeleted, so always try to have a good backup system in place, or at least put one in place after recovering your files!

Download and Install Extundelete:
Download the latest version of Extundelete - http://extundelete.sourceforge.net/

To compile and install Extundelete, you should first install the binary and development packages for e2fsprogs and e2fslibs.  You must also have a C++ compiler and a make utility to compile extundelete.
Go to terminal and type following command to install Extundelete:


#yum install -y gcc-c++ autoconf automake

#tar -xjf extundelete-0.2.0.tar.bz2
 
#cd extundelete-0.2.0
 
#./configure
 
#make

The extundelete program may be run as-is from the build directory, or you may wish to install it to a directory that is shared with other executable programs, which you may do by running the following command: make install

Using 
extundelete:
Assume you have deleted a file called /home/rajat/snap. Also assume the output of the 'mount' command shows this line (among others):

/dev/sda3 on /home type ext3 (rw)

This line shows that the /home directory is on the partition named /dev/sda3, so then run: 
umount /dev/sda3 and check that it is now unmounted by running the mount command again and seeing it is not listed.Now, with this information, run extundelete:
 

# extundelete /dev/sda3 --restore-file /home/rajat/snap/

If you have deleted the directory 'important', you can run: 
 

# extundelete /dev/sda3 --restore-directory /home/rajat/video

Or if you have deleted everything, you can run: 
 

# extundelete /dev/sda3 --restore-all