|
查看了一下,Debian最新版本为5.0,发行号lenny。下载了一个ISO文件,700M。
安装如下:
1. 在vmware上分配了8G空间,但是没有一次分配给它,并且划分为2G大小的文件;
2. 选择非图形安装、英文版,一路下去。lenny在分区过程中,可以选择用LVM工具。在分区时,选取让其对/home, /root, /swap, /usr, /tmp用不同的分区,最后显示图如下:
在选择安装包时,没有选择desktop environment,只选择了web server等几个。
安装完成后,已经可以#ping www.baidu.com. 证明网络已通,但是用telnet仍然连接不上主机。
运行#df,显示如下:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/debian-root
329233 85223 227012 28% /
tmpfs 128200 0 128200 0% /lib/init/rw
udev 10240 80 10160 1% /dev
tmpfs 128200 0 128200 0% /dev/shm
/dev/sda1 233335 9522 211365 5% /boot
/dev/mapper/debian-home
2789856 69780 2578356 3% /home
/dev/mapper/debian-tmp
238003 6180 219535 3% /tmp
/dev/mapper/debian-usr
2822096 482776 2195960 19% /usr
/dev/mapper/debian-var
1350552 230596 1051348 18% /var
3. 配置/etc/apt/source.lists
- 在/etc/apt/sources.list中添加更新源:
- deb http://debian.cn99.com/debian/ stable main non-free contrib
- deb http://debian.cn99.com/debian-non-US/ stable/non-US main contrib non-free
#apt-get update
#apt-get install apt-spy
- # mv sources.list sources.list.bak // 备份老大源列表
- #man apt-spy // 获取详细的使用方法
- // 更新您的镜像列表文件 /var/lib/apt-spy/mirrors.txt
- # apt-spy update
- // 在亚洲寻找速度最快的stable版镜像, 并生成sources.list文件
- # apt-spy -d stable -a Asia
- # cp /etc/apt/sources.list.d/apt-spy.list /etc/apt/sources.list
注:实际上经过上述搜索找到的是ftp.tw.debian.org,但是我ping了一下,发现需要37.*ms左右,比debian99.cn要慢。估计是apt-spy不一定能找到所有的source.
4. 安装telnet和ssh
- // 安装telnet:
- # apt-get install telnetd
- # /etc/init.d/openbsd-inetd start
测试,在客户机上telnet IP
- // 安装 openssh server:
- # apt-get install openssh-server
- //# /etc/init.d/ssh restart //安装完了,似乎就自动启动了
- 测试,在客户机上运行secureCRT,选择SSH2即可。
5. 安装vsftpd
- # apt-get install vsftpd
- // 编辑/etc/vsftpd.conf
- 激活
- local_enable=YES
- write_enable=YES
- // 启动 vsftpd
- /etc/init.d/vsftpd restart
6. 安装编辑工具vim
- # apt-get install vim-full //这个竟然需要44M空间,下载的动西较多,建议只安装vim
- //#apt-get install vim
- // 编辑/etc/vim/vimrc文件
- 打开syntax on、set nu
7. 安装编译,工程构建,调试工具
- /*
- * 说明:
- * build-essential: 基本编译环境 (gcc, g++, libc, make等)
- * autoconf: 自动配置工具
- * automake: make相关
- * gdb: 调试工具
- */
- #apt-get install build-essential autoconf automake gdb
- … Need to get 19.4MB of archives.
After this operation, 61.2MB of additional disk space will be used.
8. 安装开发文档
- /*
- * 说明:
- * manpages-dev: C/C++man帮助手册
- * Binutils: 链接器(ld)、汇编器(as)、反汇编器(objdump)和档案的工具(ar)
- * glibc-doc: GUN C标准库文档
- * stl-manual: 标准C++ STL模板文档
- */
- apt-get install manpages-dev binutils-doc cpp-doc gcc-doc glibc-doc libstdc++6-4.3-doc stl-manual
- …… Need to get 16.6MB of archives.
After this operation, 75.2MB of additional disk space will be used.
9. 安装apache,mysql, php
由于开始安装时选择了web server,因此无需安装apache。只需测试一下,在客户机上IE输入:
http://IP
即显示:it works. 同样也无需安装php.
安装mysql及mysql client
#apt-get install mysql-server-5.0
……
Need to get 35.6MB/35.6MB of archives.
After this operation, 106MB of additional disk space will be used.
#apt-get install mysql //安装client,可以不安装
- 安装hp5 mysql extensions
#apt-get install php5-mysql
#apt-get install phpmyadmin
- 测试,输入http://IP/phpmyadmin,用MySQL的root用户登录即可。
|
|