In Linux console, run the following command to show the public IP address of the machine. curl echoip.net ; echo
Apache mod_rewrite URL redirect script
I wrote a bash script to automate the Apache (mod_rewrite) URL redirection. It supports 3 types of redirection: - One to One: eg. From http://jackiechen.local/mylab To http://jackiechen.org./mylab - Any to One: eg. From http://jackiechen.local/* To http://jackiechen.org - Any to Any: eg. From http://jackiechen.local/$1 to http://jackiechen.org/$1 The script can be downloaded from here Note: I tested … Continue reading Apache mod_rewrite URL redirect script
Clear Linux memory cache
There was a alert showing that the swap free space is low in a RHEL 5.6 box. I logged in and checked, the box has 13G RAM, but only 1G swap. First, this is not a good practice, as RedHat recommends 4G swap for RHEL5 with 4-16G RAM. free -m total used free shared buffers … Continue reading Clear Linux memory cache
Configure Synergy as systemd service
Synergy is a mouse and keyboard sharing software (not free anymore). I use it for sharing my Fedora 20 K&M with my Windows box. As Fedora 20 replaces init with systemd, there is no rc.local where I can add my own startup script. Systemd provides a easy way to allow you create your own system service. … Continue reading Configure Synergy as systemd service
Puppet push Nagios
With the storeconfigs enabled, I am able to push Naigos via Puppet. It is really simple and straighforward, as Puppet already support nagios_* type. How it works? Below is my sample codes. It can be downloaded from here. sys_nagios::client is the class for Nagios client, it sends the hosts' facts to Puppet master then the data … Continue reading Puppet push Nagios