clear dns cache in mac
dns might not have been cleared when changing dns entries in the /etc/file.
In mac,
dscacheutil -flushcache
dns might not have been cleared when changing dns entries in the /etc/file.
In mac,
dscacheutil -flushcache
KVM is available in RHEL 5.4. I finally managed to find the time to play around it over the weekend. I don’t think it is as matured as xen but having said that, I do agree with the approach – Kernel virtualisation. Redhat is promoting kvm very hard and you can see it from their [...]
Just like microsoft active directory, having a centralised authentication server in linux is important especially when you have more than one server or service to manage. Just imagine each service (ssh, samba, httpd…etc) has its own user database… Sooner or later, you will find managing users very difficult. A simple task like deleting a user [...]
expect is very useful to automate login process. I thought it is helpful when doing testing as well. A simple login script might work like this:
#!/usr/bin/env expect
eval spawn “/path/program”
expect “^Enter Auth Username:”
send “user\n”
expect “Enter Auth Password:”
send “password\n”
To install expect, “yum install expect”
sometimes you want to be able to pass output from one program to another, say from bash to php. There is a neat trick to do it. In php, we execute the bash script restartapache.
<?php
$command=”/usr/local/bin/restartapache {$_GET['server']}”;
exec($command, $output); foreach ($output as $v)
{ echo “$v <br/>”; }
?>
then in the bash, we write the output to a [...]