广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 5033 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
月光 手机
个人头像
个人文章 个人相簿 个人日记 个人地图
社区建设奖
头衔:看我代替月亮惩罚你!看我代替月亮惩罚你!
版主
级别: 版主 该用户目前不上站
版区: Unix-like, 网站架设
推文 x42 鲜花 x565
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
[FreeBSD][转载] 利用CVSUP更新 Security Patch
#cd /usr/ports/net/cvsup-without-gui/

#make install clean //安装套件

#cd /usr/share/examples/cvsup/ //切换到更新范例档路径

#cp ports-supfile /root/ //复制到root目录底下

#cd /root/ //切换路径

#ee ports-supfile //编辑设定档

*default host=CHANGE_THIS.FreeBSD.org //官方站台(预设值)

*default host=cvsup.tw.freebsd.org //改为国内站台交大资工如此下载速度较快(还有cvsup1~13都可使用)

*default release=cvs tag=RELENG_6 //预设值

*default release=cvs tag=RELENG_6_3 //更改后只有安全更新会进入这个 branch的 source code

#rehash

#cvsup g -L 2 stablesupfile //开始更新
Shutting down connection to server

Finished successfully
//看到上面代表更新source code成功
更新完source code后在执行更新版本,编译核心和安装核心动作
#cd /usr/src/

#make -j4 buildworld //更新版本,可改用4个process来加速

#cd /usr/src/sys/i386/conf/ //进入编译核心设定档路径

#cp GENERIC MYKERNEL //复制一份名为MYKERNEL设定档

#ee MYKERNEL //修改设定档
—————————-省略——————————————

#cd /usr/src //进入编译核心的目录

#make buildkernel KERNCONF=MYKERNEL //编译核心

#make installkernel KERNCONF=MYKERNEL //安装核心

#reboot //完成后重新开机进入单机模式
重开机后进入倒数开机选单按6进入OK提示模式输入boot -s
接着萤幕会出现
Enter full pathname of shell of RETURN for /bin/sh:
(直接按 enter即可以 B shell进入单人模式)

#mount -u /    //重新载入 / (-u 代表改变为可读可写状态)

#mount -a -t ufs //载入所有/etc/fstab有纪录,型态为ufs的档案系统

#cd /usr/src

#mergemaster -p //利用mergemaster来检查设定档

#make installworld

#mergemaster //进行/etc目路下设定档文件的修改或更新

#reboot //重新开机

#uname -rs //检查核心版本
FreeBSD 6.3-RELEASE-p2 //可知patch已经上去(-pX)

——————————————-

关于”mergemaster -p”的说明

“mergemaster”是一个用于安装系统配置文件的设定工具,”mergemaster -p”的作用是建立一个临时的设定环境,把新的配置文件映射到这个环境。然后和系统的配置文件进行比较和处理,目的是保证系统配置文件的更新,这一点很重要!在执行”mergemaster -p”的过程中,主要是进行以下处理:

检测系统是否存在临时的设定档环境,如果存在,让管理者选择是利用现有的设定还是删除他,在新建一个新环境!

*** The directory specified for the temporary root environment,
/var/tmp/temproot, exists. This can be a security risk if untrusted
users have access to the system.

Use ‘d’ to delete the old /var/tmp/temproot and continue //按 “d” ,删除
Use ‘t’ to select a new temporary root directory //按 “t” ,选择新的目录
Use ‘e’ to exit mergemaster //按 “e” ,退出

Default is to use /var/tmp/temproot as is

How should I deal with this? [Use the existing /var/tmp/temproot]

一般的处理是先选 “d” ,删除原有的目录,系统再重新建立一个临时的根设定档。

关于”mergemaster”的说明

执行完”make installworld”之后,需要对系统的”/etc”目录下的文件进行更新,在更新过程中,需要管理者和系统进行互动,以却定需要对系统的配置文件进行怎样的更新。
每个配置文件的更新操作都有4个选项:

Use ‘d’ to delete the temporary ;不更新相对应的系统配置文件
Use ‘i’ to install the temporary ;用新的配置文件覆盖原来的系统配置文件
Use ‘m’ to merge the temporary and installed versions ;根据新的配置文件,对系统的配置文件进行合并处理
Use ‘v’ to view the diff results again ;察看新的配置文件和系统原有的配置文件的不同

更新操作时,要根据管理者自己的想法进行相对应的操作,如果是新安装的系统进行更新的话,或者不需要保留原有的配置的话,一般选择第二项操作。



月光论坛
http://bbs.dj...com/


===================================
赞助本站 -- 刊登广告 -- 物超所值虚拟主机租用
献花 x0 回到顶端 [楼 主] From:台湾中华电信HINET | Posted:2008-06-04 08:41 |
aa 手机 会员卡 葫芦墩家族
个人文章 个人相簿 个人日记 个人地图 个人商品
特殊贡献奖 社区建设奖
头衔:            
站长
级别: 站长 该用户目前不上站
推文 x1964 鲜花 x5260
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

我用的步骤差不多..

一般我安装好 FreeBSD ,都会先安装 cvsup,再来就是更新整个系统了

动作前请先安装一些好用的工具

1. SSHSecureShellClient-3.2.9.exe 安装在 windows
2. TotalCommander

我建的 cvsupfile-6_3

复制程式
# $Id: standard-supfile,v 1.4.2.3 1996/12/27 04:09:59 jdp Exp $
#
# This file contains all of the "CVSup collections" that make up the
# FreeBSD-current source tree.
#
# CVSup (CVS Update Protocol) allows you to download the latest CVS
# tree (or any branch of development therefrom) to your system easily
# and efficiently (far more so than with sup, which CVSup is aimed
# at replacing).  If you're running CVSup interactively, and are
# currently using an X display server, you should run CVSup as follows
# to keep your CVS tree up-to-date:
#
#       cvsup standard-supfile
#
# If not running X, or invoking cvsup from a non-interactive script, then
# run it as follows:
#
#       cvsup -g -L 2 standard-supfile
#
# You may wish to change some of the settings in this file to better
# suit your system:
#
# host=cvsup.FreeBSD.org
#              This specifies the server host which will supply the
#              file updates.  Please change this to one of the mirror
#              sites if possible.  (See the "README" file.)  You can
#              override this setting on the command line with cvsup's
#              "-h host" option.
#
# base=/usr
#              This specifies the root where CVSup will store information
#              about the collections you have transferred to your system.
#              A setting of "/usr" will generate this information in
#              /usr/sup.  Even if you are CVSupping a large number of
#              collections, you will be hard pressed to generate more than
#              ~1MB of data in this directory.  You can override the
#              "base" setting on the command line with cvsup's "-b base"
#              option.  This directory must exist in order to run CVSup.
#
# prefix=/usr
#              This specifies where to place the requested files.  A
#              setting of "/usr" will place all of the files requested
#              in "/usr/src" (e.g., "/usr/src/bin", "/usr/src/lib").
#              The prefix directory must exist in order to run CVSup.

# Defaults that apply to all the collections
*default host=cvsup.tw.freebsd.org.
*default base=/usr
*default prefix=/usr
*default release=cvs tag=RELENG_6_3
*default delete use-rel-suffix

# If your network link is a T1 or faster, comment out the following line.
*default compress

## Main Source Tree.
#
# The easiest way to get the main source tree is to use the "src-all"
# mega-collection.  It includes all of the individual "src-*" collections,
#

src-all

我建的 cvsupfile-ports

复制程式
# $Id: standard-supfile,v 1.4.2.3 1996/12/27 04:09:59 jdp Exp $
#
# This file contains all of the "CVSup collections" that make up the
# FreeBSD-current source tree.
#
# CVSup (CVS Update Protocol) allows you to download the latest CVS
# tree (or any branch of development therefrom) to your system easily
# and efficiently (far more so than with sup, which CVSup is aimed
# at replacing).  If you're running CVSup interactively, and are
# currently using an X display server, you should run CVSup as follows
# to keep your CVS tree up-to-date:
#
#       cvsup standard-supfile
#
# If not running X, or invoking cvsup from a non-interactive script, then
# run it as follows:
#
#       cvsup -g -L 2 standard-supfile
#
# You may wish to change some of the settings in this file to better
# suit your system:
#
# host=cvsup.FreeBSD.org
#              This specifies the server host which will supply the
#              file updates.  Please change this to one of the mirror
#              sites if possible.  (See the "README" file.)  You can
#              override this setting on the command line with cvsup's
#              "-h host" option.
#
# base=/usr
#              This specifies the root where CVSup will store information
#              about the collections you have transferred to your system.
#              A setting of "/usr" will generate this information in
#              /usr/sup.  Even if you are CVSupping a large number of
#              collections, you will be hard pressed to generate more than
#              ~1MB of data in this directory.  You can override the
#              "base" setting on the command line with cvsup's "-b base"
#              option.  This directory must exist in order to run CVSup.
#
# prefix=/usr
#              This specifies where to place the requested files.  A
#              setting of "/usr" will place all of the files requested
#              in "/usr/src" (e.g., "/usr/src/bin", "/usr/src/lib").
#              The prefix directory must exist in order to run CVSup.

# Defaults that apply to all the collections
*default host=cvsup.tw.freebsd.org.
*default base=/usr
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix

# If your network link is a T1 or faster, comment out the following line.
*default compress

## Main Source Tree.
#
# The easiest way to get the main source tree is to use the "src-all"
# mega-collection.  It includes all of the individual "src-*" collections,
#

ports-all

复制程式
# cvsup cvsupfile-6_3
# cvsup cvsupfile-ports

参考 http://www.freebsd.org/doc/en_US.ISO88...ok/makeworld.html

复制程式
# cd /usr/src
# make buildworld
# make buildkernel
# make installkernel
# reboot

开机好

复制程式
# mergemaster -p
# make installworld
# mergemaster
# reboot

不过如果要改 kernel 的设定,其中一些步骤会有些不同


献花 x0 回到顶端 [1 楼] From:台湾新世纪资通股份有限公司 | Posted:2008-06-12 10:07 |
mnbmnb5266
个人文章 个人相簿 个人日记 个人地图
小有名气
级别: 小有名气 该用户目前不上站
推文 x5 鲜花 x46
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

两位大大真是让我受益良多啊,什么时候我也能明白这么多的电脑知识啊,继续学习吧


我的收藏
https://pan.baidu.com/s/1QUJ9lr_VzxXKRJAlBJgUQA
提取码:am2c
献花 x0 回到顶端 [2 楼] From:加拿大Rogers | Posted:2010-08-19 21:19 |

首页  发表文章 发表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.058069 second(s),query:16 Gzip disabled
本站由 瀛睿律师事务所 担任常年法律顾问 | 免责声明 | 本网站已依台湾网站内容分级规定处理 | 连络我们 | 访客留言