Under /etc/rsyslog.conf append
$FileCreateMode 0655
$DirCreateMode 0755
$Umask 0022
$template default,"/srv/logs/%HOSTNAME%/%$now%.log"
*.* ?default
this will create directories under /srv/logs/
Under /etc/rsyslog.conf append
$FileCreateMode 0655
$DirCreateMode 0755
$Umask 0022
$template default,"/srv/logs/%HOSTNAME%/%$now%.log"
*.* ?default
this will create directories under /srv/logs/
Vmware apologizes for technical difficulties on the recent webcast Technology Day Online. It looks like the webcast provider was caught off guard on the situation. To compensate, VMware will be sending me a USB memory stick containing all of the materials presented on the said event.
Well.. apology accepted!!!!!
Our Samsung LCD TV retired after exactly 3 yrs of service. Bad thing is that it is already out of warranty. Yesterday the screen suddenly turns to white that you can barely see the images.
Find and replace string recursively
find /home/penoycentral/whichfolder -type f -print0| xargs -0 sed -i 's/oldstring/newstring/g'
If you want to make sure that you are changing which, use the old grep first
find /home/penoycentral/whichfolder -type f -print0| xargs -0 grep -i oldstring
Example Problem: Change /etc/bind to /var/named/master in named.conf
Just print what will be changed
sed -n 's//etc/bind//var/named/master/p' named.conf
to change:
sed -i 's//etc/bind//var/named/masterr/g' named.conf
Change double qoute to single qoute
sed -i "s/["]/'/g" some-file.pp
Referrence:
http://stackoverflow.com/questions/1583219/awk-sed-how-to-do-a-recursive-find-replace-of-a-string
DNS change progation is one of sysads problem. After a dns record change, nslookup result will differ depending on which region you are in.
Check your DNS global progation
http://www.whatsmydns.net/
Note this setup is unsecured and just for the purpose of having my own lab svn repo.
Install mercurial on your server
yum install mercurial
Setup the mercurial site on apache
mkdir /var/www/cgi-hg
cp /usr/share/doc/mercurial-1.4/hgwebdir.cgi /var/www/cgi-hg/
chmod +x /var/www/cgi-hg/hgwebdir.cgi
Create the hgweb.config
/var/www/cgi-hg/hgweb.config
[paths]
#VIRTUAL_PATH = /REAL/PATH
#myproject = myproject
lab = /srv/hg
Reload apache
service httpd reload
Make sure everything has the right permission on selinux or you can temporarily disable selinux
Your site now is accessible thru http://servername/hg
To test push functionality,you might try to disable ssl and allow push to all
/srv/hg/.hg/hgrc
[web]
allow_push = *
push_ssl = false
Ref:
http://mercurial.selenic.com/wiki/RHEL4HgWebDirSetup
http://mercurial.selenic.com/wiki/PublishingRepositories
eth0 – with internet connection as they say
eth2 – local network
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth2 -j ACCEPT
penoy@fedora:~$ mail -s "test sending mail from nix server" penoy@example.com
sysctl net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -p tcp --dport 3129 -j DNAT --to-destination ip-address:3128
iptables -t nat -A POSTROUTING -j MASQUERADE
iptables -L
iptables -t nat -L -n -v
iptables-save