GENTOO Installation Notes (Turn)

Source: Internet
Author: User
Tags bz2 get ip gtk locale set time system log ftp client rsync
IBM T42 GENTOO Installation Notes

A Preface
Linux has been playing for many years, but has always been in the use of common services, and there is no more in-depth understanding of Linux. Recently played two weeks of Gentoo, the feeling is good, write down their Gentoo installation process, to express support for the Gentoo version. I hope I can give some references to beginners like me.
Winddesertwater 2005-9-5
Two machine configuration
IBM T42 CPU: Centrino II 1.7 display card: Ati9600 sound card: AC ' 97 hard drive: 40GB Mouse: IBM USB
The existing system is Windows Server 2003 + Debian 3.1 (up to 4GB space)
Three Download Gentoo Original file
Http://bouncer.gentoo.org/?product=...-minimum&os=x86
Burn to an ISO disc. Then from the CD start, choose the default Gentoo mode start, and then there will be a keyboard selection of the prompts (press ALT+F1) direct return. Run directly to the root# state.
Four Setting up a network
1. Setting up a network
# Net-setup Eth0
There are two ways to set the IP address, one is to specify the hand branch, the other is DHCP distribution. If you specify it manually, specify the IP address and subnet mask as prompted. Then use: Route add default GW 10.21.0.254 (gateway address);
If you use DHCP, use DHCPCD eth0 to obtain the IP address.
Test whether the NIC works: ifconfig eth0 command to see if there is an IP address. Ping 202.96.134.133 to test whether the route is normal. If you are working correctly, proceed to the next step.
2. Set DNS
# nano-w/etc/resolv.conf
NameServer 202.96.128.68 (DNS server IP address)
Five Use Cfdisk to split your disk
The Cfdisk tool is more intuitive than Fdisk, and it's convenient to add a delete partition.
1. Use Cfdisk to split your disk
/dev/hda3 Boot Split Area
/DEV/HDA8 Swap Partition Area
/DEV/HDA9 primary partition (Root)
2. Format partitions
ReiserFS partition with mkreiserfs command, ext2 format with mke2fs command, ext3 format with mke2fs–j command
# Mke2fs–j/dev/hda3
# MKE2FS–J/DEV/HDA9
# MKSWAP/DEV/HDA8
# SWAPON/DEV/HDA8
3. My partition is as follows: (I originally also divided a/var partition 800MB, but the compile-time hint/var/tmp space is too small, had to/var and/partitions merged again)
/dev/hda3/boot ext3 noatime,noatime 1 2
/DEV/HDA9/EXT3 Noatime 0 1
/dev/hda8 None swap SW 0 0
/dev/cdroms/cdrom0/mnt/cdrom iso9660 Noauto,ro 0 0
#/dev/fd0/mnt/floppy Auto Noauto 0 0
NONE/PROC proc Defaults 0 0
None/dev/shm Tmpfs nodev,nosuid,noexec 0 0
None/proc/bus/usb usbfs default 0 0 (USB file support)
Six Mount Partition
# Mount/dev/hda9/mnt/gentoo
# Mkdir/mnt/gentoo/boot
# Mount/dev/hda3/mnt/gentoo/boot
Seven Check Date/Time
# date
Set Date/Time
# Date–s 2005-9-5
# Date–s 10:59:00
# hwclock–w (write time to BIOS)
Eight Replace to Gentoo mount point, install system files
# Cd/mnt/gentoo
# tar-xvjpf/mnt/cdrom/stages/stage3-i686-2005.1.tar.bz2
Install Prozilla multi-threaded Download tool, install Proz to the specified directory after installation
# CP Proz/mnt/gentoo/usr/bin
Nine Install Portage (This step can also not be performed, directly using the back of the Emerge–sync to obtain the Portage tree)
# tar-xvjf/mnt/cdrom/snapshot/portage-2005.tar.bz2-c/MNT/GENTOO/USR
Ten Set compilation parameters
1. View the available use variables:
# Less/usr/portage/profiles/use.desc
Edit make.conf File:
# nano-w/mnt/gentoo/etc/make.conf
can be defined according to their own requirements, my make.conf file is as follows:
Cflags= "-o3-march=i686-pipe"
Chost= "I686-pc-linux-gnu"
cxxflags= "${cflags}"
Ldflags= "-wl,-o1"
(Note: "-wl" is a lowercase English letter "L" instead of the number "1" (a), and "-o1" is capitalized in the English letter "O" and the number "1" (i))
Makeopts= "-j15" (simultaneous number of processes compiled)
Compiler= "GCC3"
gentoo_mirrors= "Ftp://gg3.net/pub/linux/gentoo/ftp://linux.ntcu.net/dists/gentoo http:// www.zentek-international.com/mirrors/gentoo/"
Sync= "Rsync://rsync.asia.gentoo.org/gentoo-portage"
Use= "-ipv6-qt-kde gtk gtk2 encode gnome CJK NLS NPTL nptlonly alsa CPUs python X xml2 XMM Zlib–mozilla TrueType Radeon Java ACPI DVD libg++ ncurses OpenGL Perl XV Stroke "
Accept_keywords= "~x86"
Alsa_cards= "Intel8x0" (set intel8x0 to your own sound card)
Video_cards= "Radeon" (set Radeon to your own video card)
Stroke can increase FVWM mouse command function
2. Let the system start running hdparm, through the hdparm can improve the hard disk access performance 2-5 times:
# nano-w/etc/conf.d/local.start
Add the following line to the file:
Hdparm–m 16–c 1–u 1–d 1–a 1–a
Xi. Install Gentoo Base System
Select Mirror Station
# mirrorselect-i-O >>/mnt/gentoo/etc/make.conf
or Mirrorselect–a–s4-o >>/mnt/gentoo/etc/make.conf
Using Mirrorselect to select an rsync server
# mirrorselect-i-r-o >>/mnt/gentoo/etc/make.conf
I tested most of the sites and found Gg3.net to be the fastest. Download up to 300KB.
12. Replication DNS Settings
# cp-l/etc/resolv.conf/mnt/gentoo/etc/resolv.conf
13. Mount/proc
# MOUNT-T proc None/mnt/gentoo/proc
14. into the new environment
# Chroot/mnt/gentoo/bin/bash
# env-update
# Source/etc/profile
xv Update Portage tree (if the nineth step is omitted, because your system does not have Portage trees for the time being, you may see some warning messages when you run the emerge command, ignoring it. After the emerge sync, the system has a complete Portage tree, These warning messages naturally disappear.
# Emerge–sync (time consuming 23 minutes)
(1. Use the latest GCC to construct the entire system using the latest GCC
2. # Unlink/etc/make.profile
# Ln-sf/usr/portage/profiles/default-linux/x86/2005.1/gcc34/etc/make.profile
3. Dealing with the problems gcc-config will bring
# emerge--oneshot--nodeps gcc-config) brackets for untested
16. Specify the locale you want to use
# nano-w/etc/locales.build
En_us/iso-8859-1
en_US. Utf-8/utf-8
17. Download the required raw code
# Cd/usr/portage
# scripts/bootstrap.sh–f (time consuming 1 hours)
18. Bootstrapping your system
# Cd/usr/portage
# scripts/bootstrap.sh (takes 1 hours and 20 minutes)
19. Compiling system
# Emerge–e System (Time consuming 3 hours 20 minutes)
20. Upgrade Baselayout
# config_protect= "-*" emerge baselayout
Run/lib/libc.so.6, if there are native POSIX Threads ... And so on, it shows that the NPTL has been supported.
21. Set the core
1. Set time zone information
# Ls/usr/share/zoneinfo
(assuming you want to use GMT)
# Ln-sf/usr/share/zoneinfo/prc/etc/localtime
2. Compile kernel (8 minutes)
In the http://www.kernel.org/pub/linux/ker...13 kernel and patch
My config file is shown in the attachment
# CD/USR/SRC
# TAR–JXVF LINUX-2.6.13.TAR.BZ2
# Ln–s linux-2.6.13 Linux
# CD Linux
# BUNZIP–DV. /patch-2.6.13.tar.bz2 | Patch–p1
# CP config. config
# Make Oldconfig
# Make–j15 (at the same time the compilation of the number is generally 15-20)
# Make Modules
# Make Modules_install
# make Install
3. Install Plug and Play management module
# emerge HotPlug
# rc-update Add hotplug Default
4. Coldplug originally is a part of the HotPlug, now independent, responsible for automatic loading of non-hot plug hardware (such as video card/sound card/NIC/usb port/serial port ...) of the kernel module
# emerge Coldplug
# rc-update Add coldplug Default
5. Installing a ALSA sound-driven tool
A. Installing the sound card tool
# emerge Alsa-utils
B. Edit the ALSA configuration to let the kernel load the driver for your network card
# alsaconf//Set sound card command
# nano-w/etc/modules.d/alsa
C. Update the configuration to the system just now
# Modules-update/Start/etc/init.d/alsasound service
D. Add the Alsasound service to the boot run level (Alsasound service shuts down to save system sound settings, read sound settings on boot)
# rc-update Add alsasound Boot
E. It's all done now, but all the channels are muted at first. We use Alsamixer to open them.
# Alsamixer
MM at the bottom, which means they are currently mute
Use the left and Right arrows (←&→) to select the channel.
Use the M key to toggle the mute switch on the channel.
To increase or decrease the volume, use the Up and down Arrows (↑&↓).
F. Test sound card
# cat/dev/urandom >/DEV/DSP
/DEV/DSP is a symbolic link to/dev/sound/dsp, which should be automatically generated. Try to redirect output to/DEV/SOUND/DSP If you don't have a/DEV/DSP file. You should listen to some noise. Press Ctrl + C to stop. If you don't hear anything, go back to the previous chapters and find the error and correct it.
6. Configure PCMCIA Card Daemon
# use= "-X" emerge Pcmcia-cs
# rc-update Add PCMCIA Default
22. Setting up your system
1. File System Setup
# nano-w/etc/fstab
Fstab file See 5.3 (previous section)
2. Set host name
# nano-w/etc/conf.d/hostname
3. Set the domain name
# nano-w/etc/conf.d/domainname
Add domainname to preset RunLevel
# rc-update Add domainname default
Note: If you log in to your system terminal at the login prompt there is such a thing "hostname." (none) or "Hostname.unknown_domain" indicates that there are problems with the above 2.3 two configurations, please modify the contents of the file again.
4. Set the network card
# nano-w/etc/conf.d/net
Manually set the eth0 IP information
Config_eth0= ("192.168.0.2 netmask 255.255.255.0")
routes_eth0= ("Default GW 192.168.0.1")
Automatically get eth0 IP
config_eth0= ("DHCP")
dhcp_eth0= "Nodns nontp Nonis"
Add Net.eth0 to preset RunLevel
# rc-update Add net.eth0 Default
5. If you have another network card, please use the following method
# CD/ETC/INIT.D
# ln-s Net.eth0 net.eth1
# rc-update Add net.eth1 Default
6. Designation of hosts
# nano-w/etc/hosts
23. System Information
1. System Configuration Information
# nano-w/etc/rc.conf
2. Set the root password
# passwd Root
# Useradd Test
# passwd Test
3. Specify keyboard type
# nano-w/etc/conf.d/keymaps
4. Specify clock type
# nano-w/etc/conf.d/clock
5. If you are using a notebook, install the Power management tool
# emerge Acpid
# rc-update Add acpid Default (Let the system run automatically when it is starting acpid)
#/etc/init.d/acpid Restart
24. Install System Log Manager
# emerge Syslog-ng
25. Install the ReiserFS file Management tool if it is used.
# emerge Reiserfsprogs
26. Installing a cron server
# emerge Vixie-cron
# rc-update Add Vixie-cron Default
27. Archive index
# emerge Slocate
28. Install DHCPCD
# emerge DHCPCD
29. Installing GRUB
# emerge Grub
1. Set grub.conf file
Default 0
Timeout 30
Splashimage= (hd0,2)/grub/splash.xpm.gz
Title=gentoo Linux 2.6.13
Root (hd0,2)
Kernel/vmlinuz root=/dev/hda9 video=vesafb:mtrr,ywrap,1024x768-16@60

Title=windows Server 2003
Rootnoverify (hd0,0)
Makeactive
Chainloader +1
2. Use Grub-install to set grub
# Grub-install--no-floppy/dev/hda
--no-floppy is indicating no floppy drive
3. Manually set GRUB
Installing GRUB to MBR
grub> Root (hd0,0) (Specify the location of your/boot partition)
grub> Setup (hd0) (install GRUB to MBR)
Grub> quit (leaving the GRUB shell)
4. Install Gensplash splash screen
# emerge Splashutils
# splash_geninitramfs-v-g/boot/fbsplash-1024x768-r 1024x768 Gentoo
# nano-w/boot/grub/grub.conf Modify the relevant content as follows:
kernel/2.6.13 Root=/dev/hda3 video=vesafb:ywrap,mtrr,1024x768-16@60 Splash=silent,theme:gentoo
INITRD (hd0,2)/fbsplash-1024x768
Eve Quit the installation system and restart
# exit
# exit
# Umount/mnt/gentoo/proc
# Umount/mnt/gentoo/boot
# Umount/mnt/gentoo
# Sync
# init 6
31. You can go back to your new system.
32. Then we start installing the X system.
1. Modifying the mouse configuration file
# NANO/ETC/CONF.D/GPM
Mouse=imps2
Mousedev=/dev/psaux
2. Install xorg-x11 (time consuming 46 minutes)
# emerge Xorg-x11
# env-update
# Source/etc/profile
# Xorgconfig (according to your own machine configuration)
# cp/root/xorg.conf.new/etc/x11/xorg.conf
# STARTX
So you can get into the simplest x system.
3. The Desktop culture
Configure SimSun Fonts:
# Cd/usr/share/fonts/truetype/simsun
# Cp/mnt/debian/usr/share/fonts/truetype/simsun/sumsun.ttf.
#/usr/bin/x11/mkfontscale (produce Fonts.scale file)
#/usr/bin/x11/mkfontdir (produce Fonts.dir file)
Note: It is best to use SIMSUN.TTC, and to use Simsun.ttf,simsun.ttf in wind98 can be found.
4. Install Input Method:
# emerge FCITX
(Ha ... There is already a basic system, it is best to back up a basic system, I was using ghost back up my/partition, of course, first umount the/boot and//proc partition and deleted the original code file, so even if the blind toss bad, only a few minutes can be restored.
5. Install Gnome
View whether the use item in the/etc/make.conf file already has the following, if not, plus:
use= "-qt-kde GTK Gnome"
# emerge Gnome-light (error using emerge gnome)
# env-update
# Source/etc/profile
#/ETC/INIT.D/FAMD Start
# emerge XScreenSaver
# Convert to non-root user
# Su–test
$ echo "exec gnome-session" > ~/.XINITRC
$ startx
Be excited, you can go to gnome, I think you will be happy for the last 10 hours of labor.
6. Install Gvim editing environment (easy to use editor)
# emerge Gvim
7. Install Firefox
# emerge Mozilla-firefox
# emerge Netscape-flash (allow Mozilla to play Flash animation)
8. Configure Xsession
# exit
$ VI ~/.xsession
Change its contents to read:
Export LANG=ZH_CN
Export LC_ALL=ZH_CN
Export xmodifiers= "@im =FCITX"
FCITX &
StartX | | EXEC xterm
$ chmod +x ~/.xsession (allow the file to be executed)
9. Allow Xterm to display Chinese
$ VI ~/. Xresources
Add the following configuration:
Xterm*locale:true
Xterm*widefont:-misc-simsun-medium-r-normal--0-0-0-0-c-0-iso10646-1
And then reboot the machine to make a graphical landing on the beautiful x desktop.
33. Install configure wireless network card
1. Download the necessary files (the kernel of 2.6.11 is no longer containing ieee80211, install it yourself)
A. ieee80211-1.0.3.tgz
B. ipw2200-1.0.6.tgz
C. ipw2200-fw-2.3.tgz
Http://prdownloads.sourceforge.net/....3.tgz?download
Http://prdownloads.sourceforge.net/....6.tgz?download
Http://ipw2200.sourceforge.net/firm...2200-fw-2.3.tgz
2. Install related files
# tar ZXVF ieee80211-1.0.3.tgz
# CD ieee80211-1.0.3.
# make
# make Install
# tar ZXVF ipw2200-1.0.6.tgz
# CD ipw2200-1.0.6
# make
# make Install
According to the ipw2200-1.0.6 installation prompts ipw2200-fw-2.3 to the appropriate directory, and note that these three software versions are compatible, otherwise there will be problems.
# Cd/usr/lib/hotplug/firmware
# tar ZXVF ipw2200-fw-2.3.tgz
3. Load ipw2200 Module
# modprobe ipw2200
# lsmod (see if the ipw2200 module has been successfully loaded)
4. Set NIC profile (reference eth0)
5. Installing Iwconfig tools and Net-setup Tools
# emerge Network-aware
# emerge Livecd-tools
6. # View information with Iwconfig
7. # dhcpcd eth1 Get IP address or directly modify reference 22 of 4, 5
If everything is OK then your wireless card should light up.
34. Installation of FVWM Desktop
1. Download Address
http://www.fvwm.org/download/
(In addition, you may want to FVWM support for mouse actions.) You can get Libstroke in http://www.etla.net/libstroke/. Download the version prepared for FVWM, compile and install, and then compile the FVWM, it will generally find libstoke, so as to add the function of stroke, if the use of the former has been added stroke parameters, you can not install Libstroke)
2. Installation of the use of genome plus-number modified into-genome
# emerge X11-WM/FVWM (10 minutes)
3. Editor ~/.xinitrx
# Nano ~/.xinitrx
Lang=zh_cn. GBK
Lc_all=zh_cn. GBK
Lc_ctype=zh_cn. GBK
Xloadimage image.jpg–onroot–fullscreen (import background picture)
Xec fvwm2
4. Edit ~/.FVWM/.FVWM2RC File
You can refer to the example of FVWM self-band
# CP/USR/SHARE/FVWM/SYSTEM.FVWM2RC-SAMPLE-95/ROOT/.FVWM2RC
Modify/etc/rc.conf to change the last line to xsession= "fvwm2"
# STARTX
5. Install FVWM manually
Of course the first to install Libstroke, I was under the libstroke–x.x.fvwm.tar.gz
#./confiugure
# Make && make install
Pack fvwm.x.x.tar.bz2
#./confiugure
# Make && make install
Create a link
# Cd/usr/x11r6/bin
# ln-s/USR/LOCALE/FVWM/FVWM FVWM
# Cd/usr/lib
# ln-s/usr/local/lib/libstroke.so.0.0.5 libstroke.so
6. Edit FVWM configuration file, see the previous example
EXC fvwm2 changed to EXEC/USR/X11R6//BIN/FVWM
7. Document Description
Modify FVWM on this basis. The configuration file is in the ~/.FVWM directory and is divided into several files by default, and the general function of each file is:
File features
. FVWM2RC primary files, reading other files
Decoration menu style, window style, etc.
Menu Content Settings
Moudule a variety of module content settings, such as taskbar, Button, Wharf, Pager, etc.
Style The overall style of setting, such as focus style
Iconstyle specify icons for specific programs
Startup starts loading the program, reads several other files
Programs used by functions
Bindings Key Binding Settings
8.
35. Using DISTCC
1. Install DISTCC
# emerge DISTCC
2. Install CCache
# emerge CCache
3. Starter DISTCC
#/ETC/INIT.D/DISTCCD Start
4. Specify CCache size
# ccache–m 2G (Configure DISTCC use 2G cache, can increase efficiency 5 to 10 times times)
5. Modify the/etc/make.conf file and add the following line
Makeopts= "-j4" (the number of machine CPUs in each node plus 1 o'clock maximum efficiency)
Ccache_size= "2G"
distcc_host= "host1 host2 localhost"
The fast machine is placed in front, if the long-term use can add to. BASHRC:
Export distcc_host= "host1 host2 localhost"
6. Monitoring command
# distccmon-test 2 (2 second update)
# Watch Distccmon-text
7. Compile-time using CC=DISTCC./configure
36. Common software
1.# emerge AbiWord (word processing)
2.# emerge Gnumeric (e-form)
3.# emerge Xpdf (PDF reader)
4.# emerge MC (best file Manager)
5.# emerge Xmms (listening to music)
6.# emerge totem (see movie)
7.# emerge Inkscape (powerful picture making software)
8.# emerge Gthumb (see pictures)
9.# emerge Gentoolkit (here bread contains a very useful program: QPKG)
10.# emerge Gftp (FTP Client for best use)
11.# emerge Unrar (no way, I often get the damn rar compressed package)
12.# emerge Gentoo-artwork (there are a lot of beautiful pictures and so on to beautify the desktop)
13. Install FTP service:
# emerge VSFTPD
# rc-update Add vsftpd Default
14. Other:
# emerge Monkey-bubble (sister's favorite game)
# emerge Lbreakout2 (also more fun)
37. Common commands
1. Update package:
# emerge-u World
2.Portage Tree Update
In order for the system to know the new package, you need to locate the update Portage tree, and the command is:
# emerge--sync
3. Find Packages
# emerge--search Package name
4. Install Package:
# EMERGE-AV Package Name
5. Remove Package:
# emerge--unmerge Package name
6. Update the entire system:
# EMERGE-UAV World
7. This requires the use of a tool: Equery
This tool is included in the Gentoolkit, and first you need to install the package:
# Emerge-av Gentoolkit
8. The list of installed packages can be obtained by using the following command:
# equery List
9. More usage can be learned through the following commands:
# equery List--help
10. More usage of equery can be understood through the following commands:
# Equery--help
(note: Used to be replaced by qpkg, now better used Equery)
#emerge EPM.
Identical to the RPM usage. If you used the RPM, you could use this.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.