zhy2111314 发表于 2005-4-2 15:55:59

我的debian网络安装全步骤!

下面是我的debian网络安装全步骤,不过这仅针对我的个人爱好而设置的,所以仅供大家参考!:)

zhy2111314 发表于 2005-4-2 15:56:42

我的debian安装步骤(dos启动版):

1.ready:

[*]下载所需文件:linux+initrd.gz
http://people.debian.org/~joeyh/d-i/sarge/images/daily/netboot/debian-installer/i386/2.6/
grub
注:dos启动盘自己制作

[*]放置位置:把linux+initrd.gz+grub020p(文件夹即:grub for dos)+grub(可执行程序,从grub020p中提取)复制到c:\下.

2.重启系统,设置bios从软驱(floppy)启动,并把dos启动盘放入软驱.

3.系统从dos启动盘启动后进入dos界面,然后执行下面命令:

A:\C:

C:\grub (进入grub的shell模式)

......

grub>kernel (hd0,0)/linux root=/dev/ram ramdisk_size=20000 devfs=mount,dall vga=788

grub>initrd (hd0,0)/initrd.gz

grub>boot


注:其中前面为系统提示符(A: or C: or grub>)

4.然后通过下载下来的linux debian内核启动安装提示,第一步选择 简体中文 后下面默认,然后会出现通过DHCP配置网络,失败后选择 手工配置网络 ,输入:

IP地址:   211.64.151.45

子网掩码: 255.255.255.224

默认网关: 211.64.151.62

首选DNS:211.64.144.130

备用DNS:211.64.150.66(此项一般没有)

注:ip地址、网关、DNS需按照自己的实际情况配置,切勿照抄!!.

接着系统主机名:zhyfly

域名:ouc.edu.cn

5.下面是配置apt源,选择默认中国,mirrors.geekbone.org(教育网网速早上快,中午下午晚上很慢), 然后就是下载安装组件.

6.安装组件下完后进入安装分区设置,手工编辑分区表,选择要安装的硬盘位置

这里假定是hda3 (同样需按照自己的实际情况来定)

格式化

default(记不清这项是什么了)

挂载点:\根文件系统

启动标志:开

大小:

hda4

swap分区

启动标志:关

保存,写入分区表,硬盘准备,进入最后安装界面!此时网速快安装就快,否则会花很长时间.

7.安装最后出现是否把grub写入mbr,选择 是.

发现windows xp professional,是否写入grub,选择 是.

8.安装完成,出现提示问是否重启,选择 继续 重启系统.

9.重启后进入base-config配置.

[*] 设置root密码 确认

[*] 设置用户 zhyfly

[*] 用户密码 确认

[*] 选择安装软件,退出不选择

[*] 显示器 30-70 50-160

设置/etc/apt/sources.list:

#deb http://mirrors.geekbone.org/debian/ sarge main

deb http://debian.ustc.edu.cn/debian sid main non-free contrib

deb http://debian.ustc.edu.cn/debian-non-US sid/non-US main non-free contrib

deb http://debian.ustc.edu.cn/debian ../project/experimental main non-free contrib

deb http://debian.ustc.edu.cn/debian-uo sid misc marillat rareware ustc java jrfonseca firefly

deb http://security.debian.org/ stable/updates main contrib non-free

deb http://debian.okey.net/debian-uo/ sid firefly java marillat rareware misc

deb http://debian.okey.net/debian-fonts/ ./

deb ftp://ftp.nerim.net/debian-marillat/ unstable main

deb http://mirrors.geekbone.org/debian/ sid main non-free contrib

测试apt源,完成后,进入登陆界面.

10.用root登陆,首先删除不需要软件:

apt-get remove netatalk

#去掉appletalk的东西,这个东西会让系统启动很慢的;

apt-get remove exim4

#去掉这个MTA,这个东西同样会让系统启动很慢的

接下来的一些优化:

[*]先去掉多余的服务

#apt-get -y install rcconf

#rcconf

我只保留 alsa aumix dbus-1 makedev

[*]使用硬盘 hdparm

#apt-get -y install hdparm

#/sbin/hdparm -c3 -u1 -d1 /dev/hda

#/sbin/hdparm -k1 /dev/hda

hdparm 加上个参数。(可选)

#/sbin/hdparm -c3 -u1 -d1 -X6x /dev/hda

X参数是打开硬盘DMA模式,现在的硬盘和主板都能支持这个了。

具体的参数是 ATA66=68 , ATA100=69 , ATA33=66 。

#/sbin/hdparm -c3 -u1 -d1 -X69 -a1024 /dev/hda

这个是推荐增加的参数, 大家在做的时候修改一下就用hdparm 的 -Tt参数测一下, 防止出现bug.

[*]使用预链接加速程序启动速度

#apt-get -y install prelink

#/usr/sbin/prelink -all --conserve-memory

[*]测试apt源:

#apt-get update

[*]安装必需软件:

apt-get install zhcon

apt-get install vim x-window-system-core gnome-core gdm mozilla fcitx sudo

接着执行命令visudo配置

在最后一行写入:

zhyfly ALL=NOPASSWD:ALL

再用 vim 打开 ~/.bashrc ,在最后写入:

alias reboot="sudo reboot"

alias halt="sudo halt"

alias vim="sudo vim"

alias apt-get="sudo apt-get"

[*]配置完这些后首先重启系统,进入图形化界面,gdm登陆,language选择English,用zhyfly登陆.登陆后打开命令行界面
在/etc/X11/Xsession.d/25fcitx-start里写入

export G_FILENAME_ENCODING=@GBK

#export LANG=zh_CN.GB2312

#export LANG=zh_CN.GBK

#if you use the en_US environment, you can type: export LANG=en_US

export LANG=en_US

export XMODIFIERS=@im=fcitx

fcitx

然后执行:

apt-get install localeconf

这个过程中会出现提示是否用 debconf 配置 locale ,选择 是 ,覆盖原文件,下面选择

select en_US ISO-8859-1 for environment

select zh_CN.GBK.GBK for LC_CTYPE

在 /mnt 下建立文件夹:

mkdir c d e f floppy usb cdrom

用 vim 打开 /etc/fstab 写入:

# /etc/fstab: static file system information.

# <file system> <mount point>   <type><options>       <dump><pass>

proc            /proc         proc    defaults      0       0

/dev/hda3       /               reiserfs notail          0       1

/dev/hda4       none            swap    sw            0       0

/dev/hdd      /media/cdrom0   iso9660 ro,user,noauto0       0

/dev/fd0      /media/floppy0auto    rw,user,noauto0       0

/dev/hda1       /mnt/c          vfat    rw,users,dmask=000,fmask=0111,umask=0,codepage=936,iocharset=cp936 0 0

/dev/hda5       /mnt/d          vfat    rw,users,dmask=000,fmask=0111,umask=0,codepage=936,iocharset=cp936 0 0

/dev/hda6       /mnt/e          ntfs    rw,users,umask=0,iocharset=utf8 0 0

/dev/hda7       /mnt/f          ntfs    rw,users,umask=0,iocharset=utf8 0 0

#/dev/sda1       /mnt/usb      vfat   rw,users,dmask=000,fmask=0111,umask=0,codepage=936,iocharset=cp936 0 0


[*]安装stardict

apt-get install stardict stardict-tools stardict-cdict-gb stardict-cedict-gb stardict-langdao-ce-gb stardict-langdao-ec-gb stardict-oxford-gb stardict-xdict-ce-gb stardict-xdict-ec-gb

安装xpdf

apt-get install xpdf-chinese-simplified xpdf-chinese-traditional

安装其他

apt-get install gaim(lumaqq or openq) xhcat

apt-get install totem w32codecs xmms (or beep-media-palyer)

apt-get install gqview gimp scrot

apt-get install chmsee

apt-get install openoffice.org openoffice.org-debian-files openoffice.org-l10n-zh-cn openoffice.org-help-zh-cn openoffice.org-gtk-gnome


[*]配置显卡

xf86cfg(现在新版的xorg6.8.2已经可以用xorgcfg自动配置and建立conf文件了)

显卡 Trident Video Acclerator Blade 3D/ProMedia(比较老的说)

下面是my ~/.bashrc:

# ~/.bashrc: executed by bash(1) for non-login shells.

# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)

# If running interactively, then:

if [ "$PS1" ]; then

    # don't put duplicate lines in the history. See bash(1) for more options

    # export HISTCONTROL=ignoredups

    # check the window size after each command and, if necessary,

    # update the values of LINES and COLUMNS.

    #shopt -s checkwinsize

    # enable color support of ls and also add handy aliases

    if [ "$TERM" != "dumb" ]; then

      eval `dircolors -b`

      alias ls='ls --color=auto'

      #alias dir='ls --color=auto --format=vertical'

      #alias vdir='ls --color=auto --format=long'

    fi

    # some more ls aliases

    #alias ll='ls -l'

    #alias la='ls -A'

    #alias l='ls -CF'

    # set a fancy prompt

    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

    # If this is an xterm set the title to user@host:dir

    case $TERM in

    xterm*)

    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'

      ;;

   *)
   
       ;;

      esac

    # enable programmable completion features (you don't need to enable

    # this, if it's already enabled in /etc/bash.bashrc).

    #if [ -f /etc/bash_completion ]; then

    #. /etc/bash_completion

    #fi

fi

alias reboot="sudo reboot"

alias halt="sudo halt"

alias apt-get="sudo apt-get"

alias vim="sudo vim"

root ~/.bashrc:

# ~/.bashrc: executed by bash(1) for non-login shells.

export PS1='\h:\w\$ '

umask 022

# You may uncomment the following lines if you want `ls' to be colorized:

export LS_OPTIONS='--color=auto'

eval "`dircolors`"

alias ls='ls $LS_OPTIONS'

alias ll='ls $LS_OPTIONS -l'

alias l='ls $LS_OPTIONS -lA'

#

# Some more alias to avoid making mistakes:

alias rm='rm -i'

alias cp='cp -i'

alias mv='mv -i'

[*].重启系统,进入系统后观察系统是否为英文环境,fcitx是否好用,sudo是否好用,字体是否好看......(不好看找3n :D )


2005.4.2 modified by linky_fan   不要介意咯.:wink:

shooter 发表于 2005-4-2 16:56:22

我用了两张软盘,然后网络安装~~
其实,一张软盘就够了,怕没有软盘就麻烦了~~

zhy2111314 发表于 2005-4-2 17:10:18

我用了两张软盘,然后网络安装~~
其实,一张软盘就够了,怕没有软盘就麻烦了~~
一张软盘?说说看,我的要下载4M的东西!

linky_fan 发表于 2005-4-2 17:12:47

补充两句:
[*]ntfs文件系统不建议打开w权限,比较容易出错(一般来说分个fat32的分区两边都可以用 :mrgreen: )

[*]觉得你用的sudo除了做了个log之外,等于是又一个uid=0的帐号。对于安全性来说不够好,建议开个halt,reboot,mount权限就够了 :mrgreen:

[*]hdparm调整硬盘参数时候可以多试试,另外调好数据后可以把对应的hdparm命令写入rc脚本中, 这样每次启动时候都会调用到了.

不过的确是偏好文章
:wink:

zhy2111314 发表于 2005-4-2 17:15:38

补充两句:
[*]ntfs文件系统不建议打开w权限,比较容易出错(一般来说分个fat32的分区两边都可以用 :mrgreen: )

[*]觉得你用的sudo除了做了个log之外,等于是又一个uid=0的帐号。对于安全性来说不够好,建议开个halt,reboot,mount权限就够了 :mrgreen:

[*]hdparm调整硬盘参数时候可以多试试,另外调好数据后可以把对应的hdparm命令写入rc脚本中, 这样每次启动时候都会调用到了.

不过的确是偏好文章
:wink:
记下!
多谢版主:)

hdparm这个我不是很懂,所以只是参考其他人的大致写的,等我再调试一下再看看!

linky_fan 发表于 2005-4-2 17:27:22


一张软盘?说说看,我的要下载4M的东西!

:wink:
Installation from Floppies
--------------------------

If you either do not have a CD-ROM or you have a computer that
cannot boot from a CD-ROM then you will have to use the floppy
images located beneath this directory.Floppy images are named
`*.bin'.You will generally need the `rescue.bin' and `root.bin'
images, and often the `driver-*.bin' images as well.

Note that there are various sets of these rescue, root, and driver
images, depending on which architecture you are on.You will have
to choose a set with which to install.See below for a detailed
description of the various subdirectories which contain these floppy
images.

The `driver-*.bin' files contain extra hardware drivers not
contained in the kernel in the `rescue.bin' image.It is not always
required to create floppies from which to load these drivers, e.g.,
in cases where the installation is able to get the drivers from
non-floppy media.It's basically a question of how much hardware
support the kernel itself contains.

If you do not create the `driver-*.bin' floppies, later during the
installation you will need a copy `rescue.bin' and `drivers.tgz' to
be available from non-floppy media.You will be prompted for the
operating system and modules, and you cannot tell the system to use
floppies, obviously, since you did not create the driver floppies.
Direct the installer to get this data off the CD-ROM, local hard
disk, or wherever the installation files were downloaded.

You *cannot* create floppies from *.bin files by just copying the
*.bin files over.You need to do a low-level sector copy of the
data onto the floppy.The method you must use to create floppies
from the *.bin files varies based on what operating system you have
access to.Descriptions below cover creating floppies from *.bin
files in Unix and from DOS.

It is recommended that you always use fresh new floppies, because
used ones can contain errors and cause failures in booting.

- Creating Floppies from Floppy Images in Unix

    Use the GNU `dd' command to create a floppy disk from a .bin file:

      dd of=/dev/fd0 if=<file> bs=1024

    Your floppy device may be something other than `/dev/fd0'.

    If you are naturally suspicious, you can make sure the image was
    successfully written:

      cmp /dev/fd0 <file>

- Creating Floppies from Floppy Images in DOS

    Change directory (`cd') to the directory containing the *.bin
    files that you want.Use the DOS utility `rawrite2.exe' in the
    `dosutils' subdirectory to create the image, for instance:

                ..\dosutils\rawrite2 -f rescue.bin -d a

   where `a' refers to the first floppy drive on your computer, and
   `rescue.bin' represents the *.bin file from which you want to
   create a floppy.

zhy2111314 发表于 2005-4-2 20:31:29

linky_fan:我大体看了一下.linux果然神奇,怎样都可以做到:)
以后有时间就试试!

还有多谢整理修改,希望能为大家有所帮助:)

食古不化 发表于 2005-4-2 21:40:09

既然已经有XP了,把grub for dos 加到XP的启动菜单不是比用软盘省事一些?

shooter 发表于 2005-4-4 21:55:44

我用了两张软盘,然后网络安装~~
其实,一张软盘就够了,怕没有软盘就麻烦了~~
一张软盘?说说看,我的要下载4M的东西!

我说了你不要打我~~ :roll:

先用boot.img的软盘引导~~
然后把软盘取出,放到另外一台active的,并且有软驱的机子上作root.img,用同一张盘~~,然后……
有点恶搞,不过我这里反正有台闲置的机子~ :lol:

zhy2111314 发表于 2005-4-4 22:50:52



我说了你不要打我~~ :roll:

先用boot.img的软盘引导~~
然后把软盘取出,放到另外一台active的,并且有软驱的机子上作root.img,用同一张盘~~,然后……
有点恶搞,不过我这里反正有台闲置的机子~ :lol:

怎么会?呵呵
多谢分享,不过什么时候做成只需要一张软盘就可以呢。。。呵呵有待研究!

Neate 发表于 2005-4-20 15:44:38

我的debian安装步骤(dos启动版):

................................
deb http://mirrors.geekbone.org/debian/ sid main non-free contrib

测试apt源,完成后,进入登陆界面.

10.用root登陆,首先删除不需要软件:

apt-get remove netatalk

#去掉appletalk的东西,这个东西会让系统启动很慢的;

apt-get remove exim4

#去掉这个MTA,这个东西同样会让系统启动很慢的

接下来的一些优化:

[*]先去掉多余的服务

#apt-get -y install rcconf
............................

我在到这一步的时候屏幕出现的是
E:can't find <..中间几个单词没有记清楚..> rcconf
是不是找不到这个包?
之前我已经用 apt-get update 更新过了。
能告诉我怎样继续安装下去么?

linky_fan 发表于 2005-4-20 21:49:15


E:can't find <..中间几个单词没有记清楚..> rcconf

估计本来就没装, 跳过好了.

zhy2111314 发表于 2005-4-20 23:27:42

恩,等装上后想装什么只需一个apt-get。。。。:)

Neate 发表于 2005-4-24 16:59:29

thanks!
i'm using Debian.
i followed you instruction, but there's still a problem:i can't input with fcitx
it started
页: [1] 2
查看完整版本: 我的debian网络安装全步骤!