#安装hostapd
apt-get install hostapd
#安装create_ap
git clone https://github.com/oblique/create_ap
cd create_ap
make install
systemctl start NetworkManager
### Enable IEEE 802.11n
create_ap --ieee80211n --ht_capab '[HT40+]' wlan0 eth0 MyAccessPoint MyPassPhrase
## Examples
### No passphrase (open network):
create_ap wlan0 eth0 MyAccessPoint
### WPA + WPA2 passphrase:
create_ap wlan0 eth0 MyAccessPoint MyPassPhrase
### AP without Internet sharing:
create_ap -n wlan0 MyAccessPoint MyPassPhrase
### Bridged Internet sharing:
create_ap -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase
### Bridged Internet sharing (pre-configured bridge interface):
create_ap -m bridge wlan0 br0 MyAccessPoint MyPassPhrase
### Internet sharing from the same WiFi interface:
create_ap wlan0 wlan0 MyAccessPoint MyPassPhrase
### Choose a different WiFi adapter driver
create_ap --driver rtl871xdrv wlan0 eth0 MyAccessPoint MyPassPhrase
### No passphrase (open network) using pipe:
echo -e "MyAccessPoint" | create_ap wlan0 eth0
### WPA + WPA2 passphrase using pipe:
echo -e "MyAccessPoint\nMyPassPhrase" | create_ap wlan0 eth0
### Enable IEEE 802.11n
create_ap --ieee80211n --ht_capab '[HT40+]' wlan0 eth0 MyAccessPoint MyPassPhrase
### Client Isolation:
create_ap --isolate-clients wlan0 eth0 MyAccessPoint MyPassPhrase
## Systemd service
Using the persistent [systemd](https://wiki.archlinux.org/index.php/systemd#Basic_systemctl_usage) service
### Start service immediately:
systemctl start create_ap
### Start on boot:
systemctl enable create_ap
t=1;
while true
do
#此处插入锐捷认证程序的执行
#比如我的
# /root/rjsupplicant/x64/rjsupplicant
let t=t+1;
echo 没有网络啦,正在第$t次重连!;
done