配置清单

1、修改grub启动的内核版本
vi /boot/grub/grub.conf
将default 0改为1

拷贝mt7601Usta.ko到/lib文件夹

拷贝RT2870STA.dat到 /etc/Wireless/RT2870STA/文件夹

拷贝wifiscan到bin文件夹,chmod 775 /bin/wifiscan
拷贝wifiget.sh到bin文件夹,chmod 775 /bin/wifiget.sh

添加启动脚本 /etc/rc.local
/bin/wifiget.sh &

重启

#!/bin/sh
rm /dev/stdout -fr
rm /dev/stderr -fr
ln -s /proc/self/fd/1 /dev/stdout
ln -s /proc/self/fd/2 /dev/stderr

insmod /lib/mt7601Usta.ko
ifconfig ra0 up 
iwconfig ra0 mode monitor

/bin/wifiscan ra0 > /tmp/wifidat.txt &

while [ 1 ]
do
sleep 300      ---时间修改   
now=`date +%y%m%d%H%M%S`
cat /tmp/wifidat.txt  > /tmp/wifires.txt-$now 
> /tmp/wifidat.txt
curl -u admin:admin123 -T /tmp/wifires.txt-$now ftp://xxx/file/wifires.txt-$now  --账号密码  修改 
#rm /tmp/wifires.txt-$now
done

# cd /etc/sysconfig
# vi iptables

一定要在:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
的后面增加:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
然后保存,就可以了

#service iptables restart
iptables:清除防火墙规则:                                 [确定]
iptables:将链设置为政策 ACCEPT:filter                    [确定]
iptables:正在卸载模块:                                   [确定]
iptables:应用防火墙规则:                                 [确定]
sudo passwd root
sudo -s -H
gedit /etc/lightdm/lightdm.conf
root@sa-Lenovo:/# cat /etc/lightdm/lightdm.conf
[SeatDefaults]
allow-guest=false
autologin-user=root
autologin-user-timeout=0
autologin-session=lightdm-autologin
user-session=ubuntu
greeter-session=unity-greeter
root@sa-Lenovo:/# 
yum install gcc gcc-c++ gdb autoconf automake

猜你喜欢

转载自gengzg.iteye.com/blog/2225043