免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2246 | 回复: 0
打印 上一主题 下一主题

在Solaris中安装dictd [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-02-08 00:10 |只看该作者 |倒序浏览
1. 下载libmaa-1.1.0.tar.gz安装到/usr
2. 下载dictd-1.9.15.tar.gz安装到/usr/local
3. 下载dict-web1913-1.4-pre.tar.gz解压到/usr/share/dict
# ls /usr/share/dict
web1913.dict.dz  web1913.index
4. 创建配置文件/usr/local/etc/dictd.conf
site localhost
access {
    allow *
}
database web1913 {
    data "/usr/share/dict/web1913.dict.dz"
    index "/usr/share/dict/web1913.index"
    access {
        allow *
    }
}
5. 创建用户配置文件~/.dictrc
server localhost {port 2628}
6. 添加如下内容到~/.bashrc,假设字典服务器的名称叫necho,(当然你也可以配置/etc/init.d,不过下面的方法更简单)
[[ -z $(pgrep dictd) ]] && /usr/local/dictd-1.9.15/dictd
或者
[[ "$HOSTNAME" == "necho" && -z $(pgrep dictd) ]] && /usr/local/dictd-1.9.15/dictd
alias d='dict'
或者
alias d='dict -h necho'
export PAGER='/usr/bin/less -ins'
7. 使用字典
$ d java
1 definition found
From Webster's Revised Unabridged Dictionary (1913) [web1913]:
  Java \Ja"va\, n.
     1. One of the islands of the Malay Archipelago belonging to
        the Netherlands.
  
     2. Java coffee, a kind of coffee brought from Java.
  
     {Java cat} (Zo["o]l.), the musang.
  
     {Java sparrow} (Zo["o]l.), a species of finch ({Padda
        oryzivora}), native of Java, but very commonly kept as a
        cage bird; -- called also {ricebird}, and {paddy bird}. In
        the male the upper parts are glaucous gray, the head and
        tail black, the under parts delicate rose, and the cheeks
        white. The bill is large and red. A white variety is also
        kept as a cage bird.
(END)  


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/23177/showart_1818011.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP