论坛风格切换切换到宽版
  • 638阅读
  • 2回复

[Debian] mini安装debian lenny 小声的问一下 [复制链接]

上一主题 下一主题
 
发帖
2078
C币
-235495
威望
377
贡献值
1
银元
-1
铜钱
4606
人人网人气币
0
只看楼主 倒序阅读 使用道具 楼主  发表于: 2009-04-27
只安装.了基本部分,在software selection没选任何东东(也不选standard system).,这样一来,很干净。比如:可以安装postfix,因为不想要ex.im4。。。。电影

请问:大家mini安装.d.ebian lenny 时,也是这样吗?电脑

想了解一下

评价一下你浏览此帖子的感受

精彩

感动

搞笑

开心

愤怒

无聊

灌水
离线zhangz.
发帖
2110
C币
-262594
威望
471
贡献值
6
银元
5
铜钱
4751
人人网人气币
0
只看该作者 沙发  发表于: 2010-04-10
Re:[Debian]
#

# Debian 5 lenny 安装日志

#

# ==============================================================================

# 用 ubuntu-8.04.3-desktop-amd64.iso 启动,更改 root 口令后打开其登录 shell

sudo passwd root

su -



# 分区

cfdisk /dev/sda



# 创建文件系统

mkfs.ext2 /dev/sda1

mkfs.ext3 /dev/sda2

mkfs.ext3 /dev/sda5

tune2fs -c 127 /dev/sda1

tune2fs -c 127 /dev/sda2

tune2fs -c 127 /dev/sda5



# 挂载

mkdir /mnt/debian

mount /dev/sda2 /mnt/debian

mkdir /mnt/debian/boot /mnt/debian/home

mount /dev/sda1 /mnt/debian/boot

mount /dev/sda5 /mnt/debian/home



# 我习惯把包缓存脱离根分区

mkdir -p /mnt/debian/home/root/archives /mnt/debian/var/cache/apt

ln -s ../../../home/root/archives /mnt/debian/var/cache/apt/



# 随便

ln -s . /mnt/ubuntu/boot/boot



# ------------------------------------------------------------------------------

# 下载 debootstrap

wget http://ftp.tw.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.10lenny1_all.deb



# 安装 debootstrap

dpkg -i debootstrap_1.0.10lenny1_all.deb



# 运行 debootstrap 安装基本系统,版本代号 lenny

debootstrap --arch amd64 lenny /mnt/debian http://ftp.tw.debian.org/debian/



# ------------------------------------------------------------------------------

# 文件系统表

vi /etc/fstab {

proc                /proc        proc        defaults        0 0



/dev/sda1        /boot        ext2        noauto                        0 2

/dev/sda2        /        ext3        errors=remount-ro        0 1

/dev/sda5        /home        ext3        defaults                0 2

#/dev/sda6        /vm        ext3        defaults                0 2

#/dev/sda7        /pub        ext3        defaults                0 2

}



# ------------------------------------------------------------------------------

# 网卡

vi /mnt/debian/etc/network/interfaces {

auto lo

iface lo inet loopback



auto eth0

iface eth0 inet dhcp

}



# 路由配置,用 ubuntu livecd 会自动正确配置,可检查一下

vi /mnt/debian/etc/resolv.conf {

domain domain

search domain

nameserver 10.0.2.3

}



# 计算机名

echo cp2 > /mnt/debian/etc/hostname



# ------------------------------------------------------------------------------

# 其它配置,习惯问题

vi /mnt/debian/etc/inputrc {

"\e[A": history-search-backward

"\e[B": history-search-forward

}



vi /mnt/debian/root/.bashrc {

export PS1='>$?< \W\$ '

alias ls='ls -AF'

date

}



# ------------------------------------------------------------------------------

# 挂载 /proc 、/sys 和 /dev

mount -t proc proc /mnt/debian/proc

mount -t sysfs sysfs /mnt/debian/sys

mount -o bind /dev /mnt/debian/dev



# 换根

LANG=C chroot /mnt/debian /bin/bash



# 醒目

export PS1='[chroot]>$?< \W\$ '



# ==============================================================================

# 导入 multimedia 、backports 源公钥

pushd /tmp

wget http://ftp.tw.debian.org/debian-multimedia/pool/main/d/debian-multimedia-keyring/debian-multimedia-keyring_2008.10.16_all.deb

wget http://ftp.tw.debian.org/backports.org/pool/main/d/debian-backports-keyring/debian-backports-keyring_2009.02.20_all.deb

dpkg -i debian-multimedia-keyring_2008.10.16_all.deb debian-backports-keyring_2009.02.20_all.deb

popd



# 设源

vi /etc/apt/sources.list {

deb http://ftp.tw.debian.org/debian lenny main contrib non-free



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

deb http://ftp.sjtu.edu.cn/debian-security lenny/updates main contrib non-free



deb http://ftp.tw.debian.org/debian-volatile lenny/volatile main contrib non-free



deb http://ftp.tw.debian.org/debian-multimedia lenny main



deb http://ftp.tw.debian.org/backports.org lenny-backports main contrib non-free

}



# 刷表

aptitude update



# 更新

aptitude safe-upgrade

aptitude full-upgrade



# ------------------------------------------------------------------------------

# 若硬时钟非 UTC

vi /etc/default/rcS {

UTC=no

}

# 时区

dpkg-reconfigure tzdata {

Asia/Shanghai

}



# 本地化

aptitude install -R locales

dpkg-reconfigure locales {

en_US.UTF-8        # 默认

zh_CN.UTF-8

}



# 键盘

aptitude install -R console-data console-tools console-common

# 若上一命令执行时设置错了,可再次配置

dpkg-reconfigure console-data



# ------------------------------------------------------------------------------

# 引导器

# Debian 文档说先装内核再安装引导器,但尝试出错,只能先安装引导器。

aptitude install -R grub-legacy

grep -v rootfs /proc/mounts > /etc/mtab        <<<<<

grub-install /dev/sda

update-grub



# 内核映象配置文件

vi /etc/kernel-img.conf {

# Kernel image management overrides

# See kernel-img.conf(5) for details

do_symlinks = yes

relative_links = yes

do_bootloader = no

do_bootfloppy = no

do_initrd = yes

link_in_boot = no

postinst_hook = update-grub

postrm_hook = update-grub

}



# 内核

aptitude search ^linux-image

aptitude install -R linux-image-2.6-amd64



# 检查或定制引导配置

vi /boot/grub/menu.lst {

}



# ------------------------------------------------------------------------------

# 保存一份包列表,以备日后研究

dpkg -l > ~/pkg-000.lst



# 设置口令

passwd



# 退出 chroot 环境

exit



# 卸载

umount /mnt/debian/dev /mnt/debian/sys /mnt/debian/proc

umount /mnt/debian/boot /mnt/debian/home /mnt/debian



# 退出并重启

exit



# ==============================================================================

# 重启进入新系统后



# 后续安装……
复制代码

离线uranas.
发帖
1976
C币
3483
威望
369
贡献值
2
银元
-2
铜钱
4543
人人网人气币
0
只看该作者 板凳  发表于: 2010-04-10
Re:[Debian]


QUOTE:自由建客 发表于 2010-03-13 07:04



    可以解释一下么
快速回复
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
上一个 下一个