The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации / Документация по FreeBSD / Руководства по FreeBSD на английском

Chapter 2. FreeBSD System Configuration

Table of Contents
2.1. Verifying the FreeBSD Host Name
2.2. Verifying the Ethernet Interface Configuration
2.3. Enabling Packet Forwarding
2.4. Creating the List of other LAN Hosts(/etc/hosts)
2.5. Testing the FreeBSD system

There are three basic pieces of information that must be known to the FreeBSD box before you can proceed with integrating the sample Local Area Network:



If you performed the installation of FreeBSD over a network connection some of this information may already be configured into your FreeBSD system.

Even if you believe that the FreeBSD system was properly configured when it was installed you should at least verify each of these bits of information to prevent trouble in subsequent steps.

2.1. Verifying the FreeBSD Host Name

It's possible that the FreeBSD host name was specified and saved when the system was initially installed. To verify that it was, enter the following command at a prompt:

    # hostname


The name of the host FreeBSD system will be displayed on a single line. If the name looks correct (this is very subjective :-) skip ahead to Section 2.2.

For example, in our sample network, we would see 'curly.my.domain' as a result of the `hostname` command if the name had been set correctly during, or after, installation. (At this point, don't worry too much about the ".my.domain" part, we'll sort this out later. The important part is the name up to the first dot.)

If a host name wasn't specified when FreeBSD was installed you'll probably see 'myname.my.domain` as a response. You'll need to edit /etc/rc.conf to set the name of the machine.

2.1.1. Configuring the FreeBSD Host Name

Reminder: You must be logged in as 'root' to edit the system configuration files!

CAUTION: If you mangle the system configuration files, chances are your system WILL NOT BOOT correctly! Be careful!

The configuration file that specifies the FreeBSD system's host name when the system boots is in /etc/rc.conf. Use the default text editor ('ee') to edit this file.

Logged in as user 'root' load /etc/rc.conf into the editor with the following command:

    # ee /etc/rc.conf


Using the arrow keys, scroll down until you find the line that specifies the host name of the FreeBSD system. By default, this section says:

    ---
    ### Basic network options: ###
    hostname="myname.my.domain" # Set this!
    ---
Change this section to say (in our example):
    ---
    ### Basic network options: ###
    hostname="curly.my.domain"  # Set this!
    ---


Once the change to the host name has been made, press the 'Esc' key to access the command menu. Select "leave editor" and make sure to specify "save changes" when prompted.

For questions about FreeBSD, e-mail <[email protected]>.
For questions about this documentation, e-mail <[email protected]>.




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру