what the blog?

{upgrade in progress..}

workaround for tcp privileged port run by non-root user

In Linux, non-root user is not allowed to bind to privileged port (1 – 1024). And for security reason or many others reason, we do not run service daemon with root user privilege. This cause non-root user not able to bind to port 80 for example. There have some workaround or alternatives regarding to this…

Continue Reading

ls command output in single line

ls -1 | awk ‘{ ORS=" "; print; }’ls -1 | awk ‘{ ORS=" "; print; }’ or printf "%s " *printf "%s " *

setup grub boot on a mirror harddisk

1. Assume you are running a mdadm mirror set and created two exactly same disk layout sda1: /boot md0(sda2,sdb2): / md1(sda5,sdb5): /data LABEL=/boot: /bootsda1: /boot md0(sda2,sdb2): / md1(sda5,sdb5): /data LABEL=/boot: /boot 2. first, clone the /boot partition, either “dd” or mkfs.ext3 /dev/sdb1, mount /dev/sdb1 /boot.bak, cp -rfp /boot/. to /boot.bak/, then e2label /dev/sdb1 /bootmkfs.ext3 /dev/sdb1,…

Continue Reading

logging syslog to mysql

Read the following article in order to implement syslog logging to mysql solution. Download rsyslog.. http://www.rsyslog.com/ Read this… http://www.linuxsecurity.com/content/view/117384/49/ and this http://librenix.com/?inode=7093

Using imapsync to replicate email

1. Download and install the latest version of imapsync at http://www.linux-france.org/prj/imapsync/dist/. As of today, the latest version is 1.255. 2. imapsync requires Mail-IMAPClient 2.2.9. Most recent Linux distribution comes with version > 3.x, so you will need to manually download it at http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/. 3. Extract it, and install Mail-IMAPClient 2.2.9 wget http://search.cpan.org/CPAN/authors/id/D/DJ/DJKERNEN/Mail-IMAPClient-2.2… tar xzf Mail-IMAPClient-2.2.9.tar.gz cd Mail-IMAPClient-2.2.9…

Continue Reading

Disable IPv6 on RedHat/CentOS

Edit /etc/sysconfig/network and change NETWORKING_IPV6=yes to NETWORKING_IPV6=no Edit /etc/modprobe.conf and add these lines (if they’re not in it): alias net-pf-10 off alias ipv6 off Stop the ipv6tables service by typing: service ip6tables stop Disable the ipv6tables service by typing: chkconfig ip6tables off

network boot install ubuntu with PXE

Here’s a brief overview of what you need and need to do to complete this; 1. One Windows based (XP/2000) to host TFTP Server, network enabled 2. One PC to have Ubuntu installed on to, with Intel PXE Boot capability 3. DHCP & TFTP Server (download Tftpd32 (http://tftpd32.jounin.net/) (freeware) 4. Download Ubuntu netboot.tar.gz (http://archive.ubuntu.com/ubuntu/dists/edgy/main/installer-i386/current/images/netboot/) 5….

Continue Reading

Enable chinese IME in english gnome interface

Append following variables into /etc/profile in order to use chinese input with ENG GNOME. export LANG=en_us.UTF-8 export XMODIFIERS=”@im=SCIM” export GTK_IM_MODULE=scim export QT_IM_MODULE=scim export XIM_PROGRAM=SCIM export XIM=SCIM

1 2 3 4 5 6