- 追加された行はこの色です。
- 削除された行はこの色です。
*FreeBSD 6.2R [#b5318103]
install cd_imageは、ここ
http://www.freebsd.org/ja/where.html~
install CD image をDLして焼いておく~
''CPUがamd64の場合はFreeBSD ISO-IMAGES/amd64 が幸せになれるかも''~
'''あとから[[i386からamd64への変更>i386をamd64へ]]はかなり大変そう'''~
FreeBSD 6.2R のインストールの時にインターネット接続出来るようにする。~
/etc/ssh/sshd_config を編集する~
/etc/hosts.allow を編集する~
resolve.conf を確認する。~
/root/Upgrade~
%%/root/CVSUPをコピーする%%~
[[ports collection の更新]]は、ベースシステムに標準で組み込まれているコマンド、[[portsnapの実行>ports collection の更新#d3466a3d]]で出来るようになっている。
CVSUP-Without-GUIをインストールする~
/usr/ports/net/cvsup-without-gui~
ports だとエラーになる時は、/usr/sbin/sysinstall から、CD2でパッケージを導入する~
続いて、cd /usr/ports/sysutils/fastest_cvsup~
fastest_cvsup もRoundTripオプション付きでインストール
cd /root/CVSUP/6_2
./cvsup-releng_6_2.sh
#!/bin/sh
#####
# /root/bin/cvsup-releng_6_2.sh for FreeBSD 6.1 (2006/07/23) support@take-labo.jp
# Update: http://sakura.take-labo.jp/freebsd/etc/cvsup/cvsup-releng_6_2.sh
# Detail: http://sakura.lan.take-labo.jp/freebsd/i386-releng_6_2.html
#####
logfile=`date "+%Y%m%d"`.log
bin_cvsup=/usr/local/bin/cvsup
bin_fastest_cvsup=/usr/local/bin/fastest_cvsup
#supfile=/etc/cvsup/releng_6_2-supfile
supfile=/root/CVSUP/6_2/releng_6_2-supfile
dir_log1=/var/log/cvsup
dir_log2=/releng_6_2
if [ ! -f $bin_cvsup ]; then
echo "===>Errer! cvsup is Not Found!!!"
echo "===>please install /usr/ports/net/cvsup-without-gui"
exit 1
elif [ ! -f $bin_fastest_cvsup ]; then
echo "===>Errer! fastest_cvsup is Not Found!!!"
echo "===>please install /usr/ports/sysutils/fastest_cvsup"
exit 1
elif [ ! -f $supfile ]; then
echo "===>Errer! supfile is Not Found!!!"
echo "===>please configure $supfile"
exit 1
elif [ ! -d $dir_log1 ]; then
/bin/mkdir $dir_log1 || echo "please mkdir $dir_log1"; exit 1
echo "mkdir $dir_log1"
elif [ ! -d $dir_log1$dir_log2 ]; then
/bin/mkdir $dir_log1$dir_log2 || echo "please mkdir $dir_log1 $dir_log2"; exit 1
echo "mkdir $dir_log1$dir_log2"
fi
echo "CVSup for RELENG_6_2:"
echo "========================================================================"
if SERVER=`$bin_fastest_cvsup -q -c jp`; then
$bin_cvsup -g -L 2 -h $SERVER $supfile | \
/usr/bin/tee -a $dir_log1$dir_log2/$logfile
else
$bin_cvsup -g -L 2 $supfile | \
/usr/bin/tee -a $dir_log1$dir_log2/$logfile
fi
echo "========================================================================"
echo "UPDATING"
echo "------------------------------------------------------------------------"
/usr/bin/head -n 25 /usr/src/UPDATING | /usr/bin/tail -n 15
# ./cvsup-releng_6_2.sh
CVSup for RELENG_6_2:
========================================================================
-=(oooooo)=(cvsup6.jp.freebsd.org)=-
Parsing supfile "/root/CVSUP/6_2/releng_6_2-supfile"
Connecting to cvsup3.jp.freebsd.org
Connected to cvsup3.jp.freebsd.org
Server software version: SNAP_16_1h
Negotiating file attribute support
Exchanging collection information
Establishing multiplexed-mode data connection
Running
Updating collection src-all/cvs
Edit src/UPDATING
Add delta 1.416.2.29.2.4 2007.02.09.20.24.14 cperciva
Add delta 1.416.2.29.2.5 2007.02.28.18.24.36 simon
Add delta 1.416.2.29.2.6 2007.03.15.08.06.10 cperciva
Add delta 1.416.2.29.2.7 2007.04.26.23.42.22 cperciva
Add delta 1.416.2.29.2.8 2007.05.23.16.13.20 cperciva
Add delta 1.416.2.29.2.9 2007.07.12.15.01.13 cperciva
Add delta 1.416.2.29.2.10 2007.08.01.20.44.57 simon
Edit src/contrib/bind9/bin/named/client.c
Add delta 1.1.1.2.2.1.4.2 2007.08.01.20.44.57 simon
Edit src/contrib/bind9/lib/dns/dispatch.c
Add delta 1.1.1.1.10.2 2007.08.01.20.44.57 simon
Edit src/contrib/bind9/lib/dns/include/dns/dispatch.h
Add delta 1.1.1.1.10.1 2007.08.01.20.44.58 simon
Edit src/contrib/bind9/lib/dns/include/dns/validator.h
Add delta 1.1.1.1.4.1.4.2 2007.02.09.20.24.14 cperciva
//**portsの更新 [#b69e4f61]
//cvsup -g -L 2 /root/CVSUP/ports-supfile-jp
//
///root/CVSUP/ports-supfile-jp
// #
// # cvsup ports-supfile
// #
// # cvsup -g -L 2 /root/CVSUP/ports-supfile-jp
// *default host=cvsup.jp.FreeBSD.org
// *default base=/usr
// *default prefix=/usr
// *default release=cvs tag=.
// *default delete use-rel-suffix
// *default compress
// # collections,
// ports-all
//
**Cronで自動更新 [#z70bcd93]
# /etc/crontab - root's crontab for FreeBSD
# $FreeBSD: src/etc/crontab,v 1.32 2002/11/22 16:13:39 tom Exp $
# ----------- 追加 ----------- #
#http://www.fkimura.com/cvsup0.html
#00 3 * * * root /usr/local/bin/cvsup -g -L 2 /root/CVSUP/ports-supfile-jp
#http://www.fkimura.com/cvsup0.html
#30 3 * * * root /root/CVSUP/cvsup-releng_6_1.sh
30 3 * * * root /root/CVSUP/6_2/cvsup-releng_6_2.sh
35 1 * * * root /root/bin/pflogsumm.sh
# ----------- 追加 ----------- #
**システムの再構築 [#r823e640]
http://sakura.take-labo.jp/freebsd/i386-releng_6_1_6.1-RELEASE.html
上記の修正を行うにはシステムの再構築が必要です。最後に再起動が必要となるので運用に支障が無いよう計画的に行ってください。
初めに前回のアップグレード時に作成されたファイル群を削除します。make buildworld を一度もしていないマシンでは不要です。
# chflags -R noschg /usr/obj/usr
# rm -rf /usr/obj/usr
続いて buildworld を行います。ビルド時間を短縮するにはシングルユーザーモードに降りた方がいいかもしれませんが、
2GHz の CPU で 2時間程度、他の作業が行えなくなるのでここではそのまま実行し、四並列ビルドを行っています。
# cd /usr/src
# make -j4 buildworld # ベースシステムをビルド
# make buildkernel # 続いてカーネルをビルド 200703161800
# make installkernel # カーネルをインストール
# shutdown -r now # 再起動
4core なマシンでは以下のような状況
# time make -j16 buildworld
2349.728u 689.270s 15:19.44 330.5% 4503+3304k 21031+5890io 2475pf+0w
# time make -j16 buildkernel KERNCONF=TFC
461.938u 90.801s 4:04.82 225.7% 4453+3300k 4057+3941io 2pf+0w
(cf: 2core だと、558.195u 52.849s 10:11.58 99.9% 3770+2193k 4947+3599io)1pf+0w)
# time make installkernel KERNCONF=TFC
2.292u 0.941s 0:04.92 65.6% 344+621k 46+1674io 181pf+0w
(cf: 4.247u 1.102s 0:06.60 80.9% 320+512k 22+1972io 230pf+0w)
つづき
カーネルの動作テストのため通常モードで起動させ、問題なければ再度、再起動してシングルユーザ モードを選択して起動します。
今回は mergemaster を用いた /etc の更新が必要となるので合わせて行います。
> shutdown now
# cd /usr/src
# time make installworld # ベースシステムのインストール
11.810u 16.211s 1:54.00 24.5% 275+632k 8345+3870io 17232pf+0w
(cf: 15.491u 12.210s 1:59.15 23.2% 274+520k 8043+3325io 15354pf+0w)
# mv /etc.old /etc.old1 #etc.old の待避
# cp -Rp /etc /etc.old # /etc のバックアップ
# mergemaster -siv # /etc の更新
*** 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
Use 't' to select a new temporary root directory
Use 'e' to exit mergemaster
Default is to use /var/tmp/temproot as is
How should I deal with this? [Use the existing /var/tmp/temproot] d
*** Deleting the old /var/tmp/temproot
Do you wish to delete what is left of /var/tmp/temproot? [no] [Enter]
*** /var/tmp/temproot will remain
# sync
# reboot
**/etc/mail/aliases [#l3991b16]
root: my@mailaddress
#newaliases
**/etc/hosts.allow [#e9e7b9e3]
設定