2008年2月20日 星期三

Debian Installation Note - 080819

過年的時候一台Mandriva的電腦硬碟出問題 (果然是放完假電腦都會爛掉...),重灌想試試Debian,灌了才發現,小眉角還真不少,但是程序建起來以後安裝就很快了

  1. /etc/apt/sources.list拿掉cdrom update,跑apt-get update
    deb http://ftp.tw.debian.org/debian etch main contrib non-free
    deb-src http://ftp.tw.debian.org/debian etch main contrib non-free
    其他台灣apt server
    debian.csie.nctu.edu.tw
  2. ref step 8. 如果有上次安裝的pkg list, 可直接使用
  3. apt-get install psmisc sudo vim gpm
  4. For Building kernel/ modules, ref Debian-Kernel-Compile-Howto (Kernel 2.6)
  5. 直接跑可能可以安裝大多需要的元件
    apt-get build-dep gnome-terminal
  6. 預設install的是vim.tiny,改安裝vim
    lrwxrwxrwx 1 root root 17 2007-09-11 10:40 /etc/alternatives/vi -> /usr/bin/vim.tiny
    如果顏色還沒出來(如Ubuntu),Edit /etc/vim/vimrc, enable the following line
    syntax on
  7. edit /etc/sudoers
    root ALL=(ALL) ALL
    username ALL=(ALL) ALL
    or
    ALL ALL=(ALL) ALL

  8. 這中間還裝了openbsd-inetd,不過我已經被搞的七暈八素了,應該還是要裝吧?
  9. 用inetd的inetd.conf for svn
    svn stream tcp nowait svn /usr/sbin/tcpd /usr/bin/svnserve -i -r /mnt/svndisk/prj/svn
    要注意 /etc/service裡也要有,否則inetd會不知道要對應到哪個service
    svn 3690/tcp subversion # Subversion protocol
    svn 3690/udp subversion
    nowait若變wait,client端作svn co時會hang在那裡
    若沒用tcpd,client端會看到
    svn: Malformed network data
  10. 全部安裝完成後,可以把install的pkg全部list下來,下次要重灌就直接根據list全部灌就ok
    dpkg --get-selections | cut -f 1 > install_files

    apt-get install `cat install_files`
  11. xfce4, kde,gnome,icewm
  12. ifup/ifdown configuration file /etc/network/interfaces
    # The loopback interface
    auto lo
    iface lo inet loopback

    # The first network card - this entry was created during the Debian installation
    ## auto eth0
    iface eth0 inet dhcp
    pre-up /etc/init.d/ntp-server stop || true
    up /etc/init.d/ntpdate restart || true
    up /etc/init.d/ntp-server start || true

    iface eth0-0 inet static
    address 134.158.129.99
    netmask 255.255.254.0
    network 134.158.128.0
    broadcast 134.158.129.255
    gateway 134.158.128.1

    iface eth0-2 inet static
    address 192.168.1.160
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

    iface eth0-3 inet static
    address 192.168.1.7
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255

    iface adsl0 inet dhcp
    pre-up /sbin/modprobe adiusbadsl
    pre-up /usr/sbin/adictrl -i
    pre-up /usr/sbin/adictrl -f
    pre-up /usr/sbin/adictrl -d
    pre-up /usr/sbin/adictrl -s

    inetd 協助程式
    將你的 inetd 改成 xinetd
    Wikipedia - inetd

沒有留言: