Install pico and set as default editor through CentOS

I could see many people around me are using pico instead of other editor like vim which come with centos.

As you know, pico is not come together with centos and you may refer to this article and apply to your server.
yum install nano
cd /usr/bin/
ln -s nano pico
export EDITOR=”pico”

Now, try to pico and you will be able to use it.

cPanel: How to monitor crond services using chkservd

When you are using cPanel cron services, you might found out the cPanel services down without any clue.

With this article, Mick Genie will guide you how to check your crond services by using cPanel chkservd services.

cPanel offer chkservd services to automatically monitor daemon services from the Linux server.

To done this, follow the step as below.
1. Open the file /etc/chkserv.d/crond, pico /etc/chkserv.d/crond
2. Add the command as below to the file.
service[crond]=x,x,x,/etc/init.d/crond restart,crond,root
3. Open the file /etc/chkserv.d/chkservd.conf, pico /etc/chkserv.d/chkservd.conf
4. Add command below to last line of the above file.
crond:1
5. Restart chkservd services, /scripts/restartsrv chkservd

Find and replace a word from a file

Sometimes, you might want to find and replace a bunch of word from a file and you do not actually needed a word editor such as vi, pico, nano or emacs to open and modify it.

From Linux, you could directly using perl to replace them.
perl -pi -e ’s/wordToFind/replaceWithThisWord/g’ *.fileExtension

For example, you have all word linux want to replace with mickgenie, you may use the command as below.

perl -pi -e ’s/linux/mickgenie/g’ bogo.txt