我的Debian Squeeze 安装、配置
我的Debian 6.0 Squeeze 安装、配置
以前一直使用Debian Lenny 的stable版本,但是安装某些软件时,总是出现各种问题,修改配置无趣、浪费时间。新年时,看Debian的邮件列表时,发现Debian Squeeze 已经有stable 版本了,就赶快下载安装。以下是我的安装、配置记录。
1 基本系统安装
下载Debian Squeeze 的光盘镜像( http://www.debian.org/distrib/)、刻盘、安装。与Debian Lenny 安装过程一样。安装后截图:
2 基本网络配置
1 将用户添加到sudo组
打开终端,输入:
sudo visudo
在 root ALL=(ALL)ALL的下一行添加:
usr ALL=(ALL)ALL
按ctrl+x, 然后按y保存。
2 配置网络
1 修改 /etc/network/interfaces
sudo vi /etc/network/interfaces
然后添加:
auto eth0 #开机自动激活
iface eth0 inet static # 设置为静态IP
address ***.***.***.*** # IP
netmask ***.***.***.*** # 子网掩码
gateway ***.***.***.*** # 网关
hwaddress ether **:**:**:**:**:** # 物理地址
2 修改 /etc/resolv.conf
sudo vi /etc/resolv.conf
然后添加:
nameserver ***.***.***.*** #DNS服务器
nameserver ***.***.***.*** #DNS服务器
3 重启网卡
sudo /etc/init.d/networking restart
3 配置软件源、更新系统
Debian是一个依赖于网络的操作系统,而且源服务器很多,找到一个快速、稳定的源服务很重要。apt-spy可以帮你找到最适合的源
1 安装 apt-spy
sudo aptitude install apt-spy
2 备份源列表
sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak
3 获取详细使用方法
man apt-spy
4 更新apt-spy
sudo apt-spy update
5 更新源列表文件
sudo apt-spy -d stable -a Asia -t 10
经过上述步骤,你就可以获得一个快速、稳定的源列表。此后就可以更新软件源列表,更新系统。
6 更新软件源列表
sudo apt-get update
7 更新系统
sudo apt-get upgrade
4 常用工具安装
由于Debian 默认安装了办公软件、影音工具、图像软件,基本满足我日常需要,所以没有费力气去安装配置这些,常用软件只安装以下这些:
1 浏览器
以前经常使用firefox,后来实在没经住诱惑,用上了chrome,chrome速度快,插件的功能可以同firefox媲美,此外同步功能更妙了。
安装
sudo aptitude install chromium-browser
安装flash 插件
sudo aptitude install flashplugin-nonfree
安装插件,同步。
2 PDF软件
常用的PDF软件有Adobe Reader, xpdf。
1 Adobe Reader
下载( http://get.adobe.com/cn/reader/)
安装
sudo dpkg -i AdobeReader_chs-8.1.7-1.i386.deb
2 xpdf
安装
sudo aptitude install xpdf
3 chm格式浏览器
可选的chm格式浏览器有xchm, chmsee 等。 我选择了xchm。
安装
sudo aptitude install xchm
4 字典软件
在Linux上经常使用字典工具是星际译王。默认情况下,系统安装了星际译王。所以只需要安装“插件”和“字典”。
1 安装字典
下载
从这个(http://yeelou.com/huzheng/stardict-dic/)下载所需字典文件。
安装
tar -xjvf a.tar.bz2
mv a /usr/share/stardict/dict
2 安装插件
sudo aptitude install stardict-plugin stardict-plugin-espeak stardict-plugin-festival
5 压缩、解压缩软件
用于支持rar,7z,cab,zip。
安装
sudo aptitude install p7zip p7zip-full unzip rar unrar cabextract
6 下载上传工具
我在Linux 下常用的下载上传工具包括:FlashGet、gFTP(FTP下载上传工具)
FlashGet
下载( http://www.flashget.com/cn/product_Linux.html)
安装
sudo dpkg -i flashget_1.0.0-1-i386.deb
gFTP
安装
sudo aptitude install gftp
5 编程环境
1 安装vim Emacs
sudo aptitude install vim exuberant-ctags emacs
2 基本编程环境搭建
sudo aptitude install build-essential autoconf automake nasm
3 JDK及Eclipse的安装、配置
1 JDK安装、配置
下载JDK( http://www.oracle.com/technetwork/java/javase/downloads/index.html)
安装
sudo chmod +x jdk-6u23-linux-i586.bin
sudo ./jdk-6u23-linux-i586.bin
sudo cp -r jdk1.6.0_23 /usr/local //复制到/usr/local,便于设置环境变量
设置环境变量
1 打开 /etc/profile
sudo vi /etc/profile
2 编辑 /etc/profile,在profile下添加如下代码:
JAVA_HOME=/usr/local/jdk1.6.0_23
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
export JAVA_HOME
export PATH
export CLASSPATH
重启系统
测试
java -version
2 安装Eclipse
sudo aptitude install eclipse
4 搭建GTK开发环境
sudo aptitude install gnome-core-devel devhelp libglib2.0-doc libgtk2.0-doc glade
5 搭建QT基本开发环境
sudo aptitude install libqt4-core libqt4-debug libqt4-dev libqt4-gui libqt4-qt3support libqt4-sql
python-qt4 python-qt4-common qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig qtcreator
6 安装Mysql
sudo aptitude install mysql-server mysql-client
7 版本控制
sudo aptitude install subversion subversion-tools cvs cvsd
8 安装gawk
sudo aptitude install gawk
9 一些软件测试工具
sudo aptitude install gnuplot ggcov