序言
如何在debian安装wifi热点,并且开机自动启动,下面来介绍如何安装!
本次的安装环境是Ubuntu 14.04LTS 64位虚拟机
开始安装
因为在运行ap-hotspot无法出现Wireless Hotspot active,并一直保持Starting Wireless Hotspot…,大概是因为hostapd默认版本有bug,所以移除hostapd,安装比较老的版本!
sudo apt-get remove hostapd
###64 bit
cd /tmp
wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_amd64.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd
###32bit:
cd /tmp
wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd //将防止版本升级到有问题的版本。
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install ap-hotspot
如果你不是ubuntu 例如debian的其他发行版本 或者树莓派的arm芯片的话,可在下面打开链接直接下载deb包。
链接:http://pan.baidu.com/s/1boQ8UnH 密码:hec2 ,这个是amd64 安装包,里面有对应的deb包 ,下载安装
链接:http://pan.baidu.com/s/1dFkNFn7 密码:pc17 这个是arm芯片 里面有对应的deb包 ,下载安装
安装好后,现在就开始运行,在运行前,你必须要运行下面命令,来完成ap—hotspot 的初始化。
sudo ap-hotspot configure
Detecting configuration...
Detected eth0 as the network interface connected to the Internet. Press ENTER if this is correct or enter
the desired interface below (e.g.- eth0, ppp0 etc.)://默认按Enter即可
Detected wlan0 as your WiFi interface. Press ENTER if this is correct or enter the desired interface
(e.g.- wlan1)://默认按Enter即可
Enter the desired Access Point name or press ENTER to use the default one (myhotspot):
//Wifi名字 按ENTER默认,要更换的话。直接在这输入就行!
Enter the desired WPA Passphrase below or press ENTER to use the default one (qwerty0987):
//wifi 密码 按ENTER默认,要更换的话,直接在这输入
sudo ap-hotspot config
Usage: ap-hotspot [argument]
start start wireless hotspot//开始使用
stop stop wireless hotspot//停止使用
restart restart wireless hotspot//重启
configure configure hotspot//配置使用
sudo ap-hotspot start
Starting Wireless Hotspot...
Wireless Hotspot active
出现如上字样即可
问题集锦:
1、出现:
Wireless Hotspot active
bash: notify-send: 未找到命令
解决方法:
程序“notify-send”尚未安装。 您可以使用以下命令安装:
sudo apt-get install libnotify-bin
sudo apt-get install libnotify-bin
3、Ubuntu下使用ap-hotspot出现“Another process is already running”问题的解决方案
问题描述:
当重新想启动ap-horspot的时候发现
当重新想启动ap-horspot的时候发现
sudo ap-hotspot start
Another process is already running
解决方法:
sudo rm /tmp/hotspot.pid
————————————————Enjoy————————————————————