Thursday, March 26, 2009
由etch升級至lenny之小問題
另外,若apache有設定VirtualHost,那就需要把原本的<VirtualHost *>修改成<VirtualHost *:80>。
Sunday, March 15, 2009
Debian 5 on CloudBook
debain installer 不能detect cloudbook的network card.
原本的kernel不支援headphone plugin, 需要patch.
原本kernel 己支援VIA C7的e_powersaver, 不需要再compile.
而他地方, 基本上沒有什麼大分別.
Wednesday, May 28, 2008
Ubuntu英文介面下用scim輸入中文
本人亦是用英文介面, 因為習慣了, 改不到.
由於系統預設scim只會在中日韓介面時才會啟動, 因此若要在英文介面下要輸入中文, 就需要手動設定一下.
ubuntu和debian的作法都是一樣的,
首先, 看一看有沒有安裝scim及輸入法的packages和im-switch.
然後用im-switch去設定.
先打locale看看自己在用英文的哪一個語系, 如en_HK.UTF-8, en_US.UTF-8, en_GB.UTF-8等.
如語系是en_HK.UTF-8, 就打
im-switch -z en_HK -c
如語系是en_GB.UTF-8, 就打
im-switch -z en_GB -c
如此類推.
之後就會進入一個menu, 有一堆輸入法可供選擇,
選scim-immodule
就完成.
之後登出, 再重新登入, 現在就可以用ctrl-space去叫scim出來, 輸入中文了.
Saturday, March 22, 2008
把Debian上lenny(testing)
GNOME的速度比以前快了些,而字體就比以前減了2個SIZE,應該FIX了上一個版本字體雖SET為同一SIZE,但在GNOME中字體比KDE大的問題。
另外TESTING VERSION中,多了開機動畫。
其他功能還在測試中。
Saturday, September 01, 2007
HSBC網上銀行不支援iceweasel(Debian)?
終於能成功登入. 證明HSBC弄好了firefox的登入問題.
但在Debian中, 用iceweasel仍不能登入,
經看過登入頁面的source後, 看到在一個variable,
在用debian的iceweasel時, 會程現false的狀態,
這個variable是由server generate出來的.
但用user agent switcher把agent轉成ie後, 發現那個variable會成為true.
之後試一下把default agent的iceweasel轉成firefox. 再reload登入page, 那個variable成了true,
並能正常登入.
那就證明在8月29日晚至30日早上期間, 匯豐更新了系統, 而更新過程中,
加入了一段只會認某些user agent的code入去其cgi以及javascript.
但加入過程有些出錯, 引至30日不能用firefox登入.
雖然現修理好, 但因加了識別某些user agent的code,
現在令debian的iceweasel不能登入HSBC的eBanking.
還好, HSBC不是封殺firefox. 只不過, 現時用debian比較麻煩些,
要用user agent switcher把iceweasel轉成firefox.
Thursday, August 30, 2007
匯豐HSBC的網上銀行不支援FIREFOX?
豈料今日早上登入時,
出現這句
We regret that HSBC Internet Banking must be viewed by either Internet Explorer 6.0 (or later versions) or Netscape Navigator 7.1 (or later versions). You may visit http://www.microsoft.com or http://home.netscape.com to download a compatible browser.
本人用DEBIAN,因此沒有辦法,立即下載NETSCAPE9。
怎料下載完成後,在執行時出現
./navigator-bin: error while loading shared libraries: libmozjs.so: cannot open shared object file: No such file or directory
真是......
最後是,用了一個FIREFOX的PLUGIN, user agent switcher去扮IE,
於是成功進入到HSBC的EBANKING系統,並能正常使用,沒有任何問題。
問過其他同事及朋友,他們都同樣地出現Firefox不能登入,
但IE和NETSCAPE能正常使用的問題。
不明白的是, 原本他們的網上銀行系統一直都支援FIREFOX,
今日突然話不支援,但轉了USER AGENT後就能正常進入,
而且沒有任何問題。
經投訴,HSBC回覆是因他們銀行系統發生故障,正在修理中。
希望正如他們所言,真的只是故障,而不是封殺FIREFOX。
Thursday, April 26, 2007
Xen 3.0.3 on Debian 4.0 Etch
First, install all the packages that related to XEN.
apt-get install libc6-xen linux-headers-2.6-xen-686
linux-headers-2.6-xen-vserver-686 linux-headers-2.6.18-4-xen
linux-headers-2.6.18-4-xen-686 linux-headers-2.6.18-4-xen-vserver
linux-headers-2.6.18-4-xen-vserver-686 linux-image-2.6-xen-686
linux-image-2.6-xen-vserver-686 linux-image-2.6.18-4-xen-686
linux-image-2.6.18-4-xen-vserver-686 linux-image-xen-686
linux-image-xen-vserver-686 linux-modules-2.6.18-4-xen-686
linux-modules-2.6.18-4-xen-vserver-686 xen-hypervisor-3.0.3-1-i386
xen-hypervisor-3.0.3-1-i386-pae xen-ioemu-3.0.3-1 xen-tools
xen-utils-3.0.3-1 xen-utils-common bridge-utils iproute sysfsutils
Then, boot reboot the machine and choose the pae kernel to boot.
Next, add the following into /etc/network/interface for the Xen Bridge neteork.
auto xenbr0
iface xenbr0 inet dhcp
bridge_ports eth0
# optional
bridge_maxwait 0
To build a new debian domain:
Configurature /etc/xen-tools/xen-tools.conf collectly such as kernel version and initrd.
Then, run
xen-create-image --hostname=<name_of_DomU> --dir /home/xen/images/debian
Next, configurature
/etc/xen/<name_of_DomU>.cfg
to make sure all the Tag are correct.
Finally, run
xm create test.cfg -c
to run the VM.
As Core2Duo 6300 support VT, we could run Windows under Xen.
To run Windows in Xen,
first, build an image file for windows.
dd if=/dev/zero of=/home/xen/images/WinXP.img bs=1M count=4096
Next, copy the Windows XP install CD in to an iso format
dd if=/dev/cdrom of=/home/xen/cds/winxp.iso
Then, build a winxp config file in /etc/xen as the following. eg:
vi /etc/xen/winxp
kernel = "hvmloader"
builder='hvm'
memory = 512
name = "winxp"
vif = [ 'type=ioemu, bridge=xenbr0' ]
disk = [ 'file:/home/xen/images/WinXP.img,ioemu:hda,w',
'file:/home/xen/cds/winxp.iso,hdc:cdrom,r' ]
#cdrom = '/dev/hda'
device_model = 'qemu-dm'
boot="dc"
sdl=1
vnc=0
nographic=0
localtime=1
Run
xm create winxp -c
to boot up the VM and install XP.
After finished installing the XP, turn off the VM and
change the
boot="dc"
to
boot="c"
in
/etc/xen/winxp
Tuesday, April 17, 2007
How to generate a self-signed certificate for apache2 in Debian
I had modified the old script so that it can generate a suitable self-signed cert for the new apache2(Apache v2.2) in Debain.
Here is the code:
#!/bin/sh -e
DAYS="365"
CERTPATH="/etc/apache2/ssl"
CERTNAME="apache"
KEYBIT="1024"
FORCE="0";
usage(){
echo "This is a program for the users to gernate their own self-signed certificate."
echo
echo "Usage: $0 [[OPTION] [VALUE]]..."
echo
echo "OPTIONS:"
echo " -h | -help | --help -- To Show This Help"
echo " -f | --force -- Force to generate the cert"
echo " -d | -days | --days -- cert to expire after x days, default is 365"
echo " -p | -path | --path -- Path of the cert will be stored,"
echo " default is /etc/apache/ssl"
echo " -n | -name | --name -- the name of the cert, default is apache"
echo " -b | -bit | --bit -- length of the key, default is 1024"
echo
}
createcert() {
if [ "$FORCE" != "1" -a -f $CERTPATH/$CERTNAME.pem ]; then
echo "$CERTPATH/$CERTNAME.pem exists! Use \"$0 --force.\""
exit 0
fi
echo
echo creating selfsigned certificate
echo "replace it with one signed by a certification authority (CA)"
echo
echo enter your ServerName at the Common Name prompt
echo
echo If you want your certificate to expire after x days call this programm
echo with "--days x"
mkdir -p "$CERTPATH/"
export RANDFILE=/dev/random
openssl req $@ -new -x509 -days $DAYS -nodes
-newkey rsa:$KEYBIT
-out $CERTPATH/$CERTNAME.pem
-keyout $CERTPATH/$CERTNAME.pem
chmod 600 $CERTPATH/$CERTNAME.pem
}
case $1 in
-h|help|--help)
usage
exit 0
;;
esac
until [ -z "$1" ] # Until all parameters used up . . .
do
case $1 in
--force|-f|-force)
FORCE="1"
shift
;;
--days|-d|-days)
DAYS=$2
shift
shift
;;
--path|-p|-path)
CERTPATH=$2
shift
shift
;;
--name|-n|-name)
CERTNAME=$2
shift
shift
;;
--bit|-n|-bit)
KEYBIT=$2
shift
shift
;;
*)
usage
exit 0
;;
esac
done
createcert
Here is the file.
apache2-ssl-certificate.tar.gz
MD5SUM: 6fb69eb0d63a683e73461f4f682e13e5
Monday, April 16, 2007
Debian 香港聚會
本人今日有幸能抽空出席。在聚會中,認識了不少LINUX的愛好者,
大家彼此交流了不少LINUX的經驗和知識, 是一個很好的聚會。
Tuesday, April 10, 2007
Debian GNU/Linux 4.0 released
Here is the notice from debian-announce@lists.debian.org.
Debian GNU/Linux 4.0 released
The Debian Project is pleased to announce the official release of Debian
GNU/Linux version 4.0, codenamed "etch", after 21 months of constant
development. Debian GNU/Linux is a free operating system which supports
a total of eleven processor architectures and includes the KDE, GNOME
and Xfce desktop environments. It also features cryptographic software
and compatibility with the FHS v2.3 and software developed for version
3.1 of the LSB.
Using a now fully integrated installation process, Debian GNU/Linux 4.0
comes with out-of-the-box support for encrypted partitions. This
release introduces a newly developed graphical frontend to the
installation system supporting scripts using composed characters and
complex languages; the installation system for Debian GNU/Linux has now
been translated to 58 languages.
Also beginning with Debian GNU/Linux 4.0, the package management system
has been improved regarding security and efficiency. Secure APT allows
the verification of the integrity of packages downloaded from a mirror.
Updated package indices won't be downloaded in their entirety, but
instead patched with smaller files containing only differences from
earlier versions.
Debian GNU/Linux runs on computers ranging from palmtops and handheld
systems to supercomputers, and on nearly everything in between. A total
of eleven architectures are supported including: Sun SPARC (sparc), HP
Alpha (alpha), Motorola/IBM PowerPC (powerpc), Intel IA-32 (i386) and
IA-64 (ia64), HP PA-RISC (hppa), MIPS (mips, mipsel), ARM (arm), IBM
S/390 (s390) and -- newly introduced with Debian GNU/Linux 4.0 -- AMD64
and Intel EM64T (amd64).
Debian GNU/Linux can be installed from various installation media such
as DVDs, CDs, USB sticks and floppies, or from the network. GNOME is
the default desktop environment and is contained on the first CD. The K
Desktop Environment (KDE) and the Xfce desktop can be installed through
two new alternative CD images. Also newly available with Debian
GNU/Linux 4.0 are multi-arch CDs and DVDs supporting installation of
multiple architectures from a single disc.
Debian GNU/Linux can be downloaded right now via bittorent (the
recommended way), jigdo or HTTP; see <http://www.debian.org/CD/> for
further information. It will soon be available on DVD and CD-ROM from
numerous vendors <http://www.debian.org/CD/vendors/>, too.
This release includes a number of updated software packages, such as the
K Desktop Environment 3.5 (KDE), an updated version of the GNOME desktop
environment 2.14, the Xfce 4.4 desktop environment, the GNUstep desktop
5.2, X.Org 7.1, OpenOffice.org 2.0.4a, GIMP 2.2.13, Iceweasel (an
unbranded version of Mozilla Firefox 2.0.0.3), Icedove (an unbranded
version of Mozilla Thunderbird 1.5), Iceape (an unbranded version of
Mozilla Seamonkey 1.0.8), PostgreSQL 8.1.8, MySQL 5.0.32, GNU Compiler
Collection 4.1.1, Linux kernel version 2.6.18, Apache 2.2.3, Samba
3.0.24, Python 2.4.4 and 2.5, Perl 5.8.8, PHP 4.4.4 and 5.2.0, Asterisk
1.2.13, and more than 18,000 other ready to use software packages.
Upgrades to Debian GNU/Linux 4.0 from the previous release, Debian
GNU/Linux 3.1 codenamed "sarge", are automatically handled by the
aptitude package management tool for most configurations, and to a
certain degree also by the apt-get package management tool. As always,
Debian GNU/Linux systems can be upgraded quite painlessly, in place,
without any forced downtime, but it is strongly recommended to read the
release notes for possible issues. For detailed instructions about
installing and upgrading Debian GNU/Linux, please see the release notes
<http://www.debian.org/releases/etch/releasenotes>. Please note that
the release notes will be further improved and translated to additional
languages in the coming weeks.
About Debian
------------
Debian GNU/Linux is a free operating system, developed by more than
a thousand volunteers from all over the world who collaborate via the
Internet. Debian's dedication to Free Software, its non-profit nature,
and its open development model make it unique among GNU/Linux
distributions.
The Debian project's key strengths are its volunteer base, its dedication
to the Debian Social Contract, and its commitment to provide the best
operating system possible. Debian 4.0 is another important step in that
direction.
Contact Information
-------------------
For further information, please visit the Debian web pages at
<http://www.debian.org/> or send mail to <press@debian.org>.
Monday, June 12, 2006
Install Perl CPAN Modules in debain
http://www.debian-administration.org/articles/78
Thursday, January 05, 2006
GPG error: for apt-get
W: GPG error: ftp://www.hk.debian.org unstable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F1D53D8C4F368D5D NO_PUBKEY 010908312D230C5F
W: You may want to run apt-get update to correct these problems
Solution:
$ gpg --keyserver wwwkeys.eu.pgp.net --recv-keys F1D53D8C4F368D5D
$ gpg --armor --export F1D53D8C4F368D5D | apt-key add -
$ gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 010908312D230C5F
$ gpg --armor --export 010908312D230C5F | apt-key add -
$ apt-get update
Sunday, March 13, 2005
愈來愈愛用DEBIAN
最近寫畢業論文,發現LINUX真的非常方便。
第一次在LINUX上寫文,
發現有DIA這一個繪圖工具,
這工具對本人論文中的插圖,幫助非常大。
以前在M$ WINDOWS中,寫報告,要畫圖時,會很麻煩,
因為繪圖,而去買昂貴,而又對本人沒有什麼實際用途的繪圖軟體,
是不可能,小畫家繪圖又太過麻煩。
因此會用M$ WORD中的繪圖工具,
在M$ WORD中畫插圖,
問題是當圖愈多,出現死機的情況會愈多。
更試過一次不知什麼問題,開不回檔案。
最初在LINUX中,用OPEN OFFICE寫論文時,
仍不知有DIA這個軟體,
而GIMP中,本人又找不到繪四方形的工具,
因此最初是用OPEN OFFICE入面的繪圖工具,先畫了2個圖試試,
但問題,亦是和在M$ WORD中的一樣。
之後,本人覺得LINUX作為自由軟體,
應會有一些同好,寫一些方便自己及他人的軟體。
於是就以“不信邪”的心態,慢慢試一些在GRAPHIC入面的軟體。
之後發現原來本人早就裝了DIA這一個專用來繪DIAGRAM的軟體。
DIA,簡單又易用,而且功能足夠本人繪圖,
真是一個好軟體。
LINUX,真是方便。
另一個愛用LINUX的原因,
是本人寫PORGRAM時,不用另買COMPLIER,
GCC的功能,己足夠本人做功課用。
之前這些,REDHAT(FEDORA)的都有同樣功能。
至於為何愛用DEBIAN,
是因為其自由度比REDHAT的大,
桌面的設定,軟體的安裝等,
都比FEDORA的限制少。
像SUGA,CEDEGA等程式,
在FEDORA時,經過修改後,有時仍不能正常運作。
反觀DEBIAN,不需什麼大修改,就能正常運作。
唯一是SERVER上,本人仍對REDHAT信心比DEBIAN多一點。
DEBIAN仍有太多要自己一手一腳設定,
因此本人對安全方面不太有信心,因為不知自己的設定,會有什麼漏洞出現。
現時仍覺功力不足,用人家的比較安心。
Wednesday, March 02, 2005
開機磁片
GRUB開機磁片
mkfs /dev/fd0
mount /media/floppy/
mkdir -p /media/floppy/boot/grub
cp /boot/grub/stage1 /boot/grub/stage2 /boot/grub/menu.lst /media/floppy/boot/grub/
umount /media/floppy/
/sbin/grub --batch --device-map=/dev/null <
http://www.debian.org.hk/blog-entry-17
Thursday, February 03, 2005
奇怪的GNOME MENU#2
之前有網友指出,
GNOME MENU沒法顯示自行加入SHORTCUT的功能,
是因為libglib 2.0 是升級到2.6.1-3的問題。
本人不見了GNOME MENU ICON是在UPGRADE到2.6.1-2時,
之後升級到2.6.1-3,是仍不能顯示,
但沒有做DOWNGRADE去回復。之後做了全系統UPDATE,就尤MENU沒有ICON。
今日,幫系統做全UPGRADE,GNOME MENU的所有SHORTCUT全部顯示回來了。
但查過libglib2.0,仍是VERSION 2.6.1-3。
因此,GNOME MENU出問題,應不是libglib的問題,
而是其他問題。
因此,到現時為止,本人仍不知道有什麼問題,
令到GNOME MENU顯示不到自行加入的SHORTCUT。
Wednesday, January 26, 2005
初試DEBIAN
本人由第一個LINUX系統,REDHAT5,到最上一個系統,FEDORA3,都是用REDHAT的。
現本人家中的SERVER都是用FEDORA的。
DEBIAN是第一次用,之前有試用過UBUNTU,但覺得SUDO不大習慣,最後用回FEDORA。
本來LAPTOP是用開FEDORA的,但由於在聖誕期間,FEDORA給本人玩倒了,要重新安裝系統,
於是在聖誕時,貪玩的試安裝DEBIAN。
因Woody在安裝時,不支援本人的USB CDROM,因此去DOWNLOAD還在TEST中的SARGE看看,
因其KERNEL SUPPORT本人的USB CDROM,本人是用KERNEL 2.6,用INTERNET 安裝,Mirror用Oxford University的。
在安裝時,在分區其間,給那些description難到,不太明白在做什麼,個人覺得比woody更不清楚,花了點時間,也險些把原有的DATA給刪除。
有驚無險,安裝完成。
覺得DEBIAN幾好,一開始就SUPPORT 播放MP3和DVD的功能,
不像那些公司版本的LINUX不附有播於含有專利的多媒體格式。
現不用花時間找套件安裝,很省時間。
其後發現不支援中文,花了點時間找方法,
其後發現可用Synaptic Package Manager直接下載本人所需的PACKAGE,
覺得比FEDORA時方便。
在完成顯示中文後,就花時間在中文輸入上。
最初是用UIM的,但發現沒有倉頡,之後裝SCIM。
但在裝完SCIM後,不能使用。
其後發現UIM和SCIM不能同時安裝,否則系統預設是用UIM,在非GNOME2的軟體會設換不了SCIM的。
在完成中文輸入後,
用Synaptic Package Manager加裝了本人寫PROGRAM時常用的LIBRARY、WINE等。
之後再安裝VMWARE、CEDEGA等。
最後安裝JAVA,JBUILDER,就大致完成本人所需的軟體。
其後就是美化桌面,發現原來已有gdesklet在DEBIAN的套件中,
愈來愈覺得DEBIAN很厲害。
完成所有本人所需的,感覺是DEBIAN比FEDORA快很多。
但可惜是USB的支援,在DEBIAN中仍不是很穩定,
本人在BOOT KERNEL時,如已有USB HARDWARE插在PORT中,在KERNEL DETECT完USB後,ADDRESS會發生錯誤,之後整個電腦會死了,要斷電REBOOT。
本人在用FEDORA及UBUNTU時沒有這問題。
試過REBUILD KERNEL,都解決不了。
正在找出問題所在。
Sunday, January 23, 2005
奇怪的GNOME MENU
原本GNOME個MENU都能新增ITEM的。
但今日不知作了些什麼,
GNOME MENU突然顯示不了新增的項目。
查看applications:///時,
那些項目是存在的,
但個MENU怎樣都顯示不了,
試過REBOOT,重新安裝GNOME都不行。
也試過開另一個新USER看看,新加入一些SHOUTCUT,但都顯示不了。
看過~/.gnome2/vfolders/applications.vfolder-info的SETTING是沒有問題的,
~/.gnome2/vfolders/applications內也有SHOUTCUT。
現唯一能顯示的,是CXOFFICE所安裝的WIN32 SHOUTCUT,
那些SHOUTCUT在applications:///是存在,
~/.gnome2/vfolders/applications.vfolder-info
也有有關的SETTING,
~/.gnome2/vfolders/applications內也有其SHOUTCUT。
只是顯示不了本人所新增的。
這就令本人更加不明白問題出在哪裡。
在gnomeconf中,
看過SETTING,MENU所指的是applications:///沒錯。
在網上找不有關的問題,
更不用說可找到答案。
神奇。
Saturday, January 22, 2005
安裝備忘#1
Detect Hardware:
from:
http://wiki.debian.org.tw/index.php/HardwareIdentification
兩個主要的硬體偵測軟體
* discover - hardware identification system
* kudzu - The Red Hat Linux hardware probing tool.
在 USB/Cardbus, Network 與 IEEE1394 介面,所謂隨插即用仍需在插入相關硬體時載入相關的驅動程式, Linux 2.4 核心中的新 "HotPlug" 功能可以支援這個需求。以下兩種軟體可供於選擇
* hotplug - Linux Hotplug Scripts
* murasaki - another HotPlug Agent
PCMCIA 介面卡則可使用
* pcmcia-cs - PCMCIA Card Services for Linux
另外一項可能困擾您的,大概就是如何設定 XWindow 下的滑鼠
* mdetect - mouse device autodetection tool
============================================================
DEBIAN中文輸入:for all language have scim input
add a file called
95xinput
in /etc/X11/Xsession.d/
and input the following:
#============================
/usr/bin/scim -d
export XMODIFIERS="@im=SCIM"
#============================
REDHAT (fedora3) for all language have cjk input
mkdir ~/.xinput.d
ln -s /etc/X11/xinit/xinput.d/iiimf ~/.xinput.d/default
Redhat check package
rpm -qa |grep 'rpm'