找回密码
 注册
查看: 12638|回复: 23

我的debian网络安装全步骤!

[复制链接]
发表于 2005-4-2 15:55:59 | 显示全部楼层 |阅读模式
下面是我的debian网络安装全步骤,不过这仅针对我的个人爱好而设置的,所以仅供大家参考!:)
 楼主| 发表于 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:\下.
    [/list:u]
    2.重启系统,设置bios从软驱(floppy)启动,并把dos启动盘放入软驱.

    3.系统从dos启动盘启动后进入dos界面,然后执行下面命令:
    [code:1]
    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
    [/code:1]

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

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

    子网掩码: 255.255.255.224

    默认网关: 211.64.151.62

    首选DNS:  211.64.144.130

    备用DNS:  211.64.150.66(此项一般没有)
    [/code:1]
    注:ip地址、网关、DNS需按照自己的实际情况配置,切勿照抄!!.
    [code:1]
    接着系统主机名:zhyfly

    域名:ouc.edu.cn
    [/code:1]
    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
      [/list:u]
      设置/etc/apt/sources.list:
      [code:1]
      #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
      [/code:1]
      测试apt源,完成后,进入登陆界面.

      10.用root登陆,首先删除不需要软件:
      [code:1]
      apt-get remove netatalk
      [/code:1]
      #去掉appletalk的东西,这个东西会让系统启动很慢的;
      [code:1]
      apt-get remove exim4
      [/code:1]
      #去掉这个MTA,这个东西同样会让系统启动很慢的

      接下来的一些优化:
      • 先去掉多余的服务
        [code:1]
        #apt-get -y install rcconf

        #rcconf
        [/code:1]
        我只保留 alsa aumix dbus-1 makedev
      • 使用硬盘 hdparm
        [code:1]
        #apt-get -y install hdparm

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

        #/sbin/hdparm -k1 /dev/hda
        [/code:1]
        hdparm 加上个参数。(可选)
        [code:1]
        #/sbin/hdparm -c3 -u1 -d1 -X6x /dev/hda
        [/code:1]
        X参数是打开硬盘DMA模式,现在的硬盘和主板都能支持这个了。

        具体的参数是 ATA66=68 , ATA100=69 , ATA33=66 。
        [code:1]
        #/sbin/hdparm -c3 -u1 -d1 -X69 -a1024 /dev/hda
        [/code:1]
        这个是推荐增加的参数, 大家在做的时候修改一下就用hdparm 的 -Tt参数测一下, 防止出现bug.
      • 使用预链接加速程序启动速度
        [code:1]
        #apt-get -y install prelink

        #/usr/sbin/prelink -all --conserve-memory
        [/code:1]
      • 测试apt源:
        [code:1]
        #apt-get update
        [/code:1]
      • 安装必需软件:
        [code:1]
        apt-get install zhcon

        apt-get install vim x-window-system-core gnome-core gdm mozilla fcitx sudo
        [/code:1]
        接着执行命令visudo配置

        在最后一行写入:
          [code:1]
        zhyfly ALL=NOPASSWD:ALL
          [/code:1]
        再用 vim 打开 ~/.bashrc ,在最后写入:
          [code:1]
        alias reboot="sudo reboot"

        alias halt="sudo halt"

        alias vim="sudo vim"

        alias apt-get="sudo apt-get"
          [/code:1]
      • 配置完这些后首先重启系统,进入图形化界面,gdm登陆,language选择English,用zhyfly登陆.登陆后打开命令行界面
        /etc/X11/Xsession.d/25fcitx-start里写入
        [code:1]
        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
        [/code:1]
        然后执行:
        [code:1]
        apt-get install localeconf
        [/code:1]
        这个过程中会出现提示是否用 debconf 配置 locale ,选择 是 ,覆盖原文件,下面选择
        [code:1]
        select en_US ISO-8859-1 for environment

        select zh_CN.GBK.GBK for LC_CTYPE
        [/code:1]
        在 /mnt 下建立文件夹:
        [code:1]
        mkdir c d e f floppy usb cdrom
        [/code:1]
        用 vim 打开 /etc/fstab 写入:
        [code:1]
        # /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,noauto  0       0

        /dev/fd0        /media/floppy0  auto    rw,user,noauto  0       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
        [/code:1]
      • 安装stardict
        [code:1]
        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
        [/code:1]
        安装xpdf
        [code:1]
        apt-get install xpdf-chinese-simplified xpdf-chinese-traditional
        [/code:1]
        安装其他
        [code:1]
        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
        [/code:1]
      • 配置显卡

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

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

        下面是my ~/.bashrc:
        [code:1]
        # ~/.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"
        [/code:1]
        root ~/.bashrc:
        [code:1]
        # ~/.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'
        [/code:1]
      • .重启系统,进入系统后观察系统是否为英文环境,fcitx是否好用,sudo是否好用,字体是否好看......(不好看找3n :D )
        [/list:u]

        2005.4.2 modified by linky_fan   不要介意咯.  
回复

使用道具 举报

发表于 2005-4-2 16:56:22 | 显示全部楼层
我用了两张软盘,然后网络安装~~
其实,一张软盘就够了,怕没有软盘就麻烦了~~
回复

使用道具 举报

 楼主| 发表于 2005-4-2 17:10:18 | 显示全部楼层
[quote:1566864889="shooter"]我用了两张软盘,然后网络安装~~
其实,一张软盘就够了,怕没有软盘就麻烦了~~[/quote]
一张软盘?说说看,我的要下载4M的东西!
回复

使用道具 举报

发表于 2005-4-2 17:12:47 | 显示全部楼层
补充两句:
  • ntfs文件系统不建议打开w权限,比较容易出错(一般来说分个fat32的分区两边都可以用
  • 觉得你用的sudo除了做了个log之外,等于是又一个uid=0的帐号。对于安全性来说不够好,建议开个halt,reboot,mount权限就够了
  • hdparm调整硬盘参数时候可以多试试,另外调好数据后可以把对应的hdparm命令写入rc脚本中, 这样每次启动时候都会调用到了.
    [/list:u]
    不过的确是偏好文章
回复

使用道具 举报

 楼主| 发表于 2005-4-2 17:15:38 | 显示全部楼层
[quote:8ea0598fd9="linky_fan"]补充两句:
  • ntfs文件系统不建议打开w权限,比较容易出错(一般来说分个fat32的分区两边都可以用
  • 觉得你用的sudo除了做了个log之外,等于是又一个uid=0的帐号。对于安全性来说不够好,建议开个halt,reboot,mount权限就够了
  • hdparm调整硬盘参数时候可以多试试,另外调好数据后可以把对应的hdparm命令写入rc脚本中, 这样每次启动时候都会调用到了.
    [/list:u]
    不过的确是偏好文章
    [/quote]
    记下!
    多谢版主:)

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

使用道具 举报

发表于 2005-4-2 17:27:22 | 显示全部楼层
一张软盘?说说看,我的要下载4M的东西!


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.
回复

使用道具 举报

 楼主| 发表于 2005-4-2 20:31:29 | 显示全部楼层
linky_fan:我大体看了一下.linux果然神奇,怎样都可以做到
以后有时间就试试!

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

使用道具 举报

发表于 2005-4-2 21:40:09 | 显示全部楼层
既然已经有XP了,把grub for dos 加到XP的启动菜单不是比用软盘省事一些?
回复

使用道具 举报

发表于 2005-4-4 21:55:44 | 显示全部楼层
[quote:ac909c7faf="zhy2111314"][quote:ac909c7faf="shooter"]我用了两张软盘,然后网络安装~~
其实,一张软盘就够了,怕没有软盘就麻烦了~~[/quote]
一张软盘?说说看,我的要下载4M的东西![/quote]

我说了你不要打我~~

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

使用道具 举报

 楼主| 发表于 2005-4-4 22:50:52 | 显示全部楼层
[quote="shooter"][quote="zhy2111314"][quote:9a8e57bc94="shooter"]

我说了你不要打我~~

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

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

使用道具 举报

发表于 2005-4-20 15:44:38 | 显示全部楼层
[quote:75bc0f86c8="zhy2111314"]我的debian安装步骤(dos启动版):

................................
deb http://mirrors.geekbone.org/debian/ sid main non-free contrib
[/code]
测试apt源,完成后,进入登陆界面.

10.用root登陆,首先删除不需要软件:
[code:1]
apt-get remove netatalk
[/code:1]
#去掉appletalk的东西,这个东西会让系统启动很慢的;
[code:1]
apt-get remove exim4
[/code:1]
#去掉这个MTA,这个东西同样会让系统启动很慢的

接下来的一些优化:
  • 先去掉多余的服务
    [code]
    #apt-get -y install rcconf
    ............................
    [/quote]
    我在到这一步的时候屏幕出现的是
    E:can't find <..中间几个单词没有记清楚..> rcconf
    是不是找不到这个包?
    之前我已经用 apt-get update 更新过了。
    能告诉我怎样继续安装下去么?
回复

使用道具 举报

发表于 2005-4-20 21:49:15 | 显示全部楼层
E:can't find <..中间几个单词没有记清楚..> rcconf

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

使用道具 举报

 楼主| 发表于 2005-4-20 23:27:42 | 显示全部楼层
恩,等装上后想装什么只需一个apt-get。。。。:)
回复

使用道具 举报

发表于 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
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2025-2-13 02:51 , Processed in 0.045647 second(s), 15 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表