首页 >> 中医新闻

在上安装本地的

中医新闻  2021年09月06日  浏览:3 次

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..2054_FC5smp

Copyright Rickard E. Faith (faith@)

Use --help for help

[root@localhost ~]#

c. [root@localhost ~]# dictfmt 结果为:

[root@localhost ~]# dictfmt

dictfmt v. 1.9.15 December 2000

Copyright Rickard E. Faith (faith@)

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. 下载解压缩,照着文件中的去做,但我在make的时候出现了编译错误,所以没法分享

2. 编写配置文件和下载字典数据库

现在本地dictd server还不能工作,你必须写两个配置文件nf和nf(存储到/etc/目录下)他们的内容如下:

nf:

access {allow localhost allow *}

database web1913 { data \"/usr/local/lib/dict/\"

index \"/usr/local/lib/dict/dex\" }

nf:

server localhost

从nf文件中可以看到和dex是两个文件,这就是字典数据库文件,你下载后,解压缩到/usr/local/lib/dict/目录下。他们的名字分别为:和dex

Note:如果你想要配置成可以从其他机器查询dictd server,可以参考:

我上面的配置文件及有关内容,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..2054_FC5smp Sun Jul 30 10:06:21 2006

:E: /usr/local/lib/dict/dex is not readable (index file)

:E: /usr/local/lib/dict/ 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/dex来修改其属性就可以了。

吃什么止泻快
南京不孕不育医院
天津哪医院妇科好
友情链接