Tricks and Tips about Systems/Network

What’s new today!!!

This is the the page explaining the matter of  my tricks which I troubleshoot today.

1, How to install or uninstall  specified rails version

$ gem install rails -v1.2.6

$ gem uninstall rails -v1.2.6

07/08/2008

2, How to install proftp in centos4 which currently support yum installation

1, got to the  third party site http://dag.wieers.com/rpm/packages/proftpd/

2, download and install the following rpm for Centos4

a, proftpd-1.3.1-1.el4.rf.i386.rpm

b, proftpd-devel-1.3.1-1.el4.rf.i386.rpm
3, ####################  APT-get Error ##########
Sometimes we got the apt-get  error during the package  installation and installation has been    terminated  due to error/
Solution is
$  cd /var/lib/dpkg
$ sudo mv info info.bak
$  sudo mkdir infox
$sudo apt-get install sun-java5-bin
4,  ########### choosing   JAVA system version ####
Whenever we updated the jave using apt-get  method after the updation  sometimes java shows the previous version java same.
$update-alternatives –config java and switch to default java alternative. or locate java binary and renamed it and  create a link with same binary any pointed to the java binary installaed  path.
20Aug-2008

5, How to install aspel on debian
sudo apt-get install aspell
At this point (whether you just installed it or had already installed) try to run it like this:
echo “I mispeled it” | /usr/bin/aspell -a –lang=en_US –encoding=utf-8 -H

If there is no English dictionary installed you should see:

Error: No word lists can be found for the language “en_US”.
-bash: echo: write error: Broken pipe

Let’s fix that by installing the dictionary:

sudo apt-get install aspell-en

Now if you run the command above, you should see aspell looking up “mispeled” in its aspell-en dictionary, identifying that it is spelled wrong, and offering you choices of correct spelling from that dictionary:

echo “I mispeled it” | /usr/bin/aspell -a –lang=en_US –encoding=utf-8 -H
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.4) * * * & mispeled 16 21: misspelled, misapplied, misled, dispelled, misfiled, misruled, mislead, spelled, spieled, misplaced, misplayed, misspell, misfield, misspend, simpled, misplay

Ok, so from Linux side, we are ready with Aspell, now let’s begin the integration.

6,  ###########Image magic instalaltion on ubuntu server #############

Install imagemagick support to your debian/ubuntu server. Imagemagick is one of the best library to work with image. recently I have to install it to our production server. here is what i did:

$ apt-get install imagemagick

it downloads the package and all it’s dependences from debian/ubuntu repository, and installed. now i have to install the support of php (as our product running on php)

$ apt-get install php5-imagick

then i restarted the apache server to take effect this new package installation. if your using php4 then the package name should be php4-imagick

$ /etc/init.d/apache2 restart

7, ############## How to list zombie process  ################
ps aux | awk ‘{ print $8 ” ” $2 }’ | grep -w Z and then kill -9 <pid>
1:10 PM 8/27/2008
7. ########### How to take the copy of the specified lines from a fiels #########
This is really helpful if a developer want to parse a  xml file which is 3 GB in for testing
# head -600 myfle.txt > sample-xml.xml
Thanks,
Liju
TrackBack URI

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.