Debian添加源(source.list)及无线网卡配置(wireless tools)
2008-12-23 16:30
531 查看
debian 提供了一个工具,可以帮你测出那个站点在你那里连上去最快(通过 ping 和比较 hop 的次数)。
名字是 netselect
安装
apt-get install netselect
安装后
$ netselect [网站名] ... [网站名]
会显示出速度最快的一个,具体请参看 netselect 的 man pages
网站在这里找:debian 的全球 mirror 列表
http://www.debian.org/mirror/list
这个软件包还包括了一个 netselect-apt,
这个运行后,会在当前目录产生一个叫 sources.list 的文件(给 apt 用的)。
$ netselect-apt
... 由于这个是检测每一个 debian 网站,用的时间会很长 ...
然后会生成这个文件 sources.list
$ ls sources.list
sources.list
$
然后把这个文件移到 /etc/apt/ 下 (要以 root 来做)
$su
Password:
#whoami
root
为了安全,先把文件 chown 成 root 的 (其他用户就改不了)
#chown root:root sources.list
最好在移过去前先把原来的备份
#mv /etc/apt/sources.list /etc/apt/sources.list~
好了,然后移过去
#mv sources.list /etc/apt
最后登出 root
#exit
------------------------------------------------------------------------------------------------------
[Debian]无线网卡配置
------------------------------------------------------------------------------------------------------
当前linux内核自带的无线网卡驱动不多,主要是笔记本电脑使用的
”Intersil Prism“芯片(著名的“ Intel Pro/Wireless
2100”)。另外还有”Atheros”芯片似乎是比较多linuxer使用。那么国内接PCI插槽的网卡,有哪些是可以被我使用的呢?搜索后发现,TP-LINK的无线网卡,我发现它是使用Atheros芯片,这样的话,就可以使用 http://madwifi.org 站点上的驱动程序(madwifi是一个开源项目,专门用于Atheros芯片无线局域网网卡的Linux驱动程序)。
TP-LINK的TP-WN550G,
54M速率,支持IEEE 802.11 b/g协议.
另外列一下madwifi可用的tp-link无线网卡型号: TL-WN551G,TL-WN650G(150-180元左右),TL-WN651G
开始安装
安装硬件就不用说了,操作系统还是在debian下,因为debian实在是太方便了:
1、grep CONFIG_NET_RADIO /boot/config-`uname -r`看内核是否支持无线。
2、lspci看是否找到硬件,没有lspci命令的话需安装pciutils包。
3、安装madwifi相关的包:
aptitude search madwifi
i madwifi-doc - documentation for the Multiband Atheros Driver for WiFi
i madwifi-source - source for the Multiband Atheros Driver for WiFi
i madwifi-tools - tools for the Multiband Atheros Driver for WiFi
将三个包都安装了。
其中madwifi-source包安装后会在/usr/src/目录中产生madwifi.tar.bz2文件,解压后的目 录名为"modules",
cd /usr/src/modules/madwifi
make
make install
后完成modwifi的安装。
debian的话,先安装linux-header:
aptitude install linux-headers-2.6.18-3-686
否则可能会出现下面的错误:
/bin/sh: line 0: cd: /lib/modules/2.6.18-3-686/build: no such file or dir Makefile.inc:69:
*** /lib/modules/2.6.18-3-686/build is missing, please set KERNELPATH. stop.
之后重启系统或者用modprobe ath_pci来加载模块。
如果成功,则使用"ifconfig"会看到新的网卡,网卡名是“ath0”。
安装软件
aptitude install wireless-tools
这个package包括iwconfig、iwlist等有用的工具。
我的ap使用的加密协议是比较简单的WPA-PSK,该协议xsupplicant不能使用,所以改为使用wpasupplicant 来进行配置。
aptitude install wpasupplicant
使用
iwlist ath0 scanning
命令可以查看当前能找到的接入点。
WPA配置
使用wpa_passphrase命令产生PSK:
用法:wpa_passphrase <ssid> [passphrase]
比如:wpa_passphrase my_ssid abcd1234
network={
ssid="my_ssid"
#psk="abce1234"
psk=xxxxxxxxxxxxxxxxxxxxx
}
完整的配置文件/etc/wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1
network={
ssid="my_ssid"
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
proto=WPA
key_mgmt=WPA-PSK
priority=5
psk=xxxxxxxxxxxxxxxxxxxx
}
手工启动:
wpa_supplicant -D madwifi -i ath0 -c /etc/wpa_supplicant.conf
使用命令
iwconfig ath0
可以查看,Access Poin是否连接成功了。如果是使用dncp的话,使用dhclient ath0来自动获取IP,如果使用静态的IP的话,直接使用ifconfig配置IP。
不过,有时候有些AP和无线网卡芯片不太兼容的话,有可能用不了WPA协议进行连接。比如我的笔记本就是这样,所以也可以使用WEP协议进行连接,安全性方面,我想使用128位的加密以及隐藏接入点,应该是没太大的问题的。
使用WEP协议的话,除了在AP上面要配置好之外,在debian上面只需要使用“iwconfig”命令,就可以进行实现连接,也可以写成一个启动脚本,在开机的时候自动进行链接。
Primary Debian mirror sites[/b]
名字是 netselect
安装
apt-get install netselect
安装后
$ netselect [网站名] ... [网站名]
会显示出速度最快的一个,具体请参看 netselect 的 man pages
网站在这里找:debian 的全球 mirror 列表
http://www.debian.org/mirror/list
这个软件包还包括了一个 netselect-apt,
这个运行后,会在当前目录产生一个叫 sources.list 的文件(给 apt 用的)。
$ netselect-apt
... 由于这个是检测每一个 debian 网站,用的时间会很长 ...
然后会生成这个文件 sources.list
$ ls sources.list
sources.list
$
然后把这个文件移到 /etc/apt/ 下 (要以 root 来做)
$su
Password:
#whoami
root
为了安全,先把文件 chown 成 root 的 (其他用户就改不了)
#chown root:root sources.list
最好在移过去前先把原来的备份
#mv /etc/apt/sources.list /etc/apt/sources.list~
好了,然后移过去
#mv sources.list /etc/apt
最后登出 root
#exit
------------------------------------------------------------------------------------------------------
[Debian]无线网卡配置
------------------------------------------------------------------------------------------------------
当前linux内核自带的无线网卡驱动不多,主要是笔记本电脑使用的
”Intersil Prism“芯片(著名的“ Intel Pro/Wireless
2100”)。另外还有”Atheros”芯片似乎是比较多linuxer使用。那么国内接PCI插槽的网卡,有哪些是可以被我使用的呢?搜索后发现,TP-LINK的无线网卡,我发现它是使用Atheros芯片,这样的话,就可以使用 http://madwifi.org 站点上的驱动程序(madwifi是一个开源项目,专门用于Atheros芯片无线局域网网卡的Linux驱动程序)。
TP-LINK的TP-WN550G,
54M速率,支持IEEE 802.11 b/g协议.
另外列一下madwifi可用的tp-link无线网卡型号: TL-WN551G,TL-WN650G(150-180元左右),TL-WN651G
开始安装
安装硬件就不用说了,操作系统还是在debian下,因为debian实在是太方便了:
1、grep CONFIG_NET_RADIO /boot/config-`uname -r`看内核是否支持无线。
CONFIG_NET_RADIO=y
2、lspci看是否找到硬件,没有lspci命令的话需安装pciutils包。
3、安装madwifi相关的包:
aptitude search madwifi
i madwifi-doc - documentation for the Multiband Atheros Driver for WiFi
i madwifi-source - source for the Multiband Atheros Driver for WiFi
i madwifi-tools - tools for the Multiband Atheros Driver for WiFi
将三个包都安装了。
其中madwifi-source包安装后会在/usr/src/目录中产生madwifi.tar.bz2文件,解压后的目 录名为"modules",
cd /usr/src/modules/madwifi
make
make install
后完成modwifi的安装。
debian的话,先安装linux-header:
aptitude install linux-headers-2.6.18-3-686
否则可能会出现下面的错误:
/bin/sh: line 0: cd: /lib/modules/2.6.18-3-686/build: no such file or dir Makefile.inc:69:
*** /lib/modules/2.6.18-3-686/build is missing, please set KERNELPATH. stop.
之后重启系统或者用modprobe ath_pci来加载模块。
如果成功,则使用"ifconfig"会看到新的网卡,网卡名是“ath0”。
安装软件
aptitude install wireless-tools
这个package包括iwconfig、iwlist等有用的工具。
我的ap使用的加密协议是比较简单的WPA-PSK,该协议xsupplicant不能使用,所以改为使用wpasupplicant 来进行配置。
aptitude install wpasupplicant
使用
iwlist ath0 scanning
命令可以查看当前能找到的接入点。
WPA配置
使用wpa_passphrase命令产生PSK:
用法:wpa_passphrase <ssid> [passphrase]
比如:wpa_passphrase my_ssid abcd1234
network={
ssid="my_ssid"
#psk="abce1234"
psk=xxxxxxxxxxxxxxxxxxxxx
}
完整的配置文件/etc/wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1
network={
ssid="my_ssid"
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
proto=WPA
key_mgmt=WPA-PSK
priority=5
psk=xxxxxxxxxxxxxxxxxxxx
}
手工启动:
wpa_supplicant -D madwifi -i ath0 -c /etc/wpa_supplicant.conf
使用命令
iwconfig ath0
可以查看,Access Poin是否连接成功了。如果是使用dncp的话,使用dhclient ath0来自动获取IP,如果使用静态的IP的话,直接使用ifconfig配置IP。
不过,有时候有些AP和无线网卡芯片不太兼容的话,有可能用不了WPA协议进行连接。比如我的笔记本就是这样,所以也可以使用WEP协议进行连接,安全性方面,我想使用128位的加密以及隐藏接入点,应该是没太大的问题的。
使用WEP协议的话,除了在AP上面要配置好之外,在debian上面只需要使用“iwconfig”命令,就可以进行实现连接,也可以写成一个启动脚本,在开机的时候自动进行链接。
Primary Debian mirror sites[/b]
Country | Site | Architectures |
---|---|---|
Australia | ftp.au.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Austria | ftp.at.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Belgium | ftp.be.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Brazil | ftp.br.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Bulgaria | ftp.bg.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Canada | ftp.ca.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Chile | ftp.cl.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Croatia | ftp.hr.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Czech Republic | ftp.cz.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Denmark | ftp.dk.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Estonia | ftp.ee.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Finland | ftp.fi.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
France | ftp.fr.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
France | ftp2.fr.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Germany | ftp.de.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Germany | ftp2.de.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Great Britain | ftp.uk.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Greece | ftp.gr.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Hong Kong | ftp.hk.debian.org/debian/ | alpha amd64 arm armel i386 ia64 powerpc sparc |
Hungary | ftp.hu.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Iceland | ftp.is.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Ireland | ftp.ie.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Italy | ftp.it.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Japan | ftp.jp.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Japan | ftp2.jp.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Korea | ftp.kr.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Mexico | ftp.mx.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Netherlands | ftp.nl.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
New Zealand | ftp.nz.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Norway | ftp.no.debian.org/debian/ | amd64 i386 ia64 powerpc sparc |
Poland | ftp.pl.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Portugal | ftp.pt.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Romania | ftp.ro.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Russia | ftp.ru.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Slovakia | ftp.sk.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Slovenia | ftp.si.debian.org/debian/ | alpha amd64 i386 ia64 powerpc sparc |
Spain | ftp.es.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Sweden | ftp.se.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Switzerland | ftp.ch.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Taiwan | ftp.tw.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Turkey | ftp.tr.debian.org/debian/ | alpha amd64 arm hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
Ukraine | ftp.ua.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
United States | ftp.us.debian.org/debian/ | alpha amd64 arm armel hppa hurd-i386 i386 ia64 mips mipsel powerpc s390 sparc |
相关文章推荐
- Debian无线网卡配置(wireless tools)
- thinkpad x61 无线网卡驱动 debian 7 下配置 安装
- Debian下无线网卡配置
- 【转】在Debian 5.0 Lenny下为无线网卡添加WPA-PSK支持
- [转自CHINAUNIX]Debian(Linux)下的无线网卡配置
- debian下配置网络 安装无线网卡驱动 Broadcom BCMXX系列
- debian之 source.list文件配置
- Debian下无线网卡配置
- debian 下配置无线网卡
- debian下配置网络 安装无线网卡驱动 Broadcom BCMXX系列
- Linux 2.6.35内核配置和网卡驱动添加
- Linux下 无线网卡配置无线唤醒功能的方法
- redhat linux AS4 下配置无线网卡
- CentOS 6.7 无线网卡wlan0配置 连接WPA加密的网络
- (二)为树莓派配置无线网卡
- linux-2.6.35内核配置和网卡驱动添加
- ubuntu配置无线网卡驱动
- ubuntu server 14.04 无线网卡配置
- 树莓派3配置无线网卡连接路由器
- Belkin F6D4050 v1无线网卡在debian Lenny下安装