[HowTo] Replace ip address using sed

Following one-liner will search for a ip address pattern in the specified file and replace it with the one provided :

sed 's/[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}.[0-9]\{1,3\}/**IPADDRESS-COMES-HERE**/g' /SourceFilename > /DestinationFilename

Disable services in Solaris 10

To disable a service, you must be root or have sudo privileges.

For example, to disable the Puppet service, you would run the following command:

svcadm disable network/cswpuppetd:default

This will disable the Puppet service and prevent it from running.

To verify that the service has been disabled, you can run the following command:

svcs | grep puppet

This will list all of the services that are currently running, and if the Puppet service is disabled, it will not be listed.

ERROR: phpize failed [solved]

How to install PHP development files

If you want to run phpize on your system, you need to install the development files of PHP first. Otherwise, you might get an error message like this:

sh: phpize: not found
ERROR: `phpize' failed

To install the PHP development files on Ubuntu/Debian, you can use the following command in the terminal:

apt-get install php5-dev

That should solve the problem. 🙂