`
kingoal
  • 浏览: 156600 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

利用CVSUP更新Port Tree

阅读更多

 

#cd /usr/ports/net/cvsup-without-gui/
#make install clean //安裝
#cd /usr/share/examples/cvsup/ //存放更新範例路徑
文件範例說明:
cvs-supfile //更新Main source tree and ports collection
doc-supfile //更新Document
gnats-supfile //更新FreeBSD bug database
ports-supfile //更新Ports collection
stable-supfile //更新Main source tree
standard-supfile //更新Main source tree
www-supfile //更新FreeBSD 官方網頁
#cp ports-supfile /root/ //複製ports-supfile到root目錄底下
#cd /root //切換到root目錄底下
#vi ports-supfile //修改ports-supfile內容

修改以下內容
default host CHANGE_THIS.FreeBSD.org //官方站台(預設值)
default host cvsup.tw.freebsd.org //改為國內站台交大資工如此下載速度較快(還有cvsup1~13都可使用)

#rehash
#cvsup -g -L 2 ports-supfile //更新ports-tree

———————-省略——————————-
Shutting down connection to server
Finished successfully
//看到上面訊息代表更新成功
#portsdb -Fu //當每次採用 CVSup 更新完 port tree 後,執行portsdb -Fu 來及時更新您的 port INDEX資料庫

 

 

portupgrade -r pkg_name 升级单个软件和与其相关的
其中 pkg_name 是 pkg_info 中显示的名字

portupgrade -ar 就会自动更新全部了。
如果加上 P 参数,则先看是否有已经编译好的 pkg 下载,直接从 pkg 升级,省去自己编译。
下载站点可以通过修改 /usr/local/etc/pkgtools.conf 更改

portupgrade -arR 升级所有已经安装的软件,并且检查依赖关系

 

使用 Ports 系统
1 查询
比如,你想知道 ports 中是否有 pidgin 这个软件,那么可以这样:
$cd /usr/ports
$make search key=pidgin
同样也可以使用
$cd /usr/ports
$make search name=pidgin
/usr/ports/README 中还有更多的例子可以参考。

2 安装
非常简单。比如你要安装 firefox,那么作为超级用户 root:
#cd /usr/ports/www/firefox
#make install clean
3 卸载
要卸载 firefox 的话:
#cd /usr/ports/www/firefox
#make deinstall clean
4 升级
要升级 firefox:
#cd /usr/ports/www/firefox
#make deinstall reinstall clean
用ports安装东东很简单,但是有的时候在安装完后就会忘记make clean make distclean,一个一个找好麻烦,OK,follow me.....
先删除make world和编译内核留下的垃圾文件
rm -r /usr/obj/*
常用的 Ports 管理工具portsnap
这是推荐的升级 Ports 系统树的工具。
portupgrade
相当好用的升级 Ports 中软件的 Ruby 工具。支持从源码/包升级。
pkg 工具
FreeBSD 基本系统中自带的包管理工具。方便实用。都是 pkg_* 类型的系统命令,比如 pkg_add, pkg_delete 之类的!

2.安装个小东西,可以升级soft,也可做清理
cd /usr/ports/sysutils/portupgrade && make install clean

portupgrade升级soft
portupgrade -riv -m `参数,如WITH_MYSQL=yes` vpopmail

下面进行清理
portsclean -C
Cleaning out /usr/ports/*/*/work...
完成每个目录下的make clean功能

portsclean -DD
Detecting unreferenced distfiles...
[Rebuilding the pkgdb in /var/db/pkg ... - 33
packages found (-0 +33) ................................................................ done]
删除不存在于pkg_info中的/usr/ports/distfiles下的文件包

如果想把存在于pkg_info中的distfiles也删了,直接去目录删就好了
rm -r /usr/ports/distfiles/*

还有个portclean,自己man一下吧
man portclean
http://4dian.org/post/2/28

分享到:
评论

相关推荐

    linux 架设 FreeBSD CVSup mirror

    前一段学校里面我原来架设的 FreeBSD CVSup mirror 服务器停止服务了,因为机器被搬走了:p,很想再搞一个,但是可惜校内没有什么我可以用的机器是用 FreeBSD 的,我有权限的机器有 AIX,linux,windows,后想了半天...

    fastest cvsup-开源

    查找适用于FreeBSD / OpenBSD / NetBSD的最快的CVSup镜像服务器

    FreeNAS 开发人员手册

    1.3.1 安装CVSup 1.3.2 配置CVSup 1.4 重新编译所有代码 1.4.1 配置/etc/make.conf 1.4.2 编译所有 1.4.2.1 编译安装内核 1.4.2.2 编译安装根 1.4.2.3 升级port 2 安装FreeNAS 2.1 定义系统环境变量 2.2 ...

    a project model for the FreeBSD Project.7z

    An example of a port is the port for the web-browser Mozilla. It contains information about where to fetch the source, what patches to apply and how, and how the package should be installed on the ...

    KDE CVSBuild-开源

    它是一个Shell脚本,可使用svn / cvs / cvsup更新本地KDE源代码,并执行所有必要步骤来构建和安装KDE软件包,包括qt(-copy)和kde-i18n。

    FreeBSD.6.2服务器架设视频教程下载

    资源名称:FreeBSD.6.2服务器架设视频教程下载教程内容:01安装02配置03ftp04内核05samba06dhcp07mysql08apache何亮bsd教程之apache安装配置何亮bsd教程之apm环境搭建何亮bsd教程之cvsup服务器建立和使用何亮bsd教程...

    ftp.kaist.ac.kr:KAIST文件存档服务配置

    Rsync总共最多允许50个连接,而CVSup最多允许30个连接。 FTP从一个地址最多允许10个同时连接,而CVSup最多允许2个同时连接。服务条款由于通过此服务提供的文件可能引起的任何问题,操作员概不负责。 运营商可以记录...

    FREEBSD 升级及优化全攻略

    樊礼(梦飞) 欢迎转载﹐本文遵循GNU 协议规则﹗ 前言.................cvsup .................................................................................................................................

Global site tag (gtag.js) - Google Analytics