Archive for the 'General' Category

Quickly install Java, Ant, Ivy and Red5 Flash server in Linux

Although the Red5 installation guide is there and simple but they only explained how to install it in Ubuntu. I am documenting here the steps I took to install it in CentOS 5.4 server and worked like charm. It should be more or less similar in any Redhat based distro.

Step 1. Install openjdk through yum:

$ yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel

Step 2. Download the binary version of ant. I got it from here:

$ cd /usr/src 
$ wget  http://apache.opensourceresources.org//ant/binaries/apache-ant-1.8.2-bin.tar.gz
$ tar xzf apache-ant-1.8.2-bin.tar.gz
$ cd apache-ant-1.8.2

Step 3. After inflating the compressed file, you will get all binary contents of ant. You can now copy/move bin and lib directories to any location to access ant. I’m creating a directory here and copying these directories there.

quickly check your mail server using telnet, mail or mutt

There are of course various ways to check whether your mail server is now configured ok or not but what I found is that checking through telnet is quick and easy.

let’s check our mail server now, it may be mail.youdomain.com or localhost depending on what you are using right now, here’s the full process:

# telnet localhost smtp
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.example.com ESMTP Postfix
mail from: me@example.com
250 2.1.0 Ok
rcpt to: other@example.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject: Just a test. 
This is test mail using telnet.  
.
250 2.0.0 Ok: queued as 6846838401D6
quit
221 2.0.0 Bye
Connection closed by foreign host.
#_

here,

# telnet localhost smtp

We are trying connecting localhost on port 25 (smtp). It should get connected and ready to accept your next command

mail from: me@example.com

here you are specifying the sender mail id, it should be a valid mail account otherwise mail server can reject the sender address.

Top 5 most useful commands or tools for Linux administrators

There are plenty such tools which are definitely very useful for Linux admins. Here I am just trying to figure out 5 of such useful tools which are used by a normal Linux administrator in day to day operations. A tool which I think is most useful may not fit in your usage and its definitely possible that you know some awesome tool which I forgot to include here, for such case, I am requesting hereby to please mention the tool in comments. One more thing, I am mentioning here tools which are somewhat optional and not absolutely required for everybody and excluding tool which have no viable alternative and every Linux admin have to use them.. such as SSH, SCP etc.

Detect directory or file changes in *nix

There are various wasys to do this, but this is what I implemented. It is working as expected as of now on my RHEL 5.x boxes. I’ll take my usecase here and describe things.

Plesk web hosting control panel is managing several hundred domains on one of RHEL box. Addition and removal of domains is very common. We need to sync all domain’s httpdocs directory to other webservers. Of course, a simple rsync can be setup for this but it’s much efficient that rsync should only run when there’s any change, ie addition/removal of a domain or file updation etc. What I mean to say, instead of letting rsync detect changes, its better that our script should detect changes and then run rsync. The obvious advantage is that network burden is reduced because rsync will only sync contents with our servers when there are changes.

Create bootable USB drive with Fedora 11

Here are quick steps on CentOS 5.3 box (should be identical on any RH based distro) to create a bootable USB stick of latest Fedora 11 distrubution:

1. Check whether required tools are already installed or not:

# rpm -q livecd
<no output>

2. Install tools:

# yum install livecd-tools

3. Insert your USB stick in one of USB port, it should get automatically detected and mounted. Make sure your stick has atleast 1 GB free space. Jump to step #7 as it’s absolutely not necessary to format it, but if there’s no worthy data in and you are willing to clean it completely before moving forward, here is the way to proceed after unmounting it:

Get Adobe Flash playerPlugin by wpburn.com wordpress themes