2010年12月11日 星期六


I bought this pad from Taobao, but the seller is really not nice. I can't find the key for registeration....After few days negotation, I still cannot get the key and the seller just claimed that it should be allright....

So.. I will leave him a bad command and start to unlock the key for myself.

Now. my Flytouch is totally different from what it was when I got it..
Installed Apps:
- ADW luncher with Ubuntu theme
- Applanet
- N market
- Net status
- Dolphin Web Browser
- Wifi Manager
- Boot Animations Installer
- Startup Cleaner Pro

I will try to make some video to youtube later.

rooted flytouch 2





download wowpaddate_reg.rar
install a root tools: either universalandroot or Z4tool. I used Z4tool since the universalandtool is not worked in my flytouch.
install connectBot and follow the instruction as below:

1. download wowoupdate_reg.rar and copy it into /sdcard wowupdate_reg directory
2. use Z4root to permanet rooted flytouch
3. install connectBot and run as local
in the $ prompt, enter su and enter
enter the following commands:
# busybox cp /sdcard/wowupdate_reg/* /cache/.profile/
# cd /cache/.profile
# chmod 600 *
# chown system.system *

# exit
$ exit




What is Flytouch 2?


For those who are not familar with this PAD, this is a android 2.1 PAD. There is no news so far on how to upgrade it to Android 2.2, but this is already enought.

It is running a modified Android system called "WowPad", it is quite beatiful but slow.
you can check it in youtube.

http://www.youtube.com/watch?v=HLQZpQb1VbA&feature=player_detailpage

so many photos and review in here
http://bbs.imp3.net/thread-948063-1-1.htm
http://www.shanzhaiben.com/59/n-4759.html

2010年9月14日 星期二

Perl script for speed DNS address recording checking

I am preparing my company's DNS server migration from Windows to a Linux based DNS server. So, I wrote a PERL script to do fast DNS address recording checking.

After test, I found it is much faster than the DNSlookup .


Also, with a simply modification by adding a loop, I can use it as a stressing tools to test the new LINUX based DNS server.

Here is it:
#!/usr/local/bin/perl
use Socket;
$counter = 0;
$errorfile = "/home/user/Desktop/dnserror.log";
open ERRORFILE, ">$errorfile" or die "unable to open $errorfile $!";

open (MYFILE, 'host.list');
while () {
chomp;
$name = $_;
my($subname,$aliases,$type,$len,@thisaddr)=gethostbyname($name);
my $subaddr = inet_ntoa(scalar(gethostbyname($subname || 'localhost')));
if ($subaddr == '127.0.0.1') {
print "========> $name lookup failed\n" ;
$counter = $counter + 1;
print ERRORFILE "$name lookup failed at\n";
} else {
print " resolved name: $name \t IP address: $subaddr \n";
}
}
close (MYFILE);
print " total failed : $counter \n";

close (ERRORFILE);

All the hostname should be keep in a host files in this format:
example:
www.yahoo.com
www.google.com
123.com.hk
www.ingo.gov.hk
ww.hk

There is an error counter, so you may check the no. of failed lookup.

output like this :
[root@redhat1 Desktop]# perl dnslook.pl
resolved name: www.yahoo.com.hk IP address: 202.43.220.99
resolved name: www.google.com.hk IP address: 74.125.71.106
========> 123.com.hk lookup failed
resolved name: www.info.gov.hk IP address: 202.128.238.115
resolved name: ww.hk IP address: 222.87.2.134
========> 123.hkex lookup failed
total failed : 3

2010年9月12日 星期日

Linux PING script

I have write a ping script to continuous check our BGP routers and DNS link during the stability test.


[root@DNS Lok]# cat pingmon.sh
#!/bin/bash

HOSTS="router1 router2 PC1 DNS1 DNS2 ISP1link ISP2link"
# you need to add above hostname into your hosts table if they cannot be resolved from your DNS

COUNT=4
while :
do
for myHost in $HOSTS
do
count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }')
if [ $count -eq 0 ]; then
# 100% failed
echo "Host : $myHost is down in all 4 PING sequences at $(date)" >> pinglost.log
else
echo " HOST is UP in all 4 PING sequences $myHost"
fi
done

done

After script start, your can check the output status by :
tail -f pinglog.log

2010年9月11日 星期六

MUST visit for CCIE, RHCE or ITIL

HINTS in here
http://www.examcollection.com/

how to change REDHAT into CENTOS

I just found an easy easy to change a newly installed Redhat into CENTOS.

Here are procedures:

1. After Redhat installed, delete all the repos. content in the rhel-debuginfo.repo file and add the following repos from CENTOS.

[base]
name=CentOS-5 - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&
repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.sjtu.edu.cn/centos/5/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#released updates
[update]
name=CentOS-5 - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/5/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons

baseurl=http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras

baseurl=http://ftp.sjtu.edu.cn/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
baseurl=http://ftp.sjtu.edu.cn/centos/5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
baseurl=http://ftp.sjtu.edu.cn/centos/5/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5


Then add DAG repo

#vi dag.repo
[dag]
name=Dag RPM Repository for RHEL5
baseurl=http://ftp.riken.jp/Linux/dag/redhat/el5/en/$basearch/dag/
enabled=1
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt

If you cannot use yum to install software with error like this...

GPG key retrieval failed : [Error 14] HTTP error 404 not found.

then intall the software with --nogpgcheck option

Use yum update and a new Centos Kernal should be installed together with CENTOS wallpaper.

my bestbuy i5 laptop - ACER 4741G US$600















MY BEST buy laptop recently. BEST price to performance.

AS4741G-432G50MNSK
Intel Core I5-430M 3MB L3,2.26GHZ,1066MHZ
Hitachi 500GB 5400RPM
Nvida Geforce 310M-512MB DDRIII
2G DDR3 1066MHZ
16:9 之 14吋LED背光螢幕(1366 x 768)
802.11bg/N、藍芽3.0+HS、HDMI、多合一讀卡機
DVD Super Multi DL燒錄光碟機
6 CELL電、130萬像 WEB CAM
Windows 7 Home Premium 64BIT(繁,簡,英)
2.2KG(含6 Cell電)
HKD $4680(VISA) Price in Wanchai, Hong Kong



RHCE - SENDMAIL

EASY STEPS to setup SENDMAIL
SENDMAIL
http://linux.vbird.org/linux_server/0380sendmail.php

MY PC IP 192.168.2.121
hostname: mail.waliunx.com

step:1 :
work file: /etc/mail/sendmail.mc
所以我们不修改cf文件,我们通过修改sendmail.mc文件用m4工具来生成cf文件
- 要让其他client使用我们的服务器,我们要把127.0.0.1改成0.0.0.0 (DAEMON_OPTIONS: 0.0.0.0)
- 改成你自己的域名 (walinux.com)

step2:
work file: /etc/mail/local-host-names
退出以后修改本目录的local-host-names目录
在这个文件中加入你IP地址能解析出来的所有域名
i.e. walinux.com

step3:
working file:/etc/hosts
192.168.2.121 mail.walinux.com mail

step 4:
work dir: /etc/dir
DNS record
@ IN MX 1 mail.walinux.com
mail IN A 192.168.2.121
{still not sure to add this point entry : 121 IN PTR mail.waliunx.com ]

step5:
work dir: /etc/mail
m4 sendmail.mc > sendmail.cf
service sendmail restart

Step 6:
alias send email to a group
vim /etc/alias
user: user,kevin,student

#newaliases

step 7:
establish POP3 ,IMAP
yum install dovecot
cd /etc/pki/tls/certs
make dovecot.pem

RHCE - FTP

EASY STEP to setup FTP service
STEP :
1. yum install vsftpd

2. edit /etc/vsftpd/vsftpd.conf
e.g. limit to user home dir only
chroot_list_enable=YES (just delete #)
chroot_list_file=/etc//vsftpd/chroot_list (just delete #)

3. deny user address , edit ftpusers file
add e.g student1

4. deny by IP :
/etc/hosts.allow
vsftpd: 192.168.60.0/255.255.255.0
/etc/hosts.deny
vsftpd: ALL

SELINUX
5. getsebool -a | grep ftp

6. setsebool -P ftp_home_dir=on


service vsftpd restart