Chinaunix首页 | 论坛 | 博客
  • 博客访问: 493498
  • 博文数量: 174
  • 博客积分: 2502
  • 博客等级: 少校
  • 技术积分: 1923
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-28 09:47
文章分类

全部博文(174)

文章存档

2011年(8)

2010年(16)

2009年(68)

2008年(82)

我的朋友

分类: LINUX

2008-10-05 13:01:12

这个十一假期完全给贡献给了gentoo安装了,基本就是天天呆在实验室,偶尔和同学聚餐吃饭......哎,7天假期只会了一点点gentoo安装,有点不甘啊,学得太慢了......希望以后能把gentoo作为自己的主操作系统。下面继续给出简洁的gentoo安装步骤,有点进展的就是这次把桌面环境给弄好了,采用了gnome,而kde和xfce4还没试过,收获就是尽量安装完基本系统后就安装xorg-x11,把桌面环境弄好了再安装相关的其他应用程序。还有在配置Xorg的时候需要对输入输出设备非常了解,相应的驱动需要安装上才可以。

# ifconfig
# /etc/init.d/sshd start
# passwd root
# fdisk /dev/hda
# mke2fs /dev/hda1
# mke2fs -j /dev/hda3
# mkswap /dev/hda2
# swapon /dev/hda2
# mount /dev/hda3 /mnt/gentoo
# mkdir /mnt/gentoo/boot
# mount /dev/hda1 /mnt/gentoo/boot
# uname -m
# cd /mnt/gentoo
# links2
# tar -xvjpf /mnt/gentoo/stage3-*.tar.bz2
# links2
# tar -xvjf portage-latest.tar.bz2 -C /mnt/gentoo/usr
# cp -L /etc/resolv.conf /mnt/gentoo/etc/
# nano -w /mnt/gentoo/etc/make.conf
+++++++++ /etc/make.conf ++++++++++++
CFLAGS="-O2 -march=i686 -pipe"
CXXFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
MAKEOPTS="-j3"
CC="gcc"
PATH="/usr/lib/portage/bin:/usr/i686-pc-linux-gnu/bin:${PATH}"
#PATH="/usr/lib/ccache/bin:/usr/i686-pc-linux-gnu/bin:${PATH}"
#FEATURES="collision-protect parallel-fetch"
#CCACHE_SIZE="2G"
#CCACHE_DIR="/var/tmp/ccache"
#AUTOCLEAN="yes"
VIDEO_CARDS="vmware"
#VIDEO_CARDS="nvidia"
ALSA_CARDS="hda-intel"
INPUT_DEVICES="keyboard mouse"
LINGUAS="en zh zh_CN"
ACCEPT_KEYWORDS="~x86"
GENTOO_MIRRORS=""
GENTOO_MIRRORS="${GENTOO_MIRRORS} "
GENTOO_MIRRORS="${GENTOO_MIRRORS} "
GENTOO_MIRRORS="${GENTOO_MIRRORS} "
GENTOO_MIRRORS="${GENTOO_MIRRORS} "
#PORTAGE_RSYNC_EXTRA_OPTS="-6"
#SYNC="rsync://gentoo.cs.nctu.edu.tw/gentoo-portage"
SYNC="rsync://gentoo.mirror.ipv6.e-utp.net/gentoo-portage"
#PORTDIR_OVERLAY="/etc/portage"
+++++++++ /etc/make.conf ++++++++++++
# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
# emerge --sync
# emerge portage
# energe -av ccache
# nano -w /etc/make.conf
PATH="/usr/lib/ccache/bin:/usr/i686-pc-linux-gnu/bin:${PATH}"
FEATURES="collision-protect ccache  parallel-fetch"
CCACHE_SIZE="2G"
CCACHE_DIR="/var/tmp/ccache"
AUTOCLEAN="yes"
# emerge -av vim
# nano -w /etc/locale.gen
en_US ISO-8859-1
en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
zh_CN.GBK GBK
zh_CN.GB2312 GB2312
# locale-gen
# cp /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime
# nano -w/etc/conf.d/clock
TIMEZONE="Asia/Shanghai"
CLOCK_SYSTOHC="yes"
# emerge -av pciutils
# emerge -av gentoo-sources
# cd /usr/src/linux/
# make menuconfig
# make && make modules_install
# cp arch/i386/boot/bzImage /boot/kernel-2.6.26-gentoo-r1
# emerge genkernel
# zcat /proc/config.gz > /usr/share/genkernel/x86/kernel-config-2.6
# genkernel all
# ls /boot/kernel* /boot/initramfs*
# cp /usr/src/linux-2.6.26-gentoo-r1/arch/x86/boot/bzImage /boot/kernel-genkernel-x86-2.6.26-gentoo-r1
# find /lib/modules/kernel-2.6.26-gentoo-r1/  -type f -iname '*.o' -or -iname '*.ko'
# nano -w /etc/modules.autoload.d/kernel-2.6
# cd /
# vim /etc/fstab
+++++++  /etc/fstab +++++++
/dev/hda1               /boot           ext2            defaults,noatime        1 2
/dev/hda3               /               ext3            noatime                 0 1
/dev/hda2               none            swap            sw                      0 0
/dev/cdrom              /mnt/cdrom      auto            noauto,user             0 0
#/dev/fd0               /mnt/floppy     auto            noauto                  0 0
+++++++  /etc/fstab +++++++
# emerge -av grub
# vim /boot/grub/grub.conf
+++++++  /boot/grub/grub.conf +++++++
default 0
timeout 10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo Linux 2.6.26-r1
root (hd0,0)
kernel /boot/kernel-2.6.26-gentoo-r1  root=/dev/hda3
title Gentoo Linux 2.6.26-r1(rescue mode)
root (hd0,0)
kernel /boot/kernel-2.6.26-gentoo-r1 root=/dev/hda3 init=/bin/bb
title Gentoo Linux 2.6.26-genkernel
root (hd0,0)
kernel /boot/kernel-genkernel-x86-2.6.26-gentoo-r1 root=/dev/ram0 init=/linuxrc real_root=/dev/hda3
initrd /boot/initramfs-genkernel-x86-2.6.26-gentoo-r1
+++++++  /boot/grub/grub.conf +++++++
# grep -v rootfs /proc/mounts > /etc/mtab
# grub-install --no-floppy /dev/hda
# passwd root
# useradd -m -G users,wheel,audio,usb -s /bin/bash by
# passwd by
# emerge -av syslog-ng
# rc-update add syslog-ng default
# emerge -av vixie-cron
# rc-update add vixie-cron default
# emerge -av slocate
# nano -w /etc/conf.d/hostname
HOSTNAME="by"
# emerge -av dhcp
# nano -w /etc/conf.d/net
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"
# rc-update add net.eth0 default
# rc-update add sshd default
# nano -w /etc/hosts
127.0.0.1      by.homenetwork     by    localhost
# exit
# cd /
# umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo/dev /mnt/gentoo
# reboot
# vim /etc/make.conf
USE="alsa bash-completion bzip2 jpeg opengl ruby xscreensaver cjk X dbus gtk gnome hal avahi -kde -qt3 -
qt4 -arts"
INPUT_DEVICES="keyboard mouse"
VIDEO_CARDS="vmware"
以下参考
# emerge -pv xorg-server
# emerge -av xorg-x11
# emerge -av xf86-video-vmware
# env-update && source /etc/profile
# Xorg -configure              # xorgcfg -textmode
# X -config /root/xorg.conf.new
# cp /root/xorg.conf.new /etc/X11/xorg.conf
# vim /etc/X11/xorg.conf
# startx
# vim /etc/X11/xorg.conf
# startx
运行startx,能启动一个简单的窗口管理器
以下参考
# echo "gnome-base/gnome-session branding" >> /etc/portage/package.use
# emerge -av gnome
# env-update && source /etc/profile
# emerge -av gamin
# /etc/init.d/hald start
# rc-update add hald default
# /etc/init.d/dbus start
# rc-update add dbus default
# /etc/init.d/avahi-dnsconfd start
# rc-update add avahi-dnsconfd default
$ echo "exec gnome-session" > ~/.xinitrc
$ startx
# rc-update add xdm default
# vim /etc/conf.d/xdm
DISPLAYMANAGER="gdm"
# emerge scim scim-pinyin
# vim .xinitrc
exec scim &
# vim .bashrc
export LANG=zh_CN.UTF-8
# emerge -av mozilla-firefox
# emerge -av netscape-flashc
# emerge -av pidgin
# emerge terminus-font intlfonts freefonts cronyx-fonts corefonts
# LINGUAS="zh_CN" emerge openoffice-bin
# USE="aac cddb dvd encode gif mmxext mp2 mp3 png \
    quicktime rar real samba srt vorbis \
    win32codecs x264 xv xvid" emerge  mplayer        #未成功

 
阅读(729) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~