Gentoo Linux 安装(五)配置系统
2016-09-26 15:47
225 查看
Optional: Get PCMCIA working
PCMCIA users should now install the sys-apps/pcmciautils package.
root #emerge
--ask sys-apps/pcmciautils
System information
root #nano
-w /etc/fstab
In the remainder of the text, we use the default /dev/sd* block
device files as partition. Users can also opt to use the symbolic links in the /dev/disk/by-id/ or/dev/disk/by-uuid/ locations.
These names are not likely to change, whereas the default block device files naming depends on a number of factors (such as how and in what order the disks are attached to the system). However, unless someone intends to fiddle with the disk ordering, one can
continue with the default block device files safely.
Let us take a look at how to write down the options for the /boot/ partition.
This is just an example, and should be modified according to the partitioning decisions made earlier in the installation. In our amd64 partitioning example, /boot/ is
usually the /dev/sda2 partition, with ext2 as filesystem. It needs to be
checked during boot, so we would write down:
FILE /etc/fstabA
full /etc/fstab example
/dev/sda2 /boot ext2 defaults,noatime 0 2/dev/sda3 none swap sw 0 0/dev/sda4 / ext4 noatime 0
1 /dev/cdrom /mnt/cdrom auto noauto,user 0 0
Networking information
Host and domain information
One of the choices the user has to make is name his/her PC. This seems to be quite easy, but lots of users are
having difficulties finding the appropriate name for their Linux PC. To speed things up, know that the decision is not final - it can be changed afterwards. In the examples below, the hostname tux is
used within the domainhomenetwork.
root #nano
-w /etc/conf.d/hostname
# Set the hostname variable to the selected host namehostname="tux"
Second, if a domain name is needed, set it in /etc/conf.d/net.
This is only necessary if the ISP or network administrator says so, or if the network has a DNS server but not a DHCP server. Don't worry about DNS or domain names if the system uses DHCP for dynamic IP address allocation and network configuration.
Configuring the network
During the Gentoo Linux installation, networking was already configured. However, that was for the installation
CD itself and not for the installed environment. Right now, the network configuration is made for the installed Gentoo Linux system.
Note
More detailed information about networking, including advanced topics like bonding, bridging, 802.1Q VLANs or
wireless networking is covered in the Gentoo Network Configuration section.
All networking information is gathered in /etc/conf.d/net.
It uses a straightforward yet perhaps not intuitive syntax. But don't fear, everything is explained below. A fully commented example that covers many different configurations is available in /usr/share/doc/netifrc-*/net.example.bz2.
First install net-misc/netifrc:
root #emerge
--ask --noreplace net-misc/netifrc
Automatically start networking at boot
To have the network interfaces activated at boot, they need to be added to the default runlevel.
root #cd
/etc/init.d
root #ln
-s net.lo net.eth0
root #rc-update
add net.eth0 default
The hosts file
Next inform Linux about the network environment. This is defined in /etc/hosts and
helps in resolving host names to IP addresses for hosts that aren't resolved by the nameserver.
root #nano
-w /etc/hosts
System information
Root password
b08d
Set the root password using the passwd command.
root #passwd
The root Linux account is an all-powerful account, so pick a strong password. Later an additional regular user
account will be created for daily operations.
Init and boot configuration
Gentoo (at least when using OpenRC) uses /etc/rc.conf to
configure the services, startup, and shutdown of a system. Open up /etc/rc.conf and
enjoy all the comments in the file. Review the settings and change where needed.
root #nano
-w /etc/rc.conf
Next, open /etc/conf.d/keymaps to
handle keyboard configuration. Edit it to configure and select the right keyboard.
root #nano
-w /etc/conf.d/keymaps
Take special care with the keymap variable.
If the wrong keymap is selected, then weird results will come up when typing on the keyboard.
Finally, edit /etc/conf.d/hwclock to
set the clock options. Edit it according to personal preference.
root #nano
-w /etc/conf.d/hwclock
If the hardware clock is not using UTC, then it is necessary to set clock="local" in
the file. Otherwise the system might show clock skew behavior.
PCMCIA users should now install the sys-apps/pcmciautils package.
root #emerge
--ask sys-apps/pcmciautils
System information
root #nano
-w /etc/fstab
In the remainder of the text, we use the default /dev/sd* block
device files as partition. Users can also opt to use the symbolic links in the /dev/disk/by-id/ or/dev/disk/by-uuid/ locations.
These names are not likely to change, whereas the default block device files naming depends on a number of factors (such as how and in what order the disks are attached to the system). However, unless someone intends to fiddle with the disk ordering, one can
continue with the default block device files safely.
Let us take a look at how to write down the options for the /boot/ partition.
This is just an example, and should be modified according to the partitioning decisions made earlier in the installation. In our amd64 partitioning example, /boot/ is
usually the /dev/sda2 partition, with ext2 as filesystem. It needs to be
checked during boot, so we would write down:
FILE /etc/fstabA
full /etc/fstab example
/dev/sda2 /boot ext2 defaults,noatime 0 2/dev/sda3 none swap sw 0 0/dev/sda4 / ext4 noatime 0
1 /dev/cdrom /mnt/cdrom auto noauto,user 0 0
Networking information
Host and domain information
One of the choices the user has to make is name his/her PC. This seems to be quite easy, but lots of users are
having difficulties finding the appropriate name for their Linux PC. To speed things up, know that the decision is not final - it can be changed afterwards. In the examples below, the hostname tux is
used within the domainhomenetwork.
root #nano
-w /etc/conf.d/hostname
# Set the hostname variable to the selected host namehostname="tux"
Second, if a domain name is needed, set it in /etc/conf.d/net.
This is only necessary if the ISP or network administrator says so, or if the network has a DNS server but not a DHCP server. Don't worry about DNS or domain names if the system uses DHCP for dynamic IP address allocation and network configuration.
Configuring the network
During the Gentoo Linux installation, networking was already configured. However, that was for the installation
CD itself and not for the installed environment. Right now, the network configuration is made for the installed Gentoo Linux system.
Note
More detailed information about networking, including advanced topics like bonding, bridging, 802.1Q VLANs or
wireless networking is covered in the Gentoo Network Configuration section.
All networking information is gathered in /etc/conf.d/net.
It uses a straightforward yet perhaps not intuitive syntax. But don't fear, everything is explained below. A fully commented example that covers many different configurations is available in /usr/share/doc/netifrc-*/net.example.bz2.
First install net-misc/netifrc:
root #emerge
--ask --noreplace net-misc/netifrc
Automatically start networking at boot
To have the network interfaces activated at boot, they need to be added to the default runlevel.
root #cd
/etc/init.d
root #ln
-s net.lo net.eth0
root #rc-update
add net.eth0 default
The hosts file
Next inform Linux about the network environment. This is defined in /etc/hosts and
helps in resolving host names to IP addresses for hosts that aren't resolved by the nameserver.
root #nano
-w /etc/hosts
System information
Root password
b08d
Set the root password using the passwd command.
root #passwd
The root Linux account is an all-powerful account, so pick a strong password. Later an additional regular user
account will be created for daily operations.
Init and boot configuration
Gentoo (at least when using OpenRC) uses /etc/rc.conf to
configure the services, startup, and shutdown of a system. Open up /etc/rc.conf and
enjoy all the comments in the file. Review the settings and change where needed.
root #nano
-w /etc/rc.conf
Next, open /etc/conf.d/keymaps to
handle keyboard configuration. Edit it to configure and select the right keyboard.
root #nano
-w /etc/conf.d/keymaps
Take special care with the keymap variable.
If the wrong keymap is selected, then weird results will come up when typing on the keyboard.
Finally, edit /etc/conf.d/hwclock to
set the clock options. Edit it according to personal preference.
root #nano
-w /etc/conf.d/hwclock
If the hardware clock is not using UTC, then it is necessary to set clock="local" in
the file. Otherwise the system might show clock skew behavior.
相关文章推荐
- Gentoo Linux 安装(七)配置系统引导程序Bootloader
- SMS 2003安装配置系列之二:SMS 2003主站点配置指南(1)--配置站点属性及站点系统
- 安装sql2005中文版时提示系统配置检查器失败,消息为“性能监视器计数器检查失败”
- Debian系统下安装和配置cvs服务器
- 安装和配置Tripwire,加强你的Linux系统安全
- Linux系统中OpenSSH的安装和配置
- 自己的linux系统安装以及软件配置
- Snort入侵检测系统安装与配置
- Linux与Windows系统下Cronolog安装配置
- lomboz插件的安装配置及开发简单的应用系统
- [转]Linux系统中OpenSSH的安装和配置
- Linux+Informix后台数据库系统安装配置
- 配置网络更新系统源及安装安装语言包
- Linux NFS(Network File System 网络文件系统) 安装与配置
- Linux+Informix后台数据库系统安装配置
- 安装Sarge(二) 配置基本系统
- cognos系统安装配置手册_NT
- 邮件系统postfix安装与配置
- DotNet系统安装程序制作StepByStep(包括FrameWork安装和数据库安装配置)C#
- DotNet系统安装程序制作StepByStep(包括FrameWork安装和数据库安装配置)C#