May
27
参考官方文档http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1
1 Testing disk performance:If you are an advanced user, you might want to tweak the IDE hard disk performance using hdparm. With the -tT options you can test the performance of your disk (execute it several times to get a more precise impression):
2 Tweaking hard disk performance:To tweak, you can use any of the following examples (or experiment yourself) which use /dev/hda as disk (substitute with your disk):
3 Creating /etc/resolv.conf:Now fill in your nameserver(s) using the following as a template.
4 Applying a Filesystem to a Partition
我的如下:
5 Mounting partitions
# mkdir /mnt/gentoo
# mount /dev/hda12 /mnt/gentoo/
# mkdir /mnt/gentoo/proc
# mount -t proc none /mnt/gentoo/proc
6 Setting the Date/Time Right:If the date/time displayed is wrong, update it using the date MMDDhhmmCCYY syntax (Month, Day, hour, minute, Century and Year). For instance, to set the date to April 25th, 16:21 in the year 2004:
7 Using a Stage: pick the releases/ directory, followed by your architecture (for instance x86/) and the Gentoo version (2004.1/) to finish up with the stages/ directory.
8 Configuring the Compile Options
CFLAGS and CXXFLAGS选择规律如下:
With MAKEOPTS you define how many parallel compilations should occur when you install a package. The suggested number is the number of CPUs in your system plus one.
9 Copy over DNS information
10 Chrooting into the new environment
11 Updating Portage
12 Configuring the USE variable
13 Setting the timezone information
# ls /usr/share/zoneinfo
14 Installing the Sources
Code maturity level options --->
[*] Prompt for development and/or incomplete code/drivers
15 Creating /etc/fstab
/dev/hda13 none swap sw 0 0
/dev/hda12 / ext3 noatime 0 1
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0
16 Setting the hostname
17 Setting the domainname
18 Adding domainname to the default runlevel
19 Configuring your Network
20 Writing Down Network Information
127.0.0.1 localhost
192.168.0.5 jenny.homenetwork jenny
192.168.0.6 benny.homenetwork benny
192.168.0.7 tux.homenetwork tux
21 Installing a system logger
# emerge syslog-ng
# rc-update add syslog-ng default
22 Installing a cron daemon
# emerge vixie-cron
# rc-update add vixie-cron default
23 File System Tools
File System Tool Install Command
XFS xfsprogs emerge xfsprogs
ReiserFS reiserfsprogs emerge reiserfsprogs
JFS jfsutils emerge jfsutils
24 Adding a user for day-to-day use
# useradd bowlder -m -G users,wheel,audio -s /bin/bash
# passwd bowlder
最后编辑: choicky 编辑于June 22, 2006 22:18
1 Testing disk performance:If you are an advanced user, you might want to tweak the IDE hard disk performance using hdparm. With the -tT options you can test the performance of your disk (execute it several times to get a more precise impression):
# hdparm -tT /dev/hda
2 Tweaking hard disk performance:To tweak, you can use any of the following examples (or experiment yourself) which use /dev/hda as disk (substitute with your disk):
hdparm -d 1 -A 1 -m 16 -u 1 -a 64 /dev/hda
3 Creating /etc/resolv.conf:Now fill in your nameserver(s) using the following as a template.
4 Applying a Filesystem to a Partition
Filesystem Creation Command
ext2 mke2fs
ext3 mke2fs -j
reiserfs mkreiserfs
xfs mkfs.xfs
jfs mkfs.jfs
ext2 mke2fs
ext3 mke2fs -j
reiserfs mkreiserfs
xfs mkfs.xfs
jfs mkfs.jfs
我的如下:
# mkreiserfs /dev/hda12
# mkswap /dev/hda13
# swapon /dev/hda2
# mkswap /dev/hda13
# swapon /dev/hda2
5 Mounting partitions
# mkdir /mnt/gentoo
# mount /dev/hda12 /mnt/gentoo/
# mkdir /mnt/gentoo/proc
# mount -t proc none /mnt/gentoo/proc
6 Setting the Date/Time Right:If the date/time displayed is wrong, update it using the date MMDDhhmmCCYY syntax (Month, Day, hour, minute, Century and Year). For instance, to set the date to April 25th, 16:21 in the year 2004:
# date 042516212004
7 Using a Stage: pick the releases/ directory, followed by your architecture (for instance x86/) and the Gentoo version (2004.1/) to finish up with the stages/ directory.
# cd /mnt/gentoo
# tar -xvjpf stage?-*.tar.bz2
# tar -xvjpf stage?-*.tar.bz2
8 Configuring the Compile Options
# nano -w /mnt/gentoo/etc/make.conf
CHOST一般选i686-pc-linux-gnu
CFLAGS and CXXFLAGS选择规律如下:
CFLAGS="-march=athlon-xp -pipe -O2"
CXXFLAGS="${CFLAGS}"
CXXFLAGS="${CFLAGS}"
With MAKEOPTS you define how many parallel compilations should occur when you install a package. The suggested number is the number of CPUs in your system plus one.
MAKEOPTS="-j2"
9 Copy over DNS information
# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
10 Chrooting into the new environment
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# env-update
# source /etc/profile
11 Updating Portage
# emerge sync
12 Configuring the USE variable
# nano -w /etc/make.conf
USE="-gtk -gnome qt kde dvd alsa cdr"
13 Setting the timezone information
# ls /usr/share/zoneinfo
(Suppose you want to use GMT)
# ln -sf /usr/share/zoneinfo/GMT /etc/localtime
# ln -sf /usr/share/zoneinfo/GMT /etc/localtime
14 Installing the Sources
# emerge development-sources
# cd /usr/src/linux
# make menuconfig
# make menuconfig
引用
Code maturity level options --->
[*] Prompt for development and/or incomplete code/drivers
引用
File systems --->
[*] Virtual memory file system support (former shm fs)
[*] /proc file system support
[*] /dev file system support (EXPERIMENTAL)
[*] Automatically mount at boot
(Deselect the following unless you have a 2.6 kernel)
[ ] /dev/pts file system for Unix98 PTYs
(Select one or more of the following options as needed by your system)
<*> Reiserfs support
<*> Ext3 journalling file system support
<*> JFS filesystem support
<*> Second extended fs support
<*> XFS filesystem support
[*] Virtual memory file system support (former shm fs)
[*] /proc file system support
[*] /dev file system support (EXPERIMENTAL)
[*] Automatically mount at boot
(Deselect the following unless you have a 2.6 kernel)
[ ] /dev/pts file system for Unix98 PTYs
(Select one or more of the following options as needed by your system)
<*> Reiserfs support
<*> Ext3 journalling file system support
<*> JFS filesystem support
<*> Second extended fs support
<*> XFS filesystem support
(For 2.4 kernel)
# make dep && make bzImage modules modules_install
(For 2.6 kernel)
# make && make modules_install
# make dep && make bzImage modules modules_install
(For 2.6 kernel)
# make && make modules_install
15 Creating /etc/fstab
/dev/hda13 none swap sw 0 0
/dev/hda12 / ext3 noatime 0 1
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0
16 Setting the hostname
# echo tux > /etc/hostname
17 Setting the domainname
# echo homenetwork > /etc/dnsdomainname
18 Adding domainname to the default runlevel
# rc-update add domainname default
19 Configuring your Network
# nano -w /etc/conf.d/net
iface_eth0="<your ip address> broadcast <your broadcast address> netmask <your netmask>"
# rc-update add net.eth0 default
20 Writing Down Network Information
# nano -w /etc/hosts
引用
127.0.0.1 localhost
192.168.0.5 jenny.homenetwork jenny
192.168.0.6 benny.homenetwork benny
192.168.0.7 tux.homenetwork tux
21 Installing a system logger
# emerge syslog-ng
# rc-update add syslog-ng default
22 Installing a cron daemon
# emerge vixie-cron
# rc-update add vixie-cron default
23 File System Tools
File System Tool Install Command
XFS xfsprogs emerge xfsprogs
ReiserFS reiserfsprogs emerge reiserfsprogs
JFS jfsutils emerge jfsutils
24 Adding a user for day-to-day use
# useradd bowlder -m -G users,wheel,audio -s /bin/bash
# passwd bowlder
最后编辑: choicky 编辑于June 22, 2006 22:18
大学毕业前最应该做的20件事[转]
论程序员与妓女[转]


