Fetching contributors…
Cannot retrieve contributors at this time
119 lines (91 sloc) 4.06 KB
Installation procedure - NetBSD
KAME project
$Id: INSTALL,v 1.24 2005/01/05 07:38:47 itojun Exp $
You'll need to follow the steps below. They can be separated into two major
sections - kernel build and userland build.
Be sure to perform "tree preparation" procedure, described in
../INSTALL, prior to taking the steps below.
A. Backup
The following procedure replaces, or overwrites, the following
some of boot-loader related files, such as those in /usr/mdec
so you may want to back them up before going through the steps.
A-1. Backup your kernel file, if you need to.
# cp /netbsd /netbsd.previous
A-2. Backup /usr/include directory, if you want an untouched tree to be
preserved somewhere.
# cd /usr
# mkdir include.clean
# cd include.clean
# (cd ../include; tar Bpcf - . ) | tar Bpxf -
B. Kernel build
Consult NetBSD documentations for more detail.
B-0. It is assumed that you are in platform-specific directory (kame/netbsd).
If you are not, chdir to there.
B-1. Go down to sys/arch/ARCH/conf.
% cd sys/arch/ARCH/conf
B-2. Make a kernel configuration file, and invoke "config CONFIGFILE".
GENERIC.KAME should have commonly used IPv6 definitions, so you may want
to copy the file to begin with.
% /usr/sbin/config CONFIGFILE
B-3. Build the kernel. The process will make kernel file named "netbsd".
% cd ../compile/CONFIGFILE
% make depend
% make
B-4. Copy the kernel file to root directory, as root.
# cp netbsd /
C. Userland build
C-0. It is assumed that you are in platform-specific directory (kame/netbsd).
If you are not, chdir to there.
C-1. Invoke "make includes" as root. This will populate KAME-ready include
files into /usr/include. NOTE: the root account needs to have a write
permission under the build directory. i.e. if you do NFS mount, mount
with root write permit.
# make includes
C-2. As normal user (or root, if you prefer) perform "make".
WARNING: do not perform "make obj", it is not supported.
% make
C-3. As root, perform "make install". This will install necessary userland
tools into /usr/local/v6/{bin,sbin,whatever}. This should not replace
existing IPv4-only userland tools, so it is safe.
# make install
D. Reboot
D-1. Reboot with the command you like.
# fastboot
E. Configurations, in short
E-1. Most of configuration files are shipped with normal OS distribution,
and are in located in /etc. If you need special configuration file for
KAME-origin daemons, configuration files need to be placed in
/usr/local/v6/etc. You may want to copy /usr/local/v6/etc/foo.sample into
/usr/local/v6/etc/foo, and edit as necessary.
E-2. If you wish to use ALTQ, you may need to invoke /dev/MAKEDEV.altq.
# cd /dev
# sh MAKEDEV.altq all
E-3. Commands modified by KAME project are placed in /usr/local/v6/{bin,sbin}.
For daily use, you will need to add both of (or either of) them
into your command search path (consult manpage for your favorite
shell). Make sure to make them used before /usr/bin or /usr/sbin,
otherwise you end up using OS-supplied (hence not IPv6 nor IPsec capable)
E-4. The directory ./etc/rc.d/ may contain startup scripts to support
KAME-specific startup procedures. Check differences between
/etc/rc.d/foo and ./etc/rc.d/foo, and replace the former with the
latter if you want the changes. Since files under ./etc/rc.d may
depend on /usr/local/v6, you may also have to add the following
lines to /etc/rc.conf:
(the first line should contain enough paths to mount /usr/local/v6/*).
E-5. There are batch of documents installed into /usr/local/v6/man
and /usr/local/v6/share/doc. Please read them as necessary.
If you wish to develop your own programs, we suggest you to read through
supplied documents, RFCs, and other documents to learn how.