您当前的位置:首页>>技术中心>>数据恢复文章>>正文
 
FreeBSD handbook中文版 4 安装应用程序:Packages 和Ports
作者: 来源: 日期:2007-6-14 10:27:34  点击次数:

第7 页FreeBSD 使用手册
方法,最容易的方法是到FreeBSD 的网站上查看ports 的列表。每个port 都有一个描述文
件,你需要在安装之前先浏览一下。另外一种方法是使用whereis 命令。只需要输入“whereis 
<你想安装的程序>”,如果能被系统找到,你就会看到它的保存路径: 
#whereis xchat 
xchat: /usr/ports/irc/xchat 

这个命令告诉你xchat 能在/usr/ports/irc/xchat 目录中找到。另外一种查找port 的
方法是使用ports 内建的搜索功能。要使用这个功能,你先要进入/usr/ports 目录,然后
运行make search key=program-name ,这里的program-name 就是你要找的程序的名称。
例如,如果你要找xchat: 
# cd /usr/ports 
# make search key=xchat 
Port: xchat-1.3.8 
Path: /usr/ports/irc/xchat 
Info: An X11 IRC client using the GTK+ toolkit, and optionally, GNOME 
Maint: jim@FreeBSD.org 
Index: irc 
B-deps: XFree86-3.3.5 bzip2-0.9.5d gettext-0.10.35 giflib-4.1.0 glib-1.2.6 
gmake-3.77 gtk-1.2.6 
imlib-1.9.8 jpeg-6b png-1.0.3 tiff-3.5.1 
R-deps: XFree86-3.3.5 gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gtk-1.2.6 
imlib-1.9.8 jpeg-6b 
png-1.0.3 tiff-3.5.1 
你要密切注意输出内容的“Path:”行,它告诉你能在哪儿找到它。其它的信息是在安
装ports 时不需要的,在这里就不提了。
注意: 必须具有root 权限才能安装port。
4.4.2.1.从CDROM 安装ports 
做这一步的前提是你有一张FreeBSD 的安装光盘。如果你没有,你可以从FreeBSD 商店
订购一张(www.freebsdmall.com)。在确信光盘已经放入光驱之后,你需要先挂上/cdrom, 
才可以安装ports。开始,改变目录到你要安装的ports 所在的目录: 
第8 页FreeBSD 使用手册
# cd /usr/ports/irc/xchat 
一旦进入xchat 目录,你就可以看到port skeleton 文件了。下面要编译port。只需
要在命令行简单地输入make 命令。做好之后,你可以看到下面的信息: 
# make 
>> xchat-1.3.8.tar.bz2 doesn’t seem to exist on this system. 
>> Attempting to fetch from file:/cdrom/ports/distfiles/. 
===> Extracting for xchat-1.3.8 
>> Checksum OK for xchat-1.3.8.tar.bz2. 
===> xchat-1.3.8 depends on executable: bzip2 - found 
===> xchat-1.3.8 depends on executable: gmake - found 
===> xchat-1.3.8 depends on shared library: gtk12.2 - found 
===> xchat-1.3.8 depends on shared library: Imlib.5 - found 
===> xchat-1.3.8 depends on shared library: X11.6 - found 
===> Patching for xchat-1.3.8 
===> Applying FreeBSD patches for xchat-1.3.8 
===> Configuring for xchat-1.3.8 
... 
[configure output snipped] 
... 
===> Building for xchat-1.3.8 
... 
[compilation snipped] 
... 

注意,一旦编译完成,你需要回到你的命令行。下面就安装port,在命令行输入make 
install: 
# make install 
===> Installing for xchat-1.3.8 
===> xchat-1.3.8 depends on shared library: gtk12.2 - found 
===> xchat-1.3.8 depends on shared library: Imlib.5 - found 
第9 页FreeBSD 使用手册
===> xchat-1.3.8 depends on shared library: X11.6 - found 
... 
[install routines snipped] 

本新闻共7页,当前在第4页  1  2  3  4  5  6  7  


上一篇:FreeBSD handbook中文版 3 Unix 基础
下一篇:FreeBSD handbook中文版 5 X Window 系统
  北京总部: 4006-505-808
  天 津 部: 4006-505-808
  上 海 部: 4006-505-808
  深 圳 部: 4006-505-808
  广 州 部: 4006-505-808
  重 庆 部: 4006-505-808
  南 京 部: 4006-505-808
  其它地区: 4006-505-808
经典案例
中国石油管理局-Oracle数据库恢
中国网通-IBM EXP300磁盘阵列数
大连鸿德经贸有限责任公司-SQL
中国地质环境监测院-HP LH3000
藁城市东街百货-EFS文件解密成
工商银行某省分行-AIX删除LV数
中央电视台新闻评论部-苹果分
promise乔鼎硬盘阵列数据恢复成
麒麟童文化-苹果分区无法打开,
NAS 8100服务器数据恢复成功 
解决方案
raid磁盘阵列OFFLINE后的应急方
磁盘未被格式化,是否格式化数据
误GHOST、误一键恢复灾难应急方
误删除、误格式化数据灾难应急
LINUX FSCK数据出错灾难应急方
北亚数据恢复 - 联系我们 - 关于北亚 - 友情链接 - 网站地图 - RSS聚合 
版权所有 北亚数据恢复中心
全国统一客服热线:4006-505-808
北京总部:北京市海淀区中关村大街11号E世界A座8层832B室