(Debian的vhcs再次配置,原来发的地方找不着了,之前放在了www.qooq.net上了。今天做个统一备份放在了http://hi.xoao.com 上。统一转到wp上来,以做以后查阅之用)

搞了多次 VHCS,都是到最后关头解决不了的,不是这个服务不能起来,就是那个服务不正常,而DNS解析更是从来不知道怎么整,proFTP也从来不能正常运作,也没搞明白明明系统装的是ProFTP,为什么 vhcs 非要说是vftp?

下定决心再来一次,先从基本系统起。

  1. 下载 debian-31r0a-i386-netinst.iso , 安装基本系统
    • 启动输入 linux26 以 2.6 内核开始安装基本系统
    • 语言选择英文
    • 国家/地区选择 其他->亚洲->中国
    • 键盘选美国英语
    • 主机名选 debian
    • 域名选 gdgpi.com
    • 询问硬件时钟是否设置为 GMT 时选否
    • 时区设置为北京时间/上海时间/广州时间
    • 暂时不配置apt
    • 不选择任何软件,然后提示错误,此时直接选完成配置
    • 以root身份登陆系统
  2. 配置 apt 并更新系统
    • 使用 cn99 的源

      wget http://debian.cn99.com/sources.list.sarge.cn99
      mv /etc/apt/sources.list /etc/apt/sources.list.old
      mv sources.list.sarge.cn99 /etc/apt/sources.list
      vi /etc/apt/sources.list

      将 sources.list 文件中所有 testing 的项目全部注释,如果决定不用源代码编译,将所有 deb-src 项目也注释。

    • 更新系统

      apt-get update
      apt-get upgrade

      在 Exim 配置中选择不配置。
      在更新完毕后有了新的内核,重新启动系统。

  3. 配置网络
    • IP 地址

      vi /etc/network/interfaces

      修改为以下内容:

      # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

      # The loopback interface
      auto lo
      iface lo inet loopback

      # The first network card - this entry was created during the Debian installation
      # (network, broadcast and gateway are optional)
      auto eth0
      iface eth0 inet static
      address 192.168.1.156
      netmask 255.255.255.0
      network 192.168.1.0
      broadcast 192.168.1.255
      gateway 192.168.1.1

    • 解析

      vi /etc/resolv.conf

      修改为下面的内容:

      search gdgpi
      nameserver 192.168.1.156
      nameserver 192.168.1.1

    • 主机

      vi /etc/hosts

      修改为下面的内容:

      127.0.0.1 localhost.localdomain localhost server1
      192.168.1.156 debian.gdgpi.com debian

      # The following lines are desirable for IPv6 capable hosts
      ::1 ip6-localhost ip6-loopback
      fe00::0 ip6-localnet
      ff00::0 ip6-mcastprefix
      ff02::1 ip6-allnodes
      ff02::2 ip6-allrouters
      ff02::3 ip6-allhosts

    • 设置主机名并重启网络

      echo server1.example.com > /etc/hostname
      /bin/hostname -F /etc/hostname
      /etc/init.d/networking restart

  4. 安装 OpenSSH 然后通过 puTTY 控制

    apt-get install ssh

    选择默认使用 ssh2 协议并确认启动 sshd
    将服务器显示屏、键盘、鼠标……拆除,在工作站通过 puTTY 登陆服务器继续剩余工作。

  5. 安装一些支持软件

    apt-get install bzip2 rdate fetchmail libdb3++-dev unzip zip ncftp xlispstat libarchive-zip-perl zlib1g-dev libpopt-dev nmap openssl fileutils

  6. 删除一些无用软件

    apt-get --purge remove lpr nfs-common portmap pidentd pcmcia-cs pppoe pppoeconf ppp pppconfig
    update-rc.d -f exim remove
    update-inetd --remove daytime
    update-inetd --remove telnet
    update-inetd --remove time
    update-inetd --remove finger
    update-inetd --remove talk
    update-inetd --remove ntalk
    update-inetd --remove ftp
    update-inetd --remove discard
    /etc/init.d/inetd reload

如果你是第一次来这儿,欢迎订阅 feedsky RSS feed。 第一时间看到更多精彩内容,谢谢你的访问!
原文地址:http://my.xoao.com/debian-vhcs-1
转载请注明出处,非常感谢!
admin on 10月 9th, 2007 | File Under Linux使用 | -