Weka Installation on Ubuntu
Weka is an open source data mining tools. It's implemented with Java. The basic steps of installation Weka on Ubuntu are:
* Fetch weka_3.5.7-2_all.deb and weka-doc_3.5.7-2_all.deb(optional) from Debian Sid repository.
* Install sun-java6-jre and related packages with apt-get.
* Install weka_3.5.7-2_all.deb and weka-doc_3.5.7-2_all.deb(optional) with "dpkg -i".
Thus, the basic features of Weka work. But, it fails to connect to MySQL database with error message like this:
Trying to add JDBC driver: org.gjt.mm.mysql.Driver - Error, not in CLASSPATH?
It needs to be fixed manually:
* Install libmysql-java package with apt-get.
* Extract weka/experiment/DatabaseUtils.props.mysql from /usr/share/java/weka-3.5.7.jar.
* Overwrite jdbcDriver paramter in DatabaseUtils.props.mysql like this:
jdbcDriver=com.mysql.jdbc.Driver
* Package modified file to the original path of the JAR file.
* Over write /usr/bin/weka like this:
#!/bin/sh
#/usr/lib/jvm/java-6-sun/bin/java -jar /usr/share/java/weka.jar
/usr/lib/jvm/java-6-sun/bin/java -Xmx700M \
-classpath '/usr/share/java/mysql-connector-java.jar:/usr/share/java/weka.jar' \
-Djava.rmi.server.codebase=file:/usr/share/java/weka.jar \
weka.gui.Main
Then, you can connect to your MySQL server with URL like this:
jdbc:mysql://localhost/database
Labels: Ubuntu
Public DNS for DHCP Clients
Since there are so many real and virtual machine with dynamic IPs in my network, some method is required to locate the machines. I don't want to keep a manual list of machines and IPs. Dnsmasq can keep the hostname of the clients and provides DNS for them. But when I'm working remotely, the DNS settings may be other than my home gateway. So, I need to publish the DNS records to Internet.
Here comes my tasks:
- To enable "hostname" option for all DHCP clients
- To create an "IN NS" record of a public domain for my network and set my gateway as the nameserver
By default, Ubuntu, Windows and even Wii enable "hostname" option for DHCP clients, but Debian doesn't. So, for Debian, following line needs to be added to /etc/dhclient.conf:
send host-name "HOSTNAME";
Please replace above HOSTNAME with the real one.
Serial Console for KVM(QEMU)
QEMU's man page provided some brief description about serial port. But it's still tricky to enable serial console for KVM. I tried some of them. Some of them work, but there's still some pending issues.
vc
Doesn't work for me.
pty
With this option, KVM(QEMU) opens a random pts device at /dev/pts/N and prints the path of the device. Then the serial terminal can be accessed with "screen /dev/pts/N".
/dev/XXX
The most useful one for me. Actually, I use it like this:
kvm debian_srv.img -m 256 -no-acpi -serial /dev/ptyz0
Then, access the terminal with screen:
screen -S vhost /dev/ttyz0
Unfortunately, the above 2 approaches failed when I start KVM with "-daemonize" parameter.
Labels: Virtualization
OpenVZ over KVM at AMD64 Linux
I installed i386 Debian for KVM VE, since I have some pre-built OpenVZ packages for i386. KVM VE was installed with qemu-system-x86_64. When KVM VE was ready, I installed vzctl and my customized OpenVZ kernel package and OpenVZ template package.
KVM VE crashed when booting with OpenVZ kernel. NMI watchdog needs to be disabled. I modified /boot/grub/menu.lst, changed the kernel line like this:
kernel /boot/vmlinuz-2.6.18-1-openvz root=/dev/hda1 ro watchdog=0 nmi_watchdog=0
Labels: OpenVZ, Virtualization
Conflicts between VMware & Other VM Tools at AMD64 Linux
With my Centrio Duo powered laptop, OpenVZ runs at VMware Server VEs. But when I copied the VMware image to my AMD64 Linux desktop with VMware Server 1.0.2, the host froze during booting the VMware VE. Even more, when any VMware VE is running, the host freezes if I start a KVM VE.
So, VMware Server 1.0.2 seems to be incomplete with other virtualization tools at AMD64 Linux. Fortunately, I got OpenVZ work at a KVM VE.
Labels: Virtualization
Google NotebookFinally, we have mobile Google Notebook now. It's useful for me since I prefer notebook than blog for most content.
Labels: Web
今天你令人发指了吗?
关于这个 Website ,今天很是有些可以写一下。
首先,在我为域名续费的问题困扰了很久以后,今天很高兴的收到域名注册商的来信, 并且一次续了四年的费用。这个账户太多就是麻烦啊,两个月前我就在努力回想到底我是在哪儿注册的域名,但一直没找到。万幸那个许久不用的邮箱被我设置了 Forward ,今天终于收到了域名注册商的来信。这可以挖掘一下,作为以后讲 User Provision 的案例。
域名搞定了, 再来说说这个令人发指的宗旨。说实在的,俺的想象力,与前两天那道选择题里的几位牛人相比,实在是不值一提。所以啊,以后可以在这儿多写些谢XX之流的事 情。说一次谎话不难,难的是说一辈子谎话,不说真话。能把 IPv9 做成事业,这要多么大的想象力和胆量啊。说实在的,俺们工程师想象力还是有点的,就是胆量太小,不敢说假话。所以呢,把这些说假话的英雄事迹记下来,也算 是给大家留个高山仰止的榜样吧。
2008高考综合题
(多项选择题, 本题答对0分, 答错直接轰出考场) 汉芯、麒麟操作系统、周老虎和 IPv9 的共同点是:
A) 笑话
B) 骗局
C) 傻B都不信
D) 领导才相信