wangchao.org
添加收藏
 
购物视频论坛博客自然风光美女图片王朝网络小游戏BT下载生活百科编程设计手机图片小说
 
化妆 | 音乐 | 影视 | 图书 | 英语 | 宠物 | 美食 | 旅游 | 养生 | 手机 | 数码 | 汽车 | 珠宝 | 美容 | 装修 | 厨房 | 科普 | 动物 | 植物 | 影音 | 百科 | 知道 | 词典
  
 
 您好! 您现在位于: 王朝网络 → 编程设计 → 《在Linux fedora 5上安装本地dictd server的方法返回上一页 
 
1楼 

在Linux fedora 5上安装本地dictd server的方法

  网上购物、在线购物、购物搜索 欢迎光临本站购买图书、影视、音乐、数码、百货,手机等商品。

  1. 使用root登录后,在命令行提示符下用:
  [root@localhost ~]# yum install dictd
  安装上dictd,你可以在命令行上使用如下三个命令:
  a. [root@localhost ~]# dictd 结果是:
   [root@localhost ~]#
  b. [root@localhost ~]# dict 结果为:
  dict 1.9.15/rf on Linux 2.6.15-1.2054_FC5smp
  Copyright 1997-2002 Rickard E. Faith (faith@dict.org)
  Use --help for help
  [root@localhost ~]#
  c. [root@localhost ~]# dictfmt 结果为:
  [root@localhost ~]# dictfmt
  dictfmt v. 1.9.15 December 2000
  Copyright 1997-2000 Rickard E. Faith (faith@cs.unc.edu)
  Usage: dictfmt [-c5|-t|-e|-f|-h|-j|-p] -u url -s name [options] basename
  Create a dictionary databse and index file for use by a dictd server
  -c5 headwords are preceded by a line containing at least
   5 underscore (_) characters
  。。。。。。
  以上结果表明dictd 安装正确。
   说明:1. 在/usr/bin/下有dict、dictfmt命令;在/usr/sbin/下有dictd命令;在/etc/init.d/目录下有dictd文件用来启动dictd server,后面我会谈到如何启动。
   2. 你可以到ftp://ftp.dict.org/pub/dict/下载dictd-1.9.15.tar.gz解压缩,照着文件中的去做,但我在make的时候出现了编译错误,所以没法分享
  2. 编写配置文件和下载字典数据库
   现在本地dictd server还不能工作,你必须写两个配置文件dictd.conf和dict.conf(存储到/etc/目录下)他们的内容如下:
  dictd.conf:
   access {allow localhost allow *}
   database web1913 { data "/usr/local/lib/dict/web1913.dict.dz"
   index "/usr/local/lib/dict/web1913.index" }
  dict.conf:
  server localhost
  从dictd.conf文件中可以看到web1913.dict.dz和web1913.index是两个文件,这就是字典数据库文件,你可以从
ftp://ftp.dict.org/pub/dict/pre下载dict-web1913-1.4-pre.tar.gz后,解压缩到/usr/local/lib/dict/目录下。他们的名字分别为:web1913.dict.dz和web1913.index
  Note:如果你想要配置成可以从其他机器查询dictd server,可以参考:http://www.newsmth.net/pc/pccon.php?id=6147&nid=152430
   我上面的配置文件及有关内容,你还可以参考:
http://docs.kde.org/stable/en/kdenetwork/kdict/obtaining-databases.html
  3. 测试和启动你的本地dictd server
  1. 首先用这些命令:dictd --test-show-info web1913 显示有关数据库web1913的信息,如果没有错误的话,表明一切正常,你可以启动你的dictd server了。
  2. 启动
  [root@localhost ~]# /etc/init.d/dictd start
  接下来:
  你可以
  [root@localhost ~]# dict word
  查找到单词了吧,恭喜你,成功了。
  Note:也许你会在执行dictd --test-show-info web1913或任何其他测试有关web1913时,碰到这个错误:
  :I: 3817 starting dictd 1.9.15/rf on Linux 2.6.15-1.2054_FC5smp Sun Jul 30 10:06:21 2006
  :E: /usr/local/lib/dict/web1913.index is not readable (index file)
  :E: /usr/local/lib/dict/web1913.dict.dz is not readable (data file)
  :E: for security, this program will not run as root.
  :E: if started as root, this program will change to "dictd" or "nobody".
  :E: currently running as user 99/nobody, group 99/nobody
  :E: config and db files must be readable by that user
  dictd (sanity): :E: terminating due to errors. See log file
  (sanity) :E: terminating due to errors. See log file
  [root@localhost ~]#
  恭喜你,你跟我一样惨,还好,我已经知道了,你可以用chmod 777 /usr/local/lib/dict/web1913.index来修改其属性就可以了。

1. 使用root登录后,在命令行提示符下用: [root@localhost ~]# yum install dictd 安装上dictd,你可以在命令行上使用如下三个命令: a. [root@localhost ~]# dictd 结果是: [root@localhost ~]# b. [root@localhost ~]# dict 结果为: dict 1.9.15/rf on Linux 2.6.15-1.2054_FC5smp Copyright 1997-2002 Rickard E. Faith (faith@dict.org) Use --help for help [root@localhost ~]# c. [root@localhost ~]# dictfmt 结果为: [root@localhost ~]# dictfmt dictfmt v. 1.9.15 December 2000 Copyright 1997-2000 Rickard E. Faith (faith@cs.unc.edu) Usage: dictfmt [-c5|-t|-e|-f|-h|-j|-p] -u url -s name [options] basename Create a dictionary databse and index file for use by a dictd server -c5 headwords are preceded by a line containing at least 5 underscore (_) characters 。。。。。。 以上结果表明dictd 安装正确。 说明:1. 在/usr/bin/下有dict、dictfmt命令;在/usr/sbin/下有dictd命令;在/etc/init.d/目录下有dictd文件用来启动dictd server,后面我会谈到如何启动。 2. 你可以到[url=ftp://ftp.dict.org/pub/dict/]ftp://ftp.dict.org/pub/dict/[/url]下载[url=ftp://ftp.dict.org/pub/dict/dictd-1.9.15.tar.gz]dictd-1.9.15.tar.gz[/url]解压缩,照着文件中的去做,但我在make的时候出现了编译错误,所以没法分享 2. 编写配置文件和下载字典数据库 现在本地dictd server还不能工作,你必须写两个配置文件dictd.conf和dict.conf(存储到/etc/目录下)他们的内容如下: dictd.conf: access {allow localhost allow *} database web1913 { data "/usr/local/lib/dict/web1913.dict.dz" index "/usr/local/lib/dict/web1913.index" } dict.conf: server localhost 从dictd.conf文件中可以看到web1913.dict.dz和web1913.index是两个文件,这就是字典数据库文件,你可以从 [url=ftp://ftp.dict.org/pub/dict/pre]ftp://ftp.dict.org/pub/dict/pre[/url]下载[url=ftp://ftp.dict.org/pub/dict/pre/dict-web1913-1.4-pre.tar.gz]dict-web1913-1.4-pre.tar.gz[/url]后,解压缩到/usr/local/lib/dict/目录下。他们的名字分别为:web1913.dict.dz和web1913.index Note:如果你想要配置成可以从其他机器查询dictd server,可以参考:[url=http://www.newsmth.net/pc/pccon.php?id=6147&nid=152430]http://www.newsmth.net/pc/pccon.php?id=6147&nid=152430[/url] 我上面的配置文件及有关内容,你还可以参考: [url=http://docs.kde.org/stable/en/kdenetwork/kdict/obtaining-databases.html]http://docs.kde.org/stable/en/kdenetwork/kdict/obtaining-databases.html[/url] 3. 测试和启动你的本地dictd server 1. 首先用这些命令:dictd --test-show-info web1913 显示有关数据库web1913的信息,如果没有错误的话,表明一切正常,你可以启动你的dictd server了。 2. 启动 [root@localhost ~]# /etc/init.d/dictd start 接下来: 你可以 [root@localhost ~]# dict word 查找到单词了吧,恭喜你,成功了。 Note:也许你会在执行dictd --test-show-info web1913或任何其他测试有关web1913时,碰到这个错误: :I: 3817 starting dictd 1.9.15/rf on Linux 2.6.15-1.2054_FC5smp Sun Jul 30 10:06:21 2006 :E: /usr/local/lib/dict/web1913.index is not readable (index file) :E: /usr/local/lib/dict/web1913.dict.dz is not readable (data file) :E: for security, this program will not run as root. :E: if started as root, this program will change to "dictd" or "nobody". :E: currently running as user 99/nobody, group 99/nobody :E: config and db files must be readable by that user dictd (sanity): :E: terminating due to errors. See log file (sanity) :E: terminating due to errors. See log file [root@localhost ~]# 恭喜你,你跟我一样惨,还好,我已经知道了,你可以用chmod 777 /usr/local/lib/dict/web1913.index来修改其属性就可以了。

 
标签: dictd  fedora  Linux  server  上安装  方法  本地  
 
您可以将本页贴到其他网站
UBB代码HTML代码
 
 
 
 

 
 
 
 
 更多内容
 ·中文TTS 的简单实现(基于linux) ·中文TTS 的简单实现(基于linux) ·Apache中预创建Preforking MPM 机 ·自动安装Windows2000系统
 ·中文Windows 2000登录安全漏洞 ·Linux下如何接ADSL一类的宽带猫带 ·在RedHat linux 8.0下完整详尽的 ·中小异构Linux网络故障分析与排除
 ·Linux操作系统概述 ·Linux文件系统 ·黑客行为动机是什么—Linux之父的 ·使用 netfilter/iptables 为 Lin
 ·LUI-linux集群自动安装工具 ·win2k运行进程简要说明 ·Windows 2000 Recovery Console  ·浅析linux下脚本拨号上网
 ·配置支持SSL的Tomcat ·决战微软--访中国Linux之父“袁 ·也谈 Windows VS Linux:只有傻瓜 ·什么是linux?谁是linus?
 ·更好的安全机制,更少的死机—— ·Win98平台openssl编译方法和分析 ·玩转Xwindow 终端 ·Windows 2000进程细述.
 
 
 
最新评论  点此查看所有评论
 
 
 
 
发表评论(支持UBB码)


验证码:  
 
 
 
© 2005- 王朝网络 版权所有