- 在/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使用者登入即可。