Recently in Linux Category

因為 gnome-terminal 的 zoom_out hotkey Ctrl+-, 跟 joe editor 的 undo 相衝,
導致 joe 在使用時無法 undo, 很不方便.
以下是取消 zoom_in,zoom_out hotkey 的方法
gconftool-2 -st string /schemas/apps/gnome-terminal/keybindings/zoom_in disabled
gconftool-2 -st string /schemas/apps/gnome-terminal/keybindings/zoom_out disabled

ref. gnome-terminal source

下載 Linux 專用的 Java 軟體 並安裝
若 Firefox 裝在 /usr/local/firefox
cd /usr/local/firefox/plugins
ln -s /usr/java/jre1.6.0_07/plugin/i386/ns7/libjavaplugin_oji.so .
重新啟動 Firefox, 可以到 Java 測試頁 試一下 Java 有沒有 Work
實際路徑可能跟您裝的 jre 版本不同

ref. Mozilla PluginDoc: Java Runtime Environment

newcj3gcin for gcin
newcj3scim for scim
script 的前面有兩個參數,
NO_DOT_COMMA=1, 表示移除不用 ,. 當字根(傳統倉頡做法)
NO_PTT=1 (表示移除 ptt 相關詞)
若要用 SVN 的版本, 先抓 NewCJ3.cin 到目前目錄, 再跑 script.
/usr/share/gcin/table/gtab.list 內容
#內碼 0 -
倉頡 1 cj.gtab
亂倉 2 NewCJ3.gtab
#倉五 2 cj5.gtab
#輕鬆 2 ez7.gtab
注音 3 -
#帶調粵拼 4 jyutping.gtab
#標點倉頡 4 cj-punc.gtab
嘸蝦米 5 liu5.gtab
#拼音 5 pinyin.gtab
#詞音 6 -
大易 7 dayi3.gtab
行列 8 ar30.gtab
#簡易 - simplex.gtab
改完後用 gcin-setup 再調整一下.

DbVisualizer

| | Comments (0)

DbVisualizer 是一套全方位的資料庫管理工具, 各種資料庫都支援.
會注意到這套主要是它有 for Linux 的版本, 用來在 Linux 下管理 MSSQL 還滿好用的.
DbVisualizer 是用 Java 寫的, 需 copy 中文字型到 $JAVA_HOME/jre/lib/fonts 中文才不會秀出方塊,
cd $JAVA_HOME/jre/lib/fonts
mkdir fallback
cp path/msjh.ttf fallback (複製微軟正黑體)
cd fallback
mkfontscale
mkfontdir
試用的 Free Edition 好像也沒什麼限制.

ref. Linux操作系统JDK中文字体设置方法介绍

mingetty autologin

| | Comments (0)

mingetty 有自動登入參數 --autologin
例: 在第一個 console 以 pank 身分自動登入
/etc/inittab
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty --autologin pank tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

CentOS 5.2 released

| | Comments (0)

http://mirrors.kernel.org/centos/5.2/isos/
台灣 mirror twaren | tnc | pu | chu | isu | tcc

CentOS 是拿 RedHat Enterprise Linux 的 Source 來編, 也就是 CentOS 和 RHEL 幾乎一樣, 而 CentOS 免費, RHEL 要錢.

VirtualBox Bridge Mode

| | Comments (0)

先裝好 tunctl 及 bridge-utils 套件
tunctl -t tap0 -u virtualbox
brctl addbr br0
ifconfig eth0 0.0.0.0 promisc
brctl addif br0 eth0
ifconfig br0 192.168.0.1 (把原來設在 eth0 的 IP 設到 br0)
brctl addif br0 tap0
ifconfig tap0 up
chmod 0666 /dev/net/tun
VirtualBox 網路設定為 Host Interface, Interface Name 為 tap0
就跟 VMware 的 Bridge Mode 一樣.

Lighttpd + PHP + XCache

| | Comments (0)

Lighttpd
wget http://www.lighttpd.net/download/lighttpd-1.4.19.tar.bz2
tar jxvf lighttpd-1.4.19.tar.bz2
cd lighttpd-1.4.19
./configure --prefix=/usr/local/lighttpd
make && make install
cd doc
mkdir /etc/lighttpd
cp lighttpd.conf /etc/lighttpd
cp sysconfig.lighttpd /etc/sysconfig/lighttpd
cp rc.lighttpd.redhat /etc/init.d/lighttpd
sed -i "s/sbin/local\/lighttpd\/sbin/" /etc/init.d/lighttpd
mkdir /var/run/lighttpd /var/log/lighttpd
chown apache.apache /var/run/lighttpd /var/log/lighttpd

server.modules = (
"mod_rewrite",
"mod_redirect",
"mod_alias",
"mod_access",
"mod_fastcgi",
"mod_cgi"
"mod_accesslog" )
cgi.assign = ( ".pl" => "/usr/bin/perl",
".cgi" => "/usr/bin/perl" )
server.document-root = "/var/www/html/"
server.username = "apache"
server.groupname = "apache"
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
"bin-path" => "/usr/local/php-fcgi/bin/php"
)
)
)

PHP
wget http://tw.php.net/distributions/php-5.2.5.tar.bz2
tar jxvf php-5.2.5.tar.bz2
cd php-5.2.5
./configure --prefix=/usr/local/php-fcgi --with-mysql=/usr --with-mssql \
--with-config-file-path=/usr/local/php-fcgi/etc \
--enable-sockets --enable-pcntl --enable-mbstring --with-iconv \
--with-gd --with-curl --with-zlib --with-jpeg-dir --with-ttf \
--with-ldap --with-gettext --enable-soap --with-xmlrpc --with-openssl \
--enable-fastcgi --enable-discard-path --enable-force-cgi-redirect
make && make install
cp php.ini-recommended /usr/local/php-fcgi/etc/php.ini
echo cgi.fix_pathinfo=1 >> /usr/local/php-fcgi/etc/php.ini
ref. Setting up PHP with Lighttpd

XCache
wget http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.bz2
tar jxvf xcache-1.2.2.tar.bz2
cd xcache-1.2.2
/usr/local/php-fcgi/bin/phpize --clean
/usr/local/php-fcgi/bin/phpize
./configure --enable-xcache --with-php-config=/usr/local/php-fcgi/bin/php-config
make && make install
cat xcache.ini >> /usr/local/php-fcgi/lib/php.ini
edit /usr/local/php-fcgi/lib/php.ini
zend_extension = /usr/local/php-fcgi/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
xcache.size = 4M

Install HPADU on CentOS 5.1

| | Comments (0)

HPADU 是 HP Array Diagnostic Utility
原廠的 rpm 只支援 RHEL, SuSE, Debian, 其實它只有檢查 /etc/redhat-release,
只要把 CentOS 5.1 /etc/redhat-release 的內容改成
Red Hat Enterprise Linux Server release 5.1 (Tikanga)
就可以裝在 CentOS 5.1
依序裝 compat-libstdc++, hpsmh, hpadu
cp /opt/hp/hpadu/bld/libcpqhmmo.so /lib
hpadu 啟動後有 Web 介面可以監控 RAID 的狀態
https://host:2381/

原廠 rpm 網址:
ftp://ftp.hp.com/pub/softlib2/software1/pubsw-linux/p308170531/v42872/hpsmh-2.1.11-197.i386.rpm
ftp://ftp.hp.com/pub/softlib2/software1/pubsw-linux/p308169743/v43140/hpadu-8.0-14.noarch.rpm

Show Script in RPM

| | Comments (0)

rpm -qp --scripts file.rpm 可以秀出 RPM 在 install/uninstall 的 script

ref. 請問如何看RPM 包的內容及RPM所執行的過程?

July 2008

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

About this Archive

This page is a archive of recent entries in the Linux category.

Life is the previous category.

Misc is the next category.

Find recent content on the main index or look in the archives to find all content.