I had to do a find and replace a string on all of the wordpress post. This can only be done via a MySQL query and won’t take more than a minute.

This is how it’s done. In the following example, I will be finding X and replacing it with Y

The string will find X in every single post and replace it with Y. This also works with phrases, URLs etc..

update wp_posts set post_content = replace(post_content, 'X', 'Y')

{ 0 comments }

There are many free TFTP server sortware out there, just install one.

First of all, make sure you have IP reachablity to the TFTP Server. You can do that via Ping…

Then check whether TCP port 69 is open. Usually it is not the case, but when it comes to troubleshooting, it is the first thing to check after a succesful Ping test.

Jump onto the router you are going to do the IOS upgrade.

Make sure the IOS you are going to replace it with is compatible with your router & also you have the necessary Flash / RAM.

If your Flash is big enough to have more than two IOS images, then you can straight away go and download it from the TFTP Server.

If you are going to have two IOS images in flash, you need to specify the router which image to load on boot. It can be done via the following command…

[click to continue…]

{ 0 comments }

If I ask that question to a number of people, I have a feeling I would get all sorts of answers. I think, Hard Disk Drive (HDD) reliability doesn’t necessarily depends on the manufacturer but it also depends on how it has been treated in a machine. In my opinion, a HDD in a machine with multiple power cuts would most likely have a short lifespan than one run with proper care.

Lets talk about the Manufacturer…

People have preference when it comes to HDD Manufacturer. When it comes to the manufacturer, I tend to go for Western Digital (WD) and solely because I had less bad experience with it compared to Maxtor…

I am not saying WD drives never fails, in fact I do have an old WD 80GB IDE drive here which died this morning; but it does have low percentage of failure.

Why does it die?

One person actually asked me this question and the answer is very simple. Any electronic equipment, or any functioning part will die at one point, its the same as human body, it all depends on how its been treated the background of it. When it comes to HDD, its the manufacturer.

How to stop a HDD from dying?

You can’t and you never know when it’s going to die, same as a human being… You never know when you are going to die. It all comes down to to proper care and how its been treated. For example, do not shut your machine down by pulling the plug, it WILL kill the HDD at one point! If you want to shut it down without doing it via the Operating System, press and hold the Power Button for 10 seconds and it should shut the machine down.

Conclusion

Treat a HDD like it is going to die the next minute and back it up on a regular basis. If you don’t have any important information on the disk, then it not a problem. You could either manually back it up on another drive, setup RAID on machine or even back it up to a remote server.

{ 1 comment }

An interview with Russ White, CCIE No. 2635, a member of the Routing Protocol Design and Architecture Team at Cisco Systems. In this interview he presents valuable insights into CCDE Design Track Certification.

{ 0 comments }

This is how to add a DNS Server to Solaris Box…

First of all, Open up your favourite text editor and add the name servers into /etc/resolv.conf

nameserver 192.168.1.1

If you need to add more, just add another one in the next line…

Following the instructions below will walk you through the process…

bash-3.00# ping www.google.com
ping: unknown host www.google.com
bash-3.00# cat /etc/resolv.conf
nameserver 192.168.1.1
bash-3.00# cd /etc/
bash-3.00# cp -p nsswitch.conf nsswitch.conf.org
bash-3.00# cp -p nsswitch.dns nsswitch.conf
bash-3.00# /etc/init.d/nscd stop; /etc/init.d/nscd start
bash-3.00# ping www.google.com
www.google.com is alive
bash-3.00#

As you can see, the Name Server is working!

{ 0 comments }

Adding IP address and default gateway is rather straight forward as long as the interface is loaded. To see whether the interface is loaded, issue the command ifconfig –a

You should see something like the following…


bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
rtls0: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 0.0.0.0 netmask 0
ether 0:6:4f:47:76:1e

In this case, we will be adding the IP address and subnet mask to rtls0 along with the default gateway.

IP Address: 192.168.1.60
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1

Here is how its done…


bash-3.00# ifconfig rtls0 192.168.1.60 netmask 255.255.255.0 up
bash-3.00# route add default 192.168.1.1
add net default: gateway 192.168.1.1
bash-3.00# ping 4.2.2.2
4.2.2.2 is alive

Success! We can now ping a WAN IP! and here is the new output of ifconfig -a


bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv 4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
rtls0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.60 netmask ffffff00 broadcast 192.168.1.255
ether 0:6:4f:47:76:1e

{ 0 comments }