ONEDUST – 浮塵草堂

Sulow的開放空間 – 浮塵草堂

FreeBSD Package 升级

pkg_version -v # 看哪些版本要升級
pkg_version -IvL = 或 pkg_version -Ivl ‘<’ 或 portversion -vl ‘<’ # 只看哪些版本需要升級portupgrade PKG_NAME_VERSION # 單純升級一個版本
portupgrade -a # 全部升級
pkg_version -Iql ‘<’ | xargs portupgrade # 列出套件再丟進去升級

FreeBSD 下 make.conf 简单设定

CPUTYPE?=athlon64
CFLAGS= -O2 -fno-strict-aliasing -pipe
INSTALL=install -C

BOOTWAIT=300

# CVSup update flags. Edit SUPFILE settings to reflect whichever distribution
# file(s) you use on your site (see /usr/share/examples/cvsup/README for more
# information on CVSup and these files). To use, do "make update" in /usr/src.
#
SUP_UPDATE= yes
SUP= /usr/bin/csup
SUPFLAGS= -g -L 2
SUPHOST= cvsup.tw.FreeBSD.org
SUPFILE= /usr/share/examples/cvsup/standard-supfile
PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile
DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile

MASTER_SITE_BACKUP?=  
ftp://ftp.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/
ftp://ftp6.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/
ftp://ftp4.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/
MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP}

BATCH=yes

# added by use.perl 2009-03-07 12:44:47
PERL_VER=5.8.8
PERL_VERSION=5.8.8

FreeBSD 初安装

/etc/csh.cshrc 中加上

set autolist //可按Tab 自动补齐
set nobeep //去除恼人"哔哔"声

alias ls ‘ls -G’ //ls有颜色

软件是最新可以 cvsup ports 后 portupgrade
系统最新方法有两种:
1、cvsup src 然后 make world
2、freebsd-update
如果不想自己编译,推荐用后者。不过后者似乎不能更新到非 release 的 stable 版本。只能更新 release 版本,以及它们的 patch 版本。

cvsup -g -L 2 ports-supfile
相当于 agt-get update

然后 portupgrade -arR
相当于 apt-get upgrade
如果你想看会升级哪些软体包,就 portversion -l "< "

如果单单想升级一个软体,更新完ports树后,到该软体目录 make install clean

第 2 頁,共 2 頁12

无觅相关文章插件,快速提升流量