05abd69c85
- add trailing slashes to URLs where appropriate - netbsd.org -> NetBSD.org
449 lines
11 KiB
Plaintext
449 lines
11 KiB
Plaintext
.\" $NetBSD: postinstall,v 1.54 2003/11/01 03:02:59 grant Exp $
|
|
.\"
|
|
.\" Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by the NetBSD
|
|
.\" Foundation, Inc. and its contributors.
|
|
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
.\" contributors may be used to endorse or promote products derived
|
|
.\" from this software without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
.\"
|
|
Once you've got the operating system running, there are a few
|
|
things you need to do in order to bring the system into a properly
|
|
configured state, with the most important ones described below.
|
|
.(enum
|
|
Configuring
|
|
.Pa /etc/rc.conf
|
|
.Pp
|
|
If you or the installation software haven't done any configuration of
|
|
.Pa /etc/rc.conf
|
|
.Ic ( sysinst
|
|
usually will),
|
|
the system will drop you into single user mode on first reboot with the
|
|
message
|
|
.Pp
|
|
.Dl /etc/rc.conf is not configured. Multiuser boot aborted.
|
|
.Pp
|
|
and with the root file system
|
|
.Pq Pa /
|
|
mounted read-only.
|
|
When the system asks you to choose a shell, simply press
|
|
.Key RETURN
|
|
to get to a
|
|
.Pa /bin/sh
|
|
prompt.
|
|
If you are asked for a terminal type, respond with
|
|
.
|
|
.ds termtype vt220
|
|
.
|
|
.ie \n[hp300] \{\
|
|
.ds termtype hp300h
|
|
.Ic \*[termtype]
|
|
for a local console, or whatever is appropriate for your serial console.
|
|
.\}
|
|
.el \{\
|
|
.ie \n[macppc] \{\
|
|
.ds termtype vt100
|
|
.Ic \*[termtype]
|
|
(or whatever is appropriate for your terminal type)
|
|
.\}
|
|
.el \{\
|
|
.ie \n[pmax] \{\
|
|
.ds termtype termtype
|
|
the correct terminal type as discussed in the
|
|
.Sx Once you've booted the diskimage
|
|
section.
|
|
.\}
|
|
.el \{\
|
|
.ie \n[sparc] \{\
|
|
.ds termtype sun
|
|
.Ic \*[termtype]
|
|
for a local console, or whatever is appropriate for your serial
|
|
console (some systems display garbage with a
|
|
.Ic \*[termtype]
|
|
terminal type, you may need to use
|
|
.Ic sun-ss5 )
|
|
.ds termtype sun
|
|
.\}
|
|
.el \{\
|
|
.Ic \*[termtype]
|
|
(or whatever is appropriate for your terminal type)
|
|
.\}
|
|
.\}
|
|
.\}
|
|
.\}
|
|
and press
|
|
.Key RETURN .
|
|
You may need to type one of the following commands to get your delete key
|
|
to work properly, depending on your keyboard:
|
|
.Dl # Ic "stty erase '^h'"
|
|
.Dl # Ic "stty erase '^?'"
|
|
At this point, you need to configure at least
|
|
one file in the
|
|
.Pa /etc
|
|
directory.
|
|
You will need to mount your root file system read/write with:
|
|
.Dl # Ic "/sbin/mount -u -w /"
|
|
Change to the
|
|
.Pa /etc
|
|
directory and take a look at the
|
|
.Pa /etc/rc.conf
|
|
file.
|
|
Modify it to your tastes, making sure that you set
|
|
.Li rc_configured=YES
|
|
so that your changes will be enabled and a multi-user boot can
|
|
proceed.
|
|
Default values for the various programs can be found in
|
|
.Pa /etc/defaults/rc.conf ,
|
|
where some in-line documentation may be found.
|
|
More complete documentation can be found in
|
|
.Xr rc.conf 5 .
|
|
.Pp
|
|
If your
|
|
.Pa /usr
|
|
directory is on a separate partition and you do not know how to use
|
|
.Ic ed ,
|
|
you will have to mount your
|
|
.Pa /usr
|
|
partition to gain access to
|
|
.Ic ex
|
|
or
|
|
.Ic vi .
|
|
Do the following:
|
|
.Pp
|
|
.Dl # Ic "mount /usr"
|
|
.Dl # Ic "export TERM=\*[termtype]"
|
|
.Pp
|
|
If you have
|
|
.Pa /var
|
|
on a separate partition, you need to repeat that step for it.
|
|
After that, you can edit
|
|
.Pa /etc/rc.conf
|
|
with
|
|
.Xr vi 1 .
|
|
When you have finished, type
|
|
.Ic exit
|
|
at the prompt to
|
|
leave the single-user shell and continue with the multi-user boot.
|
|
.Pp
|
|
Other values that need to be set in
|
|
.Pa /etc/rc.conf
|
|
for a networked environment are
|
|
.Ar hostname
|
|
and possibly
|
|
.Ar defaultroute ,
|
|
furthermore add an
|
|
.Ar ifconfig_int
|
|
for your
|
|
.Aq int
|
|
network interface,
|
|
.ie \n[mac68k] \{\
|
|
where your on-board, NuBus or PDS interface may be
|
|
.Li ae0 ,
|
|
.Li mc0
|
|
or
|
|
.Li sn0 .
|
|
For example:
|
|
.\}
|
|
.el \{\
|
|
.ie \n[macppc] \{\
|
|
where your on-board interfaces may be one of
|
|
.Li mc0 ,
|
|
.Li bm0 ,
|
|
.Li tlp0
|
|
or
|
|
.Li gem0 .
|
|
For example:
|
|
.\}
|
|
.el along the lines of
|
|
.\}
|
|
.Pp
|
|
.
|
|
.ds IFname de0
|
|
.if \n[hp300]:\n[mvme68k]:\n[pmax]:\n[sparc] .ds IFname le0
|
|
.if \n[hp700] .ds IFname ie0
|
|
.if \n[next68k] .ds IFname xe0
|
|
.if \n[mac68k] .ds IFname sn0
|
|
.if \n[macppc] .ds IFname mc0
|
|
.if \n[sgimips] .ds IFname sq0
|
|
.
|
|
.Dl ifconfig_\*[IFname]="inet 123.45.67.89 netmask 255.255.255.0"
|
|
.Pp
|
|
or, if you have
|
|
.Ar myname.my.dom
|
|
in
|
|
.Pa /etc/hosts :
|
|
.Pp
|
|
.Dl ifconfig_\*[IFname]="inet myname.my.dom netmask 255.255.255.0"
|
|
.Pp
|
|
To enable proper hostname resolution, you will also want to add an
|
|
.Pa /etc/resolv.conf
|
|
file or (if you are feeling a little more adventurous) run
|
|
.Xr named 8 .
|
|
See
|
|
.Xr resolv.conf 5
|
|
or
|
|
.Xr named 8
|
|
for more information.
|
|
.Pp
|
|
Other files in
|
|
.Pa /etc
|
|
that may require modification or setting up include
|
|
.ie \n[sgimips] \{\
|
|
.Pa /etc/mailer.conf
|
|
and
|
|
.Pa /etc/nsswitch.conf .
|
|
.\}
|
|
.el \{\
|
|
.Pa /etc/mailer.conf ,
|
|
.Pa /etc/nsswitch.conf ,
|
|
and
|
|
.Pa /etc/wscons.conf .
|
|
.\}
|
|
.ie \n[shark] \{\
|
|
.Pp
|
|
For Digital DNARD machines you will need to edit
|
|
.Pa /etc/ttys
|
|
and change the console terminal type from vt100 to pc3.
|
|
.\}
|
|
.if \n[atari] \{\
|
|
.It
|
|
Select the proper terminal devices
|
|
.Pp
|
|
You will have to edit the
|
|
.Pa /etc/ttys
|
|
file.
|
|
If you don't have a Milan, you must disable the
|
|
.Pa ttyEx
|
|
devices.
|
|
For the Milan, you will have to disable the
|
|
.Pa ttyex
|
|
devices.
|
|
This is easy, just change 'on' to 'off' on the corresponding lines.
|
|
.\}
|
|
.if \n[cats] \{\
|
|
.Pp
|
|
For the
|
|
.Xr savecore 8
|
|
facility to work with the a.out and elf kernel images supplied with
|
|
\*M installations you will need to set
|
|
.Li savecore_flags="-z -N /netbsd"
|
|
.\}
|
|
.It
|
|
Logging in
|
|
.Pp
|
|
After reboot, you can log in as
|
|
.Li root
|
|
at the login prompt.
|
|
Unless you've set a password in
|
|
.Ic sysinst ,
|
|
there
|
|
is no initial password.
|
|
If you're using the machine in a networked environment,
|
|
you should create an account for yourself (see below) and protect it and the
|
|
.Dq root
|
|
account with good passwords.
|
|
By default, root login from the network is disabled (even via
|
|
.Xr ssh 1 ) .
|
|
One way to become root over the network is to log in as a different
|
|
user that belongs to group
|
|
.Dq wheel
|
|
(see
|
|
.Xr group 5 )
|
|
and use
|
|
.Xr su 1
|
|
to become root.
|
|
.Pp
|
|
Unless you have connected an unusual terminal device as the console
|
|
you can just press
|
|
.Key RETURN
|
|
when it prompts for
|
|
.Li Terminal type? [...] .
|
|
.It
|
|
Adding accounts
|
|
.Pp
|
|
Use the
|
|
.Xr useradd 8
|
|
command to add accounts to your system;
|
|
.Em do not
|
|
edit
|
|
.Pa /etc/passwd
|
|
directly.
|
|
See
|
|
.Xr useradd 8
|
|
for more information on how to add a new user to the system.
|
|
.if !\n[hp700]:\n[next68k] \{\
|
|
.It
|
|
The X Window System
|
|
.Pp
|
|
If you have installed the X Window System, look at the files in
|
|
.Pa /usr/X11R6/lib/X11/doc
|
|
for information.
|
|
.if \n[hp300] \{\
|
|
Also, you may want to read through the
|
|
.Nx*M
|
|
FAQ entry on X11.
|
|
.br
|
|
.Lk http://www.NetBSD.org/Ports/faq.html#x11
|
|
.\}
|
|
.if \n[macppc] \{\
|
|
Also, you may want to read through the
|
|
.Nx*M
|
|
X11R6 FAQ.
|
|
.br
|
|
.Lk http://www.NetBSD.org/Ports/macppc/x11.html
|
|
.\}
|
|
.\} \" ! !\n[next68k]
|
|
.if \n[i386]:\n[shark] \{\
|
|
.Pp
|
|
You will need to set up a configuration file, see
|
|
.Pa /usr/X11R6/lib/X11/XF86Config.eg
|
|
for an example.
|
|
The
|
|
.Xr xf86config 1
|
|
utility can interactively create a first version of such a configuration
|
|
file for you.
|
|
.if \n[mac68k] \{\
|
|
.(tag [Color_X]
|
|
.It [Color_X]
|
|
Some systems are capable of supporting a color X Server in either thousands
|
|
or millions of colors.
|
|
The \*M port does not support resolution switching at this time.
|
|
If your system is capable of running the color X Server it can be
|
|
installed at this point and the Booter options can be
|
|
modified to match the resolution depth.
|
|
.tag)
|
|
.\}
|
|
See
|
|
.Lk http://www.xfree86.org/
|
|
and the XFree86 manual page for more information.
|
|
.\}
|
|
.Pp
|
|
Don't forget to add
|
|
.Pa /usr/X11R6/bin
|
|
to your path in your shell's dot file so that you have access to the X binaries.
|
|
.It
|
|
Installing third party packages
|
|
.Pp
|
|
If you wish to install any of the software freely available for
|
|
.Ul
|
|
systems
|
|
you are strongly advised to first check the
|
|
.Nx
|
|
package system.
|
|
This automatically handles any changes necessary to make the software run on
|
|
.Nx ,
|
|
retrieval and installation of any other packages on which the software
|
|
may depend, and simplifies installation (and deinstallation), both
|
|
from source and precompiled binaries.
|
|
.Pp
|
|
.(bullet
|
|
More information on the package system is at
|
|
.Lk http://www.NetBSD.org/Documentation/software/packages.html
|
|
.It
|
|
A list of available packages suitable for browsing is at
|
|
.Lk ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/README.html
|
|
.It
|
|
Precompiled binaries can be found at
|
|
.Lk ftp://ftp.NetBSD.org/pub/NetBSD/packages/ ,
|
|
usually in the
|
|
.Pa \*V/\*M/All
|
|
subdir.
|
|
You can install them with the following commands under
|
|
.Xr sh 1 :
|
|
.Pp
|
|
.Bd -unfilled
|
|
.Ic # PKG_PATH=ftp://ftp.NetBSD.org/pub/NetBSD/packages/\*V/\*M/All
|
|
.Ic # export PKG_PATH
|
|
.Ic # pkg_add -v tcsh
|
|
.Ic # pkg_add -v apache
|
|
.Ic # pkg_add -v perl
|
|
\&...
|
|
.Ed
|
|
.Pp
|
|
If you are using
|
|
.Xr csh 1
|
|
then replace the first two lines with the following:
|
|
.Pp
|
|
.Bd -unfilled
|
|
.Ic # setenv PKG_PATH ftp://ftp.NetBSD.org/pub/NetBSD/packages/\*V/\*M/All
|
|
\&...
|
|
.Ed
|
|
.Pp
|
|
The above commands will install the tcsh shell,
|
|
the Apache web server and
|
|
the perl programming language as well as all the packages they
|
|
depend on.
|
|
.It
|
|
Package sources for compiling packages on your own can be obtained by
|
|
retrieving the file
|
|
.Lk ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-current/tar_files/pkgsrc.tar.gz
|
|
They are typically extracted into
|
|
.Pa /usr/pkgsrc
|
|
(though other locations work fine), with the commands:
|
|
.Pp
|
|
.Dl # Ic "mkdir /usr/pkgsrc"
|
|
.Dl # Ic "( cd /usr/pkgsrc ; tar -zxpf - ) \*< pkgsrc.tar.gz"
|
|
.Pp
|
|
After extracting, then see the
|
|
.Pa README
|
|
file in the extraction directory (e.g.
|
|
.Pa /usr/pkgsrc/README )
|
|
for more information.
|
|
.bullet)
|
|
.It
|
|
Misc
|
|
.(bullet
|
|
Edit
|
|
.Pa /etc/mail/aliases
|
|
to forward root mail to the right place.
|
|
Don't forget to run
|
|
.Xr newaliases 1
|
|
afterwards.
|
|
.It
|
|
The
|
|
.Pa /etc/mail/sendmail.cf
|
|
file will almost definitely need to be adjusted;
|
|
files aiding in this can be found in
|
|
.Pa /usr/share/sendmail .
|
|
See the
|
|
.Li Tn README
|
|
file there for more information.
|
|
.It
|
|
Edit
|
|
.Pa /etc/rc.local
|
|
to run any local daemons you use.
|
|
.It
|
|
Many of the
|
|
.Pa /etc
|
|
files are documented in section 5 of the manual; so just invoking
|
|
.Pp
|
|
.Dl # Ic man 5 Ar filename
|
|
.Pp
|
|
is likely to give you more information on these files.
|
|
.bullet)
|
|
.enum)
|