在終端執行命令
備份當前的源列表,以便日后需要時恢復:
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
編輯源列表
Ubuntu 和debian 中執行:
gedit /etc/apt/sources.list
Kubuntu 中執行:
kdesu kate /etc/apt/sources.list
Xubuntu 中執行:
gksu mousepad /etc/apt/sources.list
適用于所有版本:
sudo vim /etc/apt/sources.list
從以下各服務器列表內容中選擇一段替換文件中的所有內容,一般來說加入一至兩組即可,加多了影響更新速度。為防止非官方源中軟件包不全的問題,請在sources.list文件中尾部添加一組官方源。
# deb file:/cdrom/ etch main contrib
#deb http://mirrors.cn99.com/debian/ lenny main non-free contrib
#deb-src http://mirrors.cn99.com/debian/ lenny main non-free contrib deb http://mirrors.163.com/
debian stable contrib main non-free
deb-src http://mirrors.163.com/debian stable contrib main non-free
deb http://mirror.dlut.edu.cn/debian/ lenny main non-free contrib
deb-src http://mirror.dlut.edu.cn/debian/ lenny main non-free contrib
deb http://debian.ustc.edu.cn/debian/ lenny main non-free contrib
deb-src http://debian.ustc.edu.cn/debian/ lenny main non-free contrib
deb http://ftp.tw.debian.org/debian lenny main
deb-src http://ftp.tw.debian.org/debian lenny main
以上是目前debian lenny 速度穩定的源
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.18.4
netmask 255.255.255.0
gateway 192.168.18.1
domain localdomain
search localdomain
nameserver 192.168.18.1
#/etc/init.d/networking restart
甚至是重啟。
/etc/sudoers
chmod +w /etc/sudoers
vim /etc/sudoers
添加一行 username ALL=(ALL) ALL
其中username是你的用戶名,更改sudoers文件權限 chmod 0440 /etc/sudoers
c++開發環境配置
1: debian lenny 5.0 選擇文字安裝界面, 安裝到最后階段時, 選擇桌面環境和文件服務器項, 會將samba, NFS和gnome安裝好
2: 編程工具
apt-get install build-essential 安裝gcc g++ libc-dev make
apt-get install autoconf
apt-get install automake
3: 其他工具
apt-get install tcpdump
apt-get install unzip
apt-get install tree
apt-get install tofrodos 安裝dos2unix
apt-get install manpages manpages-dev 函數man手冊
4: gtk+開發庫
libgtk2.0-dev libdbus-1-dev libdbus-glib-1-dev libgconf2-dev
別的沒什么說的,就是安的時候把網線拔了,不然到configure apt的時候會卡起很久不走的
編輯/etc/network/interface
iface inet eth0 static #設置靜態IP地址
address 192.168.1.235
netmask 255.255.255.0
$/etc/init.d/networking restart
此時已經可以ping通局域網地址,但外網仍不行
nameserver 192.168.1.1
vim /etc/apt/sourcelist
apt-get install openssh-server,openssh-client
apt-get install lrzsz
apt-get install unzip
apt-get install tree
apt-get install valgrind
apt-get install more
apt-get install openssl ca-certificates openssl-doc
apt-get install mysqlserver,mysqlclient
apt-get install vim
apt-get install ctags
在vim的主網站下載插件taglist
http://www.vim.org/scripts/script.php?script_id=273
然后上傳進行解壓
unzip taglist.zip -d ~/.vim解開;
:helptags ~/.vim/doc安裝文檔。
如果要配置的更詳細,這個不錯
http://blog.csdn.net/wooin/archive/2007/10/31/1858917.aspx
apt-get install g++
apt-get install gdb
apt-get install make
apt-get install autoconf
apt-get install automake
apt-get install libboost-dev
apt-get install libboost-doc
apt-get install libxml2
apt-get install libmysqlclient15-dev
apt-get install python2.5
apt-get install python-docutils
apt-get install python2.5-dbg
apt-get install python2.5-dev
apt-get install python2.5-examples
8.安裝twisted
安裝:
$python setup.py build
$python setup.py install
沒有安裝成功,因為需要python2.4 ,而當時他的Ubuntu的Python是2.5。
直接安裝twisted也出錯,因為沒有找到Python.h文件,所以他重新下了Python2.5進行源碼安裝
我從他那里拷貝來Twisted-8.1.0.tar.bz2(tar -jxvf)解壓后安裝