安裝系統成功之後,可以在新裝好的 FreeBSD
重開機之前,或者是事後再透過 sysinstall
(FreeBSD 5.2 之前版本則是 /stand/sysinstall
) 然後選擇
選項以進行後續設定。
如果您之前有設定用 PPP 連線透過 FTP 安裝,那麼這個畫面將不會出現; 正如上面剛所說的,您可以稍後再做更改。
有關 LAN 或把 FreeBSD 設定為 gateway 或 router 請參閱使用手冊中有關 網路進階運用 的章節。
如果要設定網路卡,請選擇 Enter。 否則請選 以繼續。
然後按用方向鍵選擇您要設定的網路卡,然後按 Enter。
在私人區域網路的情況,由於目前的 Internet 協定 (IPv4)還算夠用, 所以請選 Enter。
不設定 IPv6,然後按若是透過 RA server 連到既有的 IPv6 環境,那麼就選 Enter,之後系統會花幾秒鐘去搜尋 RA server。
並按接下來,若不需要 DHCP (Dynamic Host Configuration Protocol)請選 Enter。
並按選擇 dhclient,若成功要到 IP, 則其會自動填上相關的環境設定,細節請參閱 節 27.5, “Automatic Network Configuration (DHCP)”。
的話,則會執行下面的網路設定圖顯示如何在區域網路(LAN)中, 將該機器設定為 gateway 的方式:
可用 Tab 鍵在各欄位間作切換, 並填上適合的資料:
完整的機器名稱,例如本例中的
k6-2.example.com
。
機器所屬的網域名稱,例如本例中的
example.com
。
這裡請輸入 Gateway 的 IP 位址,其可負責將封包轉遞到遠端網路。 只有在該 gateway 屬於該網路其中節點之一時,才要輸入。 若這機器本身要做為該區域網路的 gateway 的話, 請保持本欄為空白。 此外, 通常 IPv4 Gateway 也會被認為是 default gateway 或 default route。
該網路所用的 DNS server 之 IP。 本例假設該機器所在的網路沒有
DNS,故填上的是該 ISP 所提供的 DNS server
(208.163.10.2
)。
The IP address to be used for this interface was
192.168.0.1
The address block being used for this local area
network is a Class C block
(192.168.0.0
-
192.168.0.255
).
The default netmask is for a Class C network
(255.255.255.0
).
Any interface-specific options to ifconfig
you would like to add. There were none in this case.
Use Tab to select when finished and press Enter.
Choosing Enter will bring the machine up on the network and be ready for use. However, this does not accomplish much during installation, since the machine still needs to be rebooted.
and pressingIf the machine will be acting as the gateway for a local area network and forwarding packets between other machines then select Enter. If the machine is a node on a network then select and press Enter to continue.
and pressIf telnetd will not be enabled. This means that remote users will not be able to telnet into this machine. Local users will still be able to access remote machines with telnet.
is selected, various services suchThese services can be enabled after installation by editing
/etc/inetd.conf
with your favorite text editor.
See 節 27.2.1, “Overview” for more information.
Select
if you wish to configure these services during install. An additional confirmation will display:Select
to continue.Selecting #
at the beginning
of a line.
After adding the desired services, pressing Esc will display a menu which will allow exiting and saving the changes.
選擇 sshd(8),也就是 OpenSSH 的 daemon 程式。 這會允許該機器可從遠端安全登入。 關於 OpenSSH 請參閱 節 14.11, “OpenSSH” 部分的說明。
就會啟用Selecting the default Enter will still allow users who have accounts with passwords to use FTP to access the machine.
and pressingAnyone can access your machine if you elect to allow anonymous FTP connections. The security implications should be considered before enabling this option. For more information about security see 章 14, 系統安全.
To allow anonymous FTP, use the arrow keys to select Enter. The following screen (or similar) will display:
and pressPressing F1 will display the help:
The ftp root directory will be put in /var
by default. If you do not have enough room there for the
anticipated FTP needs, the /usr
directory
could be used by setting the FTP Root Directory to
/usr/ftp
.
When you are satisfied with the values, press Enter to continue.
If you select Enter, an editor will automatically start allowing you to edit the message.
and pressThis is a text editor called ee
. Use the
instructions to change the message or change the message later
using a text editor of your choice. Note the file name/location
at the bottom of the editor screen.
Press Esc and a pop-up menu will default to . Press Enter to exit and continue. Press Enter again to save changes if you made any.
Network File System (NFS) allows sharing of files across a network. A machine can be configured as a server, a client, or both. Refer to 節 27.3, “Network File System (NFS)” for a more information.
If there is no need for a Network File System server, select Enter.
and pressIf exports
file must be
created.
Press Enter to continue. A text editor will
start allowing the exports
file to be created
and edited.
Use the instructions to add the actual exported filesystems now or later using a text editor of your choice. Note the file name/location at the bottom of the editor screen.
Press Esc and a pop-up menu will default to . Press Enter to exit and continue.
There are several options available to customize the system console.
To view and configure the options, select Enter.
and pressA commonly used option is the screen saver. Use the arrow keys to select Enter.
and then pressSelect the desired screen saver using the arrow keys and then press Enter. The System Console Configuration menu will redisplay.
The default time interval is 300 seconds. To change the time interval, select Enter. A pop-up menu will appear:
again. At the Screen Saver Options menu, select using the arrow keys and pressThe value can be changed, then select Enter to return to the System Console Configuration menu.
and pressSelecting Enter will continue with the post-installation configurations.
and pressingSetting the time zone for your machine will allow it to automatically correct for any regional time changes and perform other time zone related functions properly.
The example shown is for a machine located in the Eastern time zone of the United States. Your selections will vary according to your geographical location.
Select Enter to set the time zone.
and pressSelect Enter.
or according to how the machine's clock is configured and pressThe appropriate region is selected using the arrow keys and then pressing Enter.
Select the appropriate country using the arrow keys and press Enter.
The appropriate time zone is selected using the arrow keys and pressing Enter.
Confirm the abbreviation for the time zone is correct. If it looks okay, press Enter to continue with the post-installation configuration.
Selecting Enter will allow running Linux software on FreeBSD. The install will add the appropriate packages for Linux compatibility.
and pressingIf installing by FTP, the machine will need to be connected to the Internet. Sometimes a remote ftp site will not have all the distributions like the Linux binary compatibility. This can be installed later if necessary.
This option will allow you to cut and paste text in the console and user programs with a 3-button mouse. If using a 2-button mouse, refer to manual page, moused(8), after installation for details on emulating the 3-button style. This example depicts a non-USB mouse configuration (such as a PS/2 or COM port mouse):
Select Enter.
for a PS/2, serial, or bus mouse, or for a USB mouse and pressUse the arrow keys to select Enter.
and pressThe mouse used in this example is a PS/2 type, so the default Enter to exit this menu.
was appropriate. To change protocol, use the arrow keys to select another option. Ensure that is highlighted and pressUse the arrow keys to select Enter.
and pressThis system had a PS/2 mouse, so the default Enter.
was appropriate. To change the port, use the arrow keys and then pressLast, use the arrow keys to select Enter to enable and test the mouse daemon.
, and pressMove the mouse around the screen and verify the cursor shown responds properly. If it does, select Enter. If not, the mouse has not been configured correctly — select and try using different configuration options.
and pressSelect Enter to return to continue with the post-installation configuration.
with the arrow keys and pressPackages are pre-compiled binaries and are a convenient way to install software.
Installation of one package is shown for purposes of
illustration. Additional packages can also be added at this
time if desired. After installation
sysinstall
can be used to add additional
packages.
Selecting Enter will be followed by the Package Selection screens:
and pressingOnly packages on the current installation media are available for installation at any given time.
All packages available will be displayed if Enter.
is selected or you can select a particular category. Highlight your selection with the arrow keys and pressA menu will display showing all the packages available for the selection made:
The bash shell is shown selected. Select as many as desired by highlighting the package and pressing the Space key. A short description of each package will appear in the lower left corner of the screen.
Pressing the Tab key will toggle between the last selected package, , and .
When you have finished marking the packages for installation, press Tab once to toggle to the and press Enter to return to the Package Selection menu.
The left and right arrow keys will also toggle between Enter to return to the Package Selection menu.
and . This method can also be used to select and pressUse the Tab and arrow keys to select and press Enter. You will then need to confirm that you want to install the packages:
Selecting Enter will start the package installation. Installing messages will appear until completed. Make note if there are any error messages.
and pressingThe final configuration continues after packages are installed. If you end up not selecting any packages, and wish to return to the final configuration, select
anyways.You should add at least one user during the installation so
that you can use the system without being logged in as
root
. The root partition is generally small
and running applications as root
can quickly
fill it. A bigger danger is noted below:
Select Enter to continue with adding a user.
and pressSelect Enter.
with the arrow keys and pressThe following descriptions will appear in the lower part of the screen as the items are selected with Tab to assist with entering the required information:
The login name of the new user (mandatory).
The numerical ID for this user (leave blank for automatic choice).
The login group name for this user (leave blank for automatic choice).
The password for this user (enter this field with care!).
The user's full name (comment).
The groups this user belongs to (i.e. gets access rights for).
The user's home directory (leave blank for default).
The user's login shell (leave blank for
default, e.g. /bin/sh
).
The login shell was changed from /bin/sh
to
/usr/local/bin/bash
to use the
bash shell that was previously installed as
a package. Do not try to use a shell that does not exist or you will
not be able to login. The most common shell used in the
BSD-world is the C shell, which can be indicated as
/bin/tcsh
.
The user was also added to the wheel
group
to be able to become a superuser with root
privileges.
When you are satisfied, press
and the User and Group Management menu will redisplay:Groups can also be added at this time if specific needs
are known. Otherwise, this may be accessed through using
sysinstall
(/stand/sysinstall
in FreeBSD versions older than 5.2) after installation is
completed.
When you are finished adding users, select Enter to continue the installation.
with the arrow keys and pressPress Enter to set the root
password.
The password will need to be typed in twice correctly. Needless to say, make sure you have a way of finding the password if you forget. Notice that the password you type in is not echoed, nor are asterisks displayed.
The installation will continue after the password is successfully entered.
If you need to configure additional network devices or
any other configuration, you can do it at this point or
after installation with sysinstall
(/stand/sysinstall
in FreeBSD versions older
than 5.2).
Select Enter to return to the Main Installation Menu.
with the arrow keys and pressSelect Enter. You will be asked to confirm exiting the installation:
with the arrow keys and pressSelect
and remove the floppy if booting from the floppy. The CDROM drive is locked until the machine starts to reboot. The CDROM drive is then unlocked and the disk can be removed from drive (quickly).The system will reboot so watch for any error messages that may appear, see 節 2.10.16, “FreeBSD 開機流程” details.
Configuring network services can be a daunting task for new users if they lack previous knowledge in this area. Networking, including the Internet, is critical to all modern operating systems including FreeBSD; as a result, it is very useful to have some understanding FreeBSD's extensive networking capabilities. Doing this during the installation will ensure users have some understanding of the various services available to them.
Network services are programs that accept input from
anywhere on the network. Every effort is made to make sure
these programs will not do anything “harmful”.
Unfortunately, programmers are not perfect and through time
there have been cases where bugs in network services have been
exploited by attackers to do bad things. It is important that
you only enable the network services you know that you need. If
in doubt it is best if you do not enable a network service until
you find out that you do need it. You can always enable it
later by re-running sysinstall or by
using the features provided by the
/etc/rc.conf
file.
Selecting the
option will display a menu similar to the one below:The first option, 節 2.10.1, “設定網路”, thus this option can safely be ignored.
, was previously covered during theSelecting the
option adds support for the BSD automatic mount utility. This is usually used in conjunction with the NFS protocol (see below) for automatically mounting remote file systems. No special configuration is required here.Next in line is the
option. When selected, a menu will pop up for you to enter specific AMD flags. The menu already contains a set of default options:The -a
option sets the default mount
location which is specified here as
/.amd_mnt
. The -l
option specifies the default log
file;
however, when syslogd
is used all log
activity will be sent to the system log daemon. The
/host
directory is used
to mount an exported file system from a remote
host, while /net
directory is used to mount an exported file system from an
IP address. The
/etc/amd.map
file defines the default
options for AMD exports.
The
option permits anonymous FTP connections. Select this option to make this machine an anonymous FTP server. Be aware of the security risks involved with this option. Another menu will be displayed to explain the security risks and configuration in depth.The
configuration menu will set the machine up to be a gateway as explained previously. This can be used to unset the option if you accidentally selected it during the installation process.The inetd(8) daemon as discussed above.
option can be used to configure or completely disable theThe
option is used to configure the system's default MTA or Mail Transfer Agent. Selecting this option will bring up the following menu:Here you are offered a choice as to which MTA to install and set as the default. An MTA is nothing more than a mail server which delivers email to users on the system or the Internet.
Selecting sendmail server which is the FreeBSD default. The option will set sendmail to be the default MTA, but disable its ability to receive incoming email from the Internet. The other options here, and act similar to . They both deliver email; however, some users prefer these alternatives to the sendmail MTA.
will install the popularAfter selecting an MTA, or choosing not to select an MTA, the network configuration menu will appear with the next option being
.The 節 27.3, “Network File System (NFS)” for more information about client and server configuration.
option will configure the system to communicate with a server via NFS. An NFS server makes file systems available to other machines on the network via the NFS protocol. If this is a stand-alone machine, this option can remain unselected. The system may require more configuration later; seeBelow that option is the
option, permitting you to set the system up as an NFS server. This adds the required information to start up the RPC remote procedure call services. RPC is used to coordinate connections between hosts and programs.Next in line is the
option, which deals with time synchronization. When selected, a menu like the one below shows up:From this menu, select the server which is the closest to your location. Selecting a close one will make the time synchronization more accurate as a server further from your location may have more connection latency.
The next option is the PCNFSD selection.
This option will install the
net/pcnfsd
package from
the Ports Collection. This is a useful utility which provides
NFS authentication services for systems which
are unable to provide their own, such as Microsoft's
MS-DOS® operating system.
Now you must scroll down a bit to see the other options:
The rpcbind(8), rpc.statd(8), and
rpc.lockd(8) utilities are all used for Remote Procedure
Calls (RPC).
The rpcbind
utility manages communication
between NFS servers and clients, and is
required for NFS servers to operate
correctly. The rpc.statd daemon interacts
with the rpc.statd daemon on other hosts to
provide status monitoring. The reported status is usually held
in the /var/db/statd.status
file. The
next option listed here is the
option, which, when selected, will provide file locking
services. This is usually used with
rpc.statd to monitor what hosts are
requesting locks and how frequently they request them.
While these last two options are marvelous for debugging, they
are not required for NFS servers and clients
to operate correctly.
As you progress down the list the next item here is
routed(8) utility manages network routing tables,
discovers multicast routers, and supplies a copy of the routing
tables to any physically connected host on the network upon
request. This is mainly used for machines which act as a
gateway for the local network. When selected, a menu will be
presented requesting the default location of the utility.
The default location is already defined for you and can be
selected with the Enter key. You will then
be presented with yet another menu, this time asking for the
flags you wish to pass on to routed. The
default is -q
and it should already appear
on the screen.
Next in line is the rwhod(8) daemon
during system initialization. The rwhod
utility broadcasts system messages across the network
periodically, or collects them when in “consumer”
mode. More information can be found in the ruptime(1) and
rwho(1) manual pages.
The next to the last option in the list is for the sshd(8) daemon. This is the secure shell server for OpenSSH and it is highly recommended over the standard telnet and FTP servers. The sshd server is used to create a secure connection from one host to another by using encrypted connections.
Finally there is the
option. This enables the TCP Extensions defined in RFC 1323 and RFC 1644. While on many hosts this can speed up connections, it can also cause some connections to be dropped. It is not recommended for servers, but may be beneficial for stand alone machines.Now that you have configured the network services, you can scroll up to the very top item which is sysinstall in selecting twice then .
and continue on to the next configuration item or simply exitIf everything went well, you will see messages scroll off the screen and you will arrive at a login prompt. You can view the content of the messages by pressing Scroll-Lock and using PgUp and PgDn. Pressing Scroll-Lock again will return to the prompt.
The entire message may not display (buffer limitation) but
it can be viewed from the command line after logging in by typing
dmesg
at the prompt.
Login using the username/password you set during installation
(rpratt
, in this example). Avoid logging in as
root
except when necessary.
Typical boot messages (version information omitted):
Generating the RSA and DSA keys may take some time on slower machines. This happens only on the initial boot-up of a new installation. Subsequent boots will be faster.
If the X server has been configured and a Default Desktop
chosen, it can be started by typing startx
at
the command line.
Once the install procedure has finished, you will be able to start FreeBSD by typing something like this to the SRM prompt:
BOOT DKC0
This instructs the firmware to boot the specified disk. To make FreeBSD boot automatically in the future, use these commands:
>>>
SET BOOT_OSFLAGS A
>>>
SET BOOT_FILE ''
>>>
SET BOOTDEF_DEV DKC0
>>>
SET AUTO_ACTION BOOT
The boot messages will be similar (but not identical) to those produced by FreeBSD booting on the i386™.
It is important to properly shutdown the operating
system. Do not just turn off power. First, become a superuser by
typing su
at the command line and entering the
root
password. This will work only if the user
is a member of the wheel
group.
Otherwise, login as root
and use
shutdown -h now
.
It is safe to turn off the power after the shutdown command has been issued and the message “Please press any key to reboot” appears. If any key is pressed instead of turning off the power switch, the system will reboot.
You could also use the Ctrl+Alt+Del key combination to reboot the system, however this is not recommended during normal operation.
本文及其他文件,可由此下載: ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/。
若有 FreeBSD 方面疑問,請先閱讀
FreeBSD 相關文件,如不能解決的話,再洽詢
<questions@FreeBSD.org>。
關於本文件的問題,請洽詢
<doc@FreeBSD.org>。