Gentoo Linux 安装(五)配置系统
来源:互联网 发布:淘宝申请售后要钱不 编辑:程序博客网 时间:2024/04/29 07:41
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
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.
0 0
- Gentoo Linux 安装(五)配置系统
- Gentoo Linux 安装(七)配置系统引导程序Bootloader
- Gentoo Linux内核配置(五)
- Gentoo安装详解(三)--配置系统
- Gentoo Linux 安装(三)安装基本系统
- Gentoo Linux 安装(六)安装系统工具
- Gentoo Linux 安装(四)配置Linux内核
- Gentoo Linux 安装(一) 配置网络、准备磁盘
- 安装gentoo的点点滴滴(五)
- Gentoo安装详解(五)--声卡设置
- Gentoo Linux下Bugzilla安装配置说明
- Gentoo Linux 下MediaWiki安装配置说明
- Gentoo Linux 安装(二) 安装stage3
- Gentoo系统安装笔记
- 再谈gentoo系统安装
- Gentoo 安装日记 03 (配置网络)
- java3d 配置(linux gentoo )
- gentoo linux 无线网络配置
- 一分钟了解负载均衡的一切
- 德国军方入侵阿富汗移动运营商的真相是?
- 125. Valid Palindrome (暴力)
- JavaScript显示隐藏DIV的IF语句示例
- POI解析百万行excel的实现
- Gentoo Linux 安装(五)配置系统
- display: inline-block; *zoom: 1; *display: inline;
- Gentoo Linux 安装(六)安装系统工具
- React-Modal初体验
- Android小项目——计算器
- Gentoo Linux 安装(四)配置Linux内核
- Appium升级,支持测试IOS10
- 洛谷1582 倒水
- 巴蜀 1008 Antiprim数