首 页文章中心

Linux学习网

您的位置Linux学习网 > Linux基本应用 > 文章内容

ubuntu7.10上搭建QQ2440V3开发环境

作者:佚名  来源:不详  发布时间:2008-3-29 8:19:00

重启后

xhylyx@xhylyx-desktop:~$ arm-linux-gcc -v

会出现如下信息,这说明交叉编译环境已经成功安装

Reading specs from /usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/specs
Configured with: /work/crosstool-0.27/build/arm-linux/gcc-3.4.1-glibc-2.3.2/gcc-3.4.1/configure --target=arm-linux --host=i686-host_pc-linux-gnu --prefix=/usr/local/arm/3.4.1 --with-headers=/usr/local/arm/3.4.1/arm-linux/include --with-local-prefix=/usr/local/arm/3.4.1/arm-linux --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 3.4.1

第五步:打开NFS服务

1.安装NFS

Ubuntu上默认是没有安装NFS服务器的,首先要安装NFS服务程序:

xhylyx@xhylyx-desktop:~$ sudo apt-get install nfs-kernel-server

安装nfs-kernel-server时,apt会自动安装nfs-common和portmap

这样,宿主机就相当于NFS Server

2.配置NFS

(1)配置portmap

方法1: 编辑/etc/default/portmap, 将 -i 127.0.0.1 去掉.

方法2: $ sudo dpkg-reconfigure portmap , 对Should portmap be bound to the loopback address? 选N.

(2)配置/etc/hosts.deny

禁止任何host(主机)能和你的NFS服务器进行NFS连接,加入:

### NFS DAEMONS

portmap:ALL

lockd:ALL

mountd:ALL

rquotad:ALL

statd:ALL

(3)配 置/etc/hosts.allow

允许那些你想要的主机和你的NFS服务器建立连接。下列步骤将允许任何IP地址以192.168.2开头的主机(连 接到NFS服务器上),也可以指定

特定的IP地址,加入:

### NFS DAEMONS

portmap: 192.168.2.

lockd: 192.168.2.

rquotad: 192.168.2.

mountd: 192.168.2.

statd: 192.168.2.

/etc/hosts.deny 和 /etc/hosts.allow 设置对portmap的访问. 采用这两个配置文件有点类似"mask"的意思. 现在/etc/hosts.deny中禁止所有用

户对portmap的访问. 再在/etc/hosts.allow 中允许某些用户对portmap的访问.

xhylyx@xhylyx-desktop:~$sudo /etc/init.d/portmap restart

重启portmap daemon.

(4)配置/etc/exports

NFS挂载目录及权限由/etc/exports文件定义

比如我要将将我的/opt/FriendlyARM/QQ2440/root_nfs目录让172.16.53.*的IP共享, 则在该文件末尾添加下列语句:

/opt/FriendlyARM/QQ2440/root_nfs 172.16.53.*(rw,sync,no_root_squash)

或者:/opt/FriendlyARM/QQ2440/root_nfs 172.16.53.0/24(rw,sync,no_root_squash)

172.16.53.* 网段内的NFS客户端能够共享NFS服务器/opt/FriendlyARM/QQ2440/root_nfs目录内容.且有读,写权限, 并且该用户进入

/opt/FriendlyARM/QQ2440/root_nfs目录后的身份为root

最好加上sync, 否则 $ sudo exportfs -r 时会给出警告, sync是NFS的默认选项.

root@xhylyx-desktop:/#showmount -e 查看NFS server的export list.

若更改了/etc/exports, 运行 xhylyx@xhylyx-desktop:~$sudo exportfs -r 更新

运行 xhylyx@xhylyx-desktop:~$ sudo /etc/init.d/nfs-kernel-server restart 重启nfs服务

上一页  [1] [2] [3] [4]  下一页

收藏本页到: 365Key | del.icio.us | | 添加到雅虎收藏+
  • 网站帮助 - 广告合作 - 网站地图