Archive for the 'Tutorial' Category

Restore MySQL data from crashed server

April 26, 2009

This is good to know where the MySQL data are stored. People usually backup there MySQL database when the server is up using mysqldump syntex. But what happen when server crash or server is show kernel panic? It’s easy. Boot the Server using any live distro (Knoppix, Ubuntu or Linux/CentOS in rescue mode). Mount your HDD. MySQL data’s are stored in /var/lib/mysql. So after mouting your HDD the location will be /your_mount_point/var/lib/mysql. Copy the files in your new server. Check the ownership. It should be mysql:mysql. Start the mysqld service. You are done.

Deploy CACTI in shortcut

March 15, 2008

Wanna deploy cacti within a short time…check this http://cactiusers.org/wiki/CactiEZ

It is the fastest possible way to get up and running with Cacti

Antivirus and antispam free mail server using Postfix, Mailscanner, Clamav, Spamassassin and Greylisting

November 9, 2006

SPAM or Unsolicited Commercial Email (UCE) is alwasy hated by everybody. It is nightmare for all the system administrator. There are lot of talkings and solutions regarding SPAM. I have collect some of this useful inforamtion and implement. These work miracle in my case. I have wirte this tutorial (basically collect!) to help you out.

In this tutorial we will use Postfix as MTA. We will integrate MailScanner and Clamav for Antivirus solution and SpamAssassin and GreyListing for Antispam solution.
1. Postfix
2. Mailscanner
2. Clamav
4. SpamAssassin
5. GreyListing

For details click here.

Create user & Change password by BASH Script

October 9, 2006

This two scripts are very important for the system admin who regularly works with mail server and some how forget to backup their system username and password!!!. Let’s say some how we lost the server username and password of the mail server. In this case the admin has to manually create all the users and than change the password for all the user. Tedious job :-) . Let’s make our life easier.

First create a file which contains all the user name. Something like this:

nurealam
nayeem
mrahman
farid
rubi
sankar

Save the file as userlist.txt

Now create the following bash file:

#!/bin/sh
for i in `more userlist.txt `
do
echo $i
adduser $i
done

Save the file and exit. chmod 755 userlist.txt. Now run the file by ./userlist.txt. This will add all the user to the system.

Now we have to change the password. Lets say we want username123 as password. So for user nayeem the password will be nayeem123, rubi123 for user rubi and so on.

Create another bash file as following:

#!/bin/sh
for i in `more userlist.txt `
do
echo $i
echo $i”123″ | passwd –stdin “$i”
echo; echo “User $username’s password changed!”
done

Run the file. All the password are changed :-)

Fairly-Secure Anti-SPAM Gateway Using OpenBSD, Postfix, Amavisd-new, SpamAssassin, Razor and DCC

April 10, 2006

Nice tutorial to build Anti Spam Gateway in OpenBSD.

This document describes how to setup a spam-blocking email gateway based on open source and freely available software. This procedure is designed for a small to medium sized company. It describes how to setup a new computer that is meant to run on your network's DMZ in between the Internet and a corporate email server like Lotus Notes or Microsoft Exchange.

The tutorial uses the following software:
Operating System: OpenBSD
MTA: Postfix
MailScanner & Antivirus: Amavisd-new, SpamAssassin, Razor and DCC

Click here for more …