Gentoo Linux实战
作者: 出处:网络整理 更新时间:2007-09-25 责任编辑:
 
 

Sparc 64

CHOST="sparc64-unknown-linux-gnu"
CFLAGS="-O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-O3 -pipe -fomit-frame-pointer"

b. emerge Gentoo Linux的最新unstable版本
[仍然是修改/etc/make.conf]
代码:
# Advanced Masking
# ================
#
# Gentoo is using a new masking system to allow for easier stability testing
# on packages. KEYWORDS are used in ebuilds to mask and unmask packages based
# on the platform they are set for. A special form has been added that
# indicates packages and revisions that are expected to work, but have not yet
# been approved for the stable set. '~arch' is a superset of 'arch' which
# includes the unstable, in testing, packages. Users of the 'x86' architecture
# would add '~x86' to ACCEPT_KEYWORDS to enable unstable/testing packages.
# '~ppc', '~sparc', '~sparc64' are the unstable KEYWORDS for their respective
# platforms. DO NOT PUT ANYTHING BUT YOUR SPECIFIC ~ARCHITECTURE IN THE LIST.
# IF YOU ARE UNSURE OF YOUR ARCH, OR THE IMPLICATIONS, DO NOT MODIFY THIS.
#
ACCEPT_KEYWORDS="~x86" #(去掉ACCEPT_KEYWORDS="~x86"前的注释符即可)

6,打开PROZILLA的多线程下载功能,加快下载速度:
代码:
#emerge prozilla [下载安装prozilla]
#nano -w /etc/make.conf

代码:
# Fetching files
# ==============
#
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
# all users on your system should use them.
#
# Portage uses wget by default. Here are some settings for some alternate
# downloaders -- note that you need to merge these programs first before they
# will be available.
#
# Lukemftp (BSD ftp):
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
#RESUMECOMMAND="/usr/bin/lukemftp -s -a -R -o \${DISTDIR}/\${FILE} \${URI}"
#
# Prozilla (turbo downloader)
FETCHCOMMAND='/usr/bin/proz --no-getch -s ${URI} -P ${DISTDIR}' #[去掉前面的#]

代码:
#nano /etc/prozilla.conf [配置prozilla,把这一行threads改为=10,十线程下载,
ftpsearch=OFF (不自动搜索下载镜像)]

7,#emerge -u world [全面更新系统,需要很长时间,好了,先休息一会吧]

遇到问题:
emerge -u world报错!
到procps时报连接错误,?

以前也遇到过类似问题,一般过一两天再重新emerge rsync一下,再继续往下做就可以了,因为GENTOO更新很快!
[继续往下走, ]

8,安装编译内核
代码:
#emerge gentoo-sources
#cd /usr/src/linux
#make menuconfig
#make dep
#make bzImage
#make modules
#make modules_install
#cp /usr/src/linux/System.map /boot/System.map-2.4.20
#cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.4.20

[关于2.4内核的详悉配置方法,可以参阅以下文章: http://www.tldp.org/linuxfocus/ChineseGB/July2002/article252.shtml ]

我是直接从网上DOWN下来的最新内核源码来编译的(2.4.21-rc3)

9,安装vcron和metalog以及update modules
代码:
#emerge vcron
#rc-update add vcron default
#emerge metalog
#rc-update add metalog default
#update-modules

11,设置时区和Host主机名
代码:
#cd /usr/share/zoneinfo/Asia
#ln –sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
#nano –w /etc/hostname

12,加入文件系统工具(如果是使用ext2或ext3,可以忽略这一步,系统自带了e2fsprogs)
代码:
#emerge reiserfsprogs

在Gentoo Linux系统里打开硬盘的DMA
代码:
#nano -w /etc/conf.d/local.start

在文件末尾加上 hdparm -c 1 -d 1 /dev/hda
设置root用户密码
代码:
#passwd

13.修改/etc/fstab文件,以符合你实际的分区情况,这是我的fstab文件,参考一下:)
代码:
#nano -w /etc/fstab

代码:
# /etc/fstab: static file system information.
#
# <file system><mount point><type><options><dump><pass>
/dev/hda7/reiserfsnoatime 0
0
none /dev/pts devpts mode=0620 0 0
none /mnt/cdrom supermount dev=/dev/hdb,fs=auto,ro,--,iocharset=gb2312,codepage=
936,umask=0 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=auto,--,iocharset=gb2312,sync,codepa
ge=936,umask=0 0 0
/dev/hda1 /mnt/win_c ntfs iocharset=gb2312,ro,umask=0 0 0
/dev/hda6 /mnt/win_d vfat iocharset=gb2312,codepage=936,umask=0 0 0
/dev/hda9 /mnt/win_e vfat iocharset=gb2312,codepage=936,umask=0 0 0
none /proc proc defaults 0 0
/dev/hda3 swap swap defaults 0 0

代码:
#mkdir /iwnc /wind /wine /winf(根据自己机器的情况加载windows分区)

代码:
14,配置Grub,以便启动系统。

代码:
#emerge grub
#cp /usr/share/grub/i386-pc/* /boot/grub (cp升级过的grub的stage文件到/boot/grub目录
#nano -w /boot/grub/menu.lst (建立Grub启动列表文件)

以下是我的menu.lst

代码:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
#all kernel and initrd paths are relative to /, eg.
#root (hd0,1)
#kernel /boot/vmlinuz-version ro root=/dev/hda2
#initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimge=(hd0,7)/boot/grub/splash.xpm.gz

title Windows XP
rootnoverify (hd0,0)
chainloader +1

title Mandrake Linux
kernel /boot/vmlinuz ro root=/dev/hda5
initrd /boot/initrd.img

title Gentoo Linux (hda8)
root (hd0,7)
kernel /boot/vmlinuz-2.4.21-rc3 ro root=/dev/hda8

title Gentoo Linux (hda7)
root (hd0,6)
kernel /boot/vmlinuz-2.4.21-rc3 ro root=/dev/hda7

代码:
#grub (配置Grub,让Grub写入MBR,管理整个机器里所有系统的启动)
grub> root (hd0,7) (指定root分区位置)
grub>quit (退出)

15,配置网络
a. 首先你在编译内核时要选择相应的模块,要想加载内核模块:
代码:
#nano -w /etc/modules.autoload

这是我的

代码:
# /etc/modules: kernel modules to load at boot time.
#
# This file should contain the names of kernel modules that are
# to be loaded at boot time, one per line. Comments begin with
# a "#", and everything on the line after them are ignored.

usbcore
rtl8150
usbmouse
usbkbd
usb-uhci
hid
input
keybdev
usbnet
mousedev
ac97_codec
i810_audio

b. 编辑/etc/conf.d/net在这里填入IP、NETMASK,BROADCAST,GATEWAY
这是我的

代码:
# /etc/conf.d/net:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 1
9:39:22 azarah Exp $

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface
#
iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"
#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"

# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
#
#iface_eth0="dhcp"
#dhcpcd_eth0="..."

# For adding aliases to a interface
#
#alias_eth0="192.168.0.3 192.168.0.4"

# NB: The next is only used for aliases.
#
# To add a custom netmask/broadcast address to created aliases,
# uncomment and change accordingly. Leave commented to assign
# defaults for that interface.
#
#broadcast_eth0="192.168.0.255 192.168.0.255"
#netmask_eth0="255.255.255.0 255.255.255.0"

# For setting the default gateway
#
#gateway="eth0/192.168.0.1"

iface_eth0="192.9.168.42 broadcast 192.9.168.255 netmask 255.255.255.0"
gateway="eth0/192.9.168.83"

编辑/etc/resolv.conf在这里填入DNS的信息:

代码:
# cat /etc/resolv.conf

nameserver 192.9.168.83

代码:
#rc-update add net.eth0 default

好了,这个时候你可以重新启动,进入你的新系统了!!!

二、安装FTP和opessh

a. 安装openssh
代码:
emerge openssh
rc-update add sshd default

b. 安装FTP:
代码:
emerge xinetd
rc-update add xinetd default
emerge vsftpd

编辑/etc/xinetd.d/vsftpd文件,
把最后面的disable改为no,
再加上这一行:only_from = 0.0.0.0

编辑/etc/xinetd.d/vsftpd文件,
把最后面的disable改为no,
再加上这一行:only_from = 0.0.0.0
编辑/etc/vsftpd/vsftpd.conf
最后重新启动inetd:/etc/init.d/xinetd restart

三、桌面软件的安装与设置
1,安装配置最新的XFree和Gnome
代码:
#emerge xfree gnome
#xf86config (检测配置XFree86,根据自己具体配置选择,配置完毕会在/etc/X11/下生成XF86Config )
#echo "exec gnome-session" > ~/.xinitrc (让我们直接用startx命令进入Gnome而不是原来的twm)

保存修改退出后,用startx命令就可以进入Gnome了。

如果要用KDE:
#emerge xfree qt arts
#USE="-gnome -gtk" emerge kdelibs kdebase (去掉gnome和gtk以及多余kde组件的支持,安装最小化的KDE)
#xf86config
#echo "exec startkde" > ~/.xinitrc

 
     
 
 
后退<<上一页 继续>>Gentoo
[上一页][第1页][第2页][第3页][下一页]
 
内容导航  
第1页Gentoo Linux实战 第2页Gentoo Linux实战
第3页Gentoo
上一篇 : GentooLinux1.4 RC2硬盘.. 下一篇硬盘安装Gentoo
 
  您要为所发表的言论的后果负责,请各位遵纪守法并注意文明用语
标题:  

[ 关于本站 ] [ 广告服务 ] [ 商务合作 ] [ 联系我们 ] [ 合作伙伴 ] [ 法律顾问 ] [ 网站地图 ]
千橡公司 京ICP证041489号 Copyright (c) 1997-2007 All Right Reserved.