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.
August 14th, 2009 | Posted in General, Web Server, bash | 7 Comments
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:
June 18th, 2009 | Posted in General | 2 Comments
ffmpeg-php is a PHP extension that adds functions for accessing and retrieving information from movies and audio files.
Here’s quick steps which worked for me and you can try to install this library in a RedHat based distro (I’ve checked in a fresh CentOS 5).
Step 1. Install standard ffmpeg and its dependencies using yum:
# yum install ffmpeg ffmpeg-devel php-devel
Step 2. Download and install ffmpeg-php:
# cd /usr/src
# wget http://biznetnetworks.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.6.0.tbz2
# tar xjf ffmpeg-php-0.6.0.tbz2
# cd ffmpeg-php-0.6.0
# phpize
# ./configure –enable-shared –prefix=/usr
# make
# make install
June 15th, 2009 | Posted in php | 5 Comments
I got an assignment where I’ve to move some apps from a server (due to immense load) to different server without changing URLs. Main software app should remains in first server and all other smaller apps should be moved to another server but because all apps are integrated (for seamless login etc) with each other, URL on the browser should not change when browing the main app or any of its subordinate apps residing on different server.
The quick solution is to update httpd.conf in your main server to redirect traffic for certain apps to different server (or domain). Apache will work like a proxy when accessing other apps. for example, here are sample URLs:
June 2nd, 2009 | Posted in Web Server | No Comments
Net::Amazon::S3 is the standard perl module to interact with Amazon S3 service using perl scripts. If you ever tried to install it, you may well aware about its gigantic dependecies on other modules which must be installed correctly. If anything goes wrong, you’ll be in mess because you have check around 66 different modules.
Here is a single command which will install the module and all of its dependecies (known upto the date of this article). I’ve tested this several times in CentOS 5.x boxes but I dont guarantee that it’ll also work seamlessly for you as well:
This is a preview of
Quickly install perl module Net::Amazon::S3 and all its dependencies
.
Read the full post (227 words, 1 image, estimated 54 secs reading time)
May 25th, 2009 | Posted in AWS, perl | No Comments