Mail Server の移行

FreeBSDのソースコードをインストールする

cd /
fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.3-RELEASE/src.txz
tar xvfzp src.tgz
chflags -R noschg /usr/obj/usr && rm -rf /usr/obj/usr
cd /usr/src && make -j8 buildworld && make -j8 buildkernel && make installkernel
shutdown -r now

make installworld で、auditdistd user missingエラー

pw useradd -n auditdistd -g audit -c "Auditdistd unprivileged user" -d /var/empty -s /usr/sbin/nologin
cd /usr/src &&  make installworld && rm -r /etc.old1 && mv /etc.old /etc.old1 && cp -Rp /etc /etc.old
mergemaster -siv
chflags -R noschg /usr/obj/usr && rm -rf /usr/obj/usr && cd /usr/src && make -j8 buildworld && make -j8 buildkernel && make installkernel

shutdown -r now

cd /usr/src &&  make installworld && rm -r /etc.old1 && mv /etc.old /etc.old1 && cp -Rp /etc /etc.old && mergemaster -UPiF

portinstall net/cvsup-without-gui

portinstall sysutils/fastest_cvsup

blackhole# ./root/CVSUP/9_0/cvsup-releng_9_0.sh

blackhole# pwd
/root/CVSUP/9_0
blackhole# ./cvsup-releng_9_0.sh

/root/CVSUP/9_0/cvsup-releng_9_0.sh

#!/bin/sh
#####
# /root/bin/cvsup-releng_9_0.sh for FreeBSD 6.1 (2008/02/06)
# Update: http://sakura.take-labo.jp/freebsd/etc/cvsup/cvsup-releng_9_0.sh
# Detail: http://sakura.lan.take-labo.jp/freebsd/i386-releng_9_0.html
#####

logfile=`date "+%Y%m%d"`.log
bin_cvsup=/usr/local/bin/cvsup
bin_fastest_cvsup=/usr/local/bin/fastest_cvsup
supfile=/root/CVSUP/9_0/releng_9_0-supfile
dir_log1=/var/log/cvsup
dir_log2=/releng_9_0

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_9_0:"
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

releng_9_0-supfile

# Defaults that apply to all the collections
#
# IMPORTANT: Change the next line to use one of the CVSup mirror sites
# listed at http://www.freebsd.org/handbook/mirrors.html.

#*default host=cvsup.jp.FreeBSD.org # 利用する CVSup サーバーを fastest_cvsup の結果から選択
#*default host=cvsup2.jp.FreeBSD.org
#*default host=cvsup3.jp.FreeBSD.org
*default host=cvsup4.jp.FreeBSD.org
#*default host=cvsup5.jp.FreeBSD.org
#*default host=cvsup6.jp.FreeBSD.org
*default base=/var/db   # 作業ディレクトリ
*default prefix=/usr    # /usr/src に展開
# The following line is for 4-stable.  If you want 3-stable or 2.2-stable,
# change "RELENG_4" to "RELENG_3" or "RELENG_2_2" respectively.
# Update to 6.0-RELEASE
#*default release=cvs tag=RELENG_9_0_0_RELEASE
# Update to RELENG_9_0
*default release=cvs tag=RELENG_9_0
*default delete use-rel-suffix

# If you seem to be limited by CPU rather than network or disk bandwidth, try
# commenting out the following line.  (Normally, today's CPUs are fast enough
# that you want to run compression.)
#*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.
# Please note:  If you want to track -STABLE, leave this uncommented.
src-all  # ソース全てを同期
Shutting down connection to server
Finished successfully
========================================================================
UPDATING
------------------------------------------------------------------------

20120106:
        9.0-RELEASE.

20111101:
       The broken amd(4) driver has been replaced with esp(4) in the amd64,
       i386 and pc98 GENERIC kernel configuration files.

20110913:
       This commit modifies vfs_register() so that it uses a hash
       calculation to set vfc_typenum, which is enabled by default.
       The first time a system is booted after this change, the
       vfc_typenum values will change for all file systems. The
       main effect of this is a change to the NFS server file handles
       for file systems that use vfc_typenum in their fsid, such as ZFS.
blackhole#
##################################  Black  Hole  ########################################

chflags -R noschg /usr/obj/usr && rm -rf /usr/obj/usr && cd /usr/src && make -j8 buildworld && make -j8 buildkernel && make installkernel

shutdown -r now

cd /usr/src &&  make installworld && rm -r /etc.old1 && mv /etc.old /etc.old1 && cp -Rp /etc /etc.old && mergemaster -siv



http://uyota.asablo.jp/blog/2011/09/18/6106292
$ make buildworld
$ make buildkernel
$ make installkernel
$ reboot

$ mergemaster -p
$ make installworld
$ mergemaster -UPiF

blackhole# cd /usr/src && make -j4 buildworld && make -j4 buildkernel && make installkernel

===> zlib (install)
install -o root -g wheel -m 555   zlib.ko /boot/kernel
install -o root -g wheel -m 555   zlib.ko.symbols /boot/kernel
kldxref /boot/kernel
blackhole#

cd /usr/src && make installworld && rm -r /etc.old1 && mv /etc.old /etc.old1 && cp -Rp /etc /etc.old

/etc/crontab

30	2	*	*	*	root	/root/CVSUP/9_0/cvsup-releng_9_0.sh

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2017-01-02 (月) 15:26:09