Here are the steps to configure Chinese input under English environment:
1. input scim (Usually, it is the default package when you install fedora)
2. install scim-tables-chinese (install chinese tables input method)
yum install scim-tables-chinese
3. edit sh under /etc/X11/xinit/xinitrc.d/xinput.sh
add en at the end of this statement:
language_list="as bn gu hi ja kn ko ml mr ne or pa si ta te th ur vi zh"
4. For active the configuration every start up, run these commands
mkdir ~/.xinput.d
ln -s /etc/X11/xinit/xinput.d/scim ~/.xinput.d/default
5. restart computer
2008年4月29日星期二
Forced Chinese input under English environment(fedora 9)
2008年4月26日星期六
Fedora9下JDK+apache+tomcat安装整合
安装完毕Fedora8后,发现其自带的apache httpd 和tomcat版本略低且配置上并不是标准方式,决定卸载这两个服务,自己动手安装最新的版本;另外更新一下JDK
卸载:
卸载非常容易,在Fedora8的图形界面环境下,打开程序菜单,找到更新程序项,点击后出现对话框,将列表中httpd和tomcat服务前的钩去掉,确定,卸载完毕;
更新JDK
1.从www.sun.com下载最新的JDK版本,我下载的是jdk-6u5-linux-i586.bin
2.安装 ./ jdk-1_5_0_06-linux-i586.bin
3.设置环境变量
[root@localhost local]# vi /etc/profile
在该文件的末尾加上下面两行
export JAVA_HOME=/usr/local/jdk
export CLASSPATH=$JAVA_HOME/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
安装apache
apache的安装也很简单
1.从www.apache.org 下载最新的http server版本,我下载的是httpd-2.2.8.tar.gz;
2.进行解压
3.配置安装参数:[root@localhost httpd-2.2.8]# ./configure --prefix=/usr/local/apache --enable-so --enable-mods-shared=all ;加载全部模块,之后可在配置文件中禁用不需要的模块
4.编译 make 安装 make install
5.启动 [root@localhost bin]# ./apachectl start 测试 http://127.0.0.1 页面出现 It Works! 安装成功!
安装tomcat
同样简单
1. 从www.apache.org 下载最新的apache tomcat版本,我下载的是 apache-tomcat-6.0.16-deployer.tar.gz;
2. 进行解压
3. 设置环境变量CATALINA_HOME,并验证
[root@localhost local]# vi /etc/profile
在文件最后加入如下一行
export CATALINA_HOME=/usr/local/tomcat
保存退出
4.启动 测试 访问127.0.0.1:8080 出现大猫,安装成功!
整合apache+tomcat
整合过程稍费周折,但也还不是太麻烦
1.从www.apache.org下载转发功能模块tomcat-connectors的最新版本,我下载的是tomcat-connectors-1.2.26-src.tar.gz;
2.进行解压
3.到解压后的native目录进行安装配置,指定apache目录tomcat目录和JDK目录位置, [root@localhost native]#./configure --with-apxs=/usr/local/apache/bin/apxs --with-tomcat=/usr/local/tomcat --with-java-home=/usr/java/jdk --with-jni
4.运行配置命令后,提示我zlib包找不到。。。只好去下载安装zlib ,也较为简单,不再累述;
5.配置正确完成后,进行编译 make
6.编译结束后到native下的apache-2.0目录下看看,应该生成了一个mod_jk.so文件,这就是转发模块,将其拷贝至apache安装目录下的modules目录
7.修改apache/conf目录下的httpd.conf文件,在LoadModule的部分添加如下内容,使apache加载转发模块:
LoadModule jk_module modules/mod_jk.so
# Declare the module for
#AddModule mod_jk.c
# Where to find workers.properties
# Update this path to match your conf directory location (put workers.properties next to httpd.conf)
JkWorkersFile conf/workers.properties
# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log next to access_log)
#JkLogFile logs/mod_jk.log
# JkLogFile "|/opt/webserver/apache2/bin/rotatelogs /opt/logs/mod_log/mod%Y_%m_%d.log 86400 480"
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# Send everything for context /examples to worker named worker1 (ajp13)
#JkMount /* balancer
JkMountFile conf/uriworkermap.properties
JkShmFile logs/jk.shm
SetHandler server-status
JkMount status
Order deny,allow
Deny from all
Allow from all
8.在apache/conf目录下创建两个文件 workers.properties 和 uriworkermap.properties;
workers.properties 是转发模块的工作单定义转发主机和监听端口等内容,见下:
#
# workers.properties
#
# list the workers by name
worker.list=localhost,status
#workers
# ------------------------
# First tomcat server
# ------------------------
worker.localhost.port=8009
worker.localhost.host=127.0.0.1
worker.localhost.type=ajp13
#worker.localhost.socket_timeout=300
worker.localhost.lbfactor=1
# Status worker for managing load balancer
worker.status.type=status
#
# END workers.properties
#
uriworkermap.properties是定义工作单里每个工作项的转发规则的,见下:
# Simple worker configuration file
# Mount the Servlet context to the ajp13 worker
#/jmx-console=loadbalancer
#/jmx-console/*=loadbalancer
/examples/*=localhost
/jkstatus/=status
至此,整合操作全部完成,重启tomcat和apache,就可以通过http://127.0.0.1/examples 访问到tomcat的目录去了
另外要注意的是,转发模块在apache版本一致的情况下是可通用的,但如果apache版本不一致,就只能自己进行编译了。
Install Arial Unicode MS to Fedora 9
Here are the steps of installing Arial Unicode MS font to Fedora 9
1. download the font file arialuni.ttf
2. open the terminal change to root by using the command su and copy the font file to destination "/usr/share/fonts/" by using this command:
cp arialuni.tff /usr/share/fonts/ p.s. after using the command su, the home directory was changed to root, so if the arialuni.ttf is in the other home directory you need to type the file path explicitly
3. To refresh the fonts directory by using this command:
fc-cache –v –f /usr/share/fonts/
4. if the fc-cache command does not work, you need to use the "touch" command to touch the font folder:
touch /usr/share/fonts
touch /usr/share/fonts/*
touch /usr/share/fonts/*/*
touch /usr/share/fonts/*/*/*
and then follow the step 3 one again and now you can choose the font from the font console.
fc-cache指令是什麼?
fc-cache的功能是掃描字型檔的子目錄,然後再建立包含字型資訊的快取(cache)給應用程式。簡單的說就是讓系統登錄指定目錄的字型。在我們執行fc-cache後面的「-f」參數,是強迫寫入(force)的意思,而「-v」是顯示執行資訊(verbose)的意思。
The above step just setting for the current user's environment.you need to do the following steps to configure for the other users:
分別編輯以下三個檔案,若檔案不存在,請自行建立:
nano ~/.gtkrc-2.0 (~代表使用者自己的家目錄)
su (以下兩個檔案要管理員權限方能操作)
nano /root/.gtkrc-2.0
nano /etc/gtk-2.0/gtkrc
在三個檔案的最後加入一行指令:
gtk-font-name = "Arial Unicode Ms 10"
2008年4月5日星期六
開竅
一直以來都憑感覺做人,以一股傻勁去做人處事,以虛幻思想世界去替代現實世界.....這就是我的生活,生存方式,生活態度....可以說這一種思想是一面雙刃刀,一方面令我可以實現好多在其他人眼中不可能的事...例如:在一年中減掉了九十磅...可以辭掉工作去中國流浪一年...可以在一年中轉七八份工.....這都是在別人眼中的不正常行為....但我樂在其中....但另一方面令到我現在都不知自己想要甚麼...我所有身邊的朋友,大部份都已經結了婚,生了小孩,有份不錯既工作,過大部份人認為正常生活,但我連女朋友都沒有....可能有呢種想法系因為年紀愈來愈大,想穩定想有自己目標,所以就想求變,現在我在我的blog中做一個記録,可能多年後再睇番,我已經找到我真正想要既生活。。。HEHE