cubieboard网络设置

1.1 配置静态ip

vi /etc/network/interface

auto lo
iface lo inet loopback

#以下是添加的内如
auto eth0
#iface eth0 inet dhcp  如果自动分配的话只要加这行
iface eth0 inet static
address 192.168.22.66
gateway 192.168.22.254
netmask 255.255.255.0

1.2配置域名服务器

vi  /etc/resolv.conf

nameserver 172.28.250.210
nameserver 8.8.8.8

防止重启后dns丢失

vi   /etc/resolvconf/resolv.conf.d/base 添加以下内容

nameserver 172.28.250.210
nameserver 8.8.8.8

1.3重启网络

service networking restart



2.1安装远程桌面

apt-get install vnc-server

修改配置文件

vi  /home/cubie/.vnc/xstartup

内容如下,蓝色的是修改或者添加的。

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
startlubuntu &
#export XKL_XMODMAP_DISABLE=1
#/etc/X11/Xsession

2.2启动,一般在cubie用用下执行,因为root用户很多软件运行不了

vncserver

启动后会分配一个端口:1

然后就可以用VNC Viewer连接了

192.168.22.66:1

2.3关闭端口1

vncserver  -kill :1



3.1开启无线网卡

先查看网卡名

ifconfig -a

会发现wlanX之类的,之后启动它

ifconfig wlanX up

3.2安装无线解析软件

apt-get install wpasupplicant

3.3生成无线口令的密文(wpa方式),并生成配置文件
wpa_passphrase TP-LINK_5906FA 123456789 >  /etc/wpa_supplicant.conf

命令里面的TP-LINK_5906FA是路由器ssid,123456789是密码

3.4修改配置文件

vi /etc/wpa_supplicant.conf

配置内如如下

network={
        ssid="TP-LINK_5906FA"
        proto=WPA
        key_mgmt=WPA-PSK
        #psk="123456789"
        pairwise=CCMP TKIP (aes加密,如果是TKIP,则去掉“CCMP ”)
        group=CCMP TKIP (aes加密,如果是TKIP,则去掉“CCMP ”) 

        psk=b17d61f0b32f86279b2924a2027435caf6c1506d51a052afd7800acb2e8e1e0b
 }

3.5修改网络配置文件

vi /etc/network/interfaces

内容如下

auto lo
iface lo inet loopback

auto wlan2
iface wlan2 inet static
wpa-conf /etc/wpa_supplicant.conf
address 192.168.101.99
gateway 192.168.101.253
netmask 255.255.255.0
#iface wlan2 inet dhcp
#wpa-conf /etc/wpa_supplicant.conf


3.6重启网络

重启前先吧eth0关掉

ifconfig eth0 down

service networking restart


收藏于 2013-09-29

posted on 2015-06-01 15:29  阮減显  阅读(218)  评论(0编辑  收藏  举报

导航