Chinaunix首页 | 论坛 | 博客
  • 博客访问: 359930
  • 博文数量: 66
  • 博客积分: 3201
  • 博客等级: 中校
  • 技术积分: 695
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-04 11:17
文章分类

全部博文(66)

文章存档

2016年(1)

2014年(1)

2012年(1)

2011年(2)

2010年(18)

2009年(42)

2008年(1)

分类: LINUX

2009-12-30 21:06:05

很喜欢Debian的开发环境,又可以用apt,着实不比Fedora差。至少安装源比较广。好吧,动手。
我安装的是从Debian官网下Debian 5 Lenny的DVD1
安装完是这样的
@debian:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Deion:    Debian GNU/Linux 5.0.3 (lenny)
Release:        5.0.3
Codename:       lenny
@debian:~$ uname -a
Linux debian 2.6.26-2-686 #1 SMP Sat Oct 17 17:59:23 UTC 2009 i686 GNU/Linux

1.安装完后执行dpkg-reconfigure locales,选择几个locales,默认选择en_US.UTF-8

安装bash-completion(可以tab补全)
2.
编辑更新源 vim /etc/apt/sources.list

# Official Debian US
deb stable main contrib non-free
deb-src stable main contrib non-free

#deb testing main contrib non-free
#deb-src testing main contrib non-free

deb lenny main contrib non-free
deb-src lenny main contrib non-free
###### Debian Update Repos
deb http://security.debian.org/ lenny/updates main contrib non-free
deb / lenny-proposed-updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
deb-src / lenny-proposed-updates main contrib non-free
# End of Debian US

# Official Debian TW
deb lenny main contrib non-free
deb-src lenny main contrib non-free
# End of Debian TW

deb lenny/volatile main contrib non-free
deb-src lenny/volatile main contrib non-free
# Official Debian JP
deb stable main contrib non-free
deb-src stable main contrib non-free
# End of Debian JP
##############################################################################

# USTC
deb lenny main non-free contrib
deb-src lenny main non-free contrib

deb stable main contrib non-free
deb-src stable main contrib non-free
deb proposed-updates main contrib non-free
deb-src proposed-updates main contrib non-free
deb -security stable/updates main
# End of USTC
###############################################################################
# 163.com
deb lenny main non-free contrib
deb lenny-proposed-updates main contrib non-free
deb -security lenny/updates main contrib non-free

deb-src lenny main non-free contrib
deb-src lenny-proposed-updates main contrib non-free
deb-src -security lenny/updates main contrib non-free
# End of 163.com

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

deb lenny main non-free contrib
deb-src lenny main non-free contrib

deb lenny main non-free contrib
deb-src lenny main non-free contrib

deb lenny main non-free contrib
deb-src lenny main non-free contrib
You have mail in /var/mail/jervis
然后就是#apt-get update && apt-get upgrade

3.增加可以sudo的用户:/etc/sudoers
添加一行:username ALL=(ALL) ALL

其中username是你的用户名,保存。
4.不启动桌面,修改/etc/inittab中默认runlevel:
id:3:initdefault: ,id改成3
然后进入/etc/rc3.d,将S13kdm/S30gdm移动到其他目录备份起来。

5.然后执行以下命令安装 apt-spy:

apt-get install apt-spy

从源上下载一份源的镜像列表():

apt-spy update

测试亚洲地区的源的速度,并自动写入 sources.list:

apt-spy -d unstable -a asia -t 5

最终,sources.list 内容为:

deb stable main
deb-src stable main
deb http://security.debian.org/ stable/updates main


要打开/dev/fb0,

kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/sda1 ro quiet vga=0x333


如果安装vmware tools,遇到问题
The directory of kernel headers (version 2.6.26.2) does not match your running
kernel (version 2.6.26-2-686).  Even if the module were to compile
successfully, it would not load into the running kernel.

可以修改linux/include/linux/utsrelease.h 里的版本,改成和上面红色一样的字符串就好了。

当你在另一个系统用vmware的文件,可能会出现Mac地址被更改的状况(主要是你选择了I copied it,而不是I moved it),要改MAC:
修改配置文件.vmx里的后三个,其他不能改。
ethernet0.generatedAddress = "00:0c:29:33:22:11"
uuid.bios = "56 4d e0 c4 a2 41 24 1b-5b 6e 4b a0 0b 33 22 11"

network:


设置IP,可以直接编辑/etc/network/interfaces这个文件,固定IP这样写:


auto lo eth0

iface lo inet loopback

iface eth0 inet static
address 192.168.2.2
netmask 255.255.255.0
broadcast 192.168.2.255
gateway 192.168.2.1

里面把地址和网关设好即可。用DHCP时后一段是这样:

auto eth0
iface eth0 inet dhcp

这个文件改动之后,应该重启网络:

/etc/init.d/networking restart

更一般地,还有ifconfig和route这两个命令,可用来临时设置IP和网关:

ifconfig -a 显示网络设置
ifconfig eth0 inet down 先关掉eth0
ifconfig eth0 inet up 192.168.1.2 \
netmask 255.255.255.0 broadcast 192.168.1.255 这是一行。设置个IP
route add default gw 192.168.1.1 eth0 设置网关
route del default gw 192.168.1.1 网关错了可以删掉,设完后可以用route来检查

设置DNS,直接写/etc/resolv.conf即可,多写几个没问题,只是不知道会不会用到。下面这两个是Opendns的,还是不错的,尤其是对 网通和电信的用户来说。

domain
nameserver 208.67.222.222
nameserver 208.67.220.220

还有主机名:

hostname 显示主机名
hostname 名字 设置主机名

不知道这个设置是否会写入文件。可以直接编辑/etc/hostname,里面只有这个名字。



其余没什么好记的了,更细致点的看http://zhiwei.lv.blog.163.com/blog/static/6980131220099512919640/
阅读(1118) | 评论(0) | 转发(0) |
0

上一篇:开发环境配置

下一篇:Xserver补丁

给主人留下些什么吧!~~