当前位置:文档之家› ARM、linux常用服务器+交叉编译工具链

ARM、linux常用服务器+交叉编译工具链

ARM、linux常用服务器+交叉编译工具链
1. tftp服务器在安装linux时通常可供选择是否安装tftp服务器
启动后可通过在控制终端输入netstat -a|grep tftp查看是否已经安装若已安装则为如下打印信息:
[root@localhost /]# netstat -a|grep tftp
若没有安装则可使用
–ivh tftp-server-0.42-3.1.i386.rpm
进行安装然后建立主要工作目录mkdir /tftpboot
接下来配置tftp服务器
/etc/init.d/tftp
# default: off
# description: The tftp server serves files using the trivial file transfer \par
# protocol. The tftp protocol is often used to boot diskless \par
# workstations, download configuration files to network-aware printers, \par # and to start the installation process for some operating systems.
tftp
_type = dgram
= udp
= yes
= root
= /usr/sbin/in.tftpd
_args =-s /tftpboot
= no
_source = 11
= 100 2
= IPv4
注意修改server_args
= -s /tftpboot为你tftp工作目录。

接下来便是重启tftp 服务器了/etc/init.d/xinetd restart打印出如下信息[root@localhost /]# /etc/init.d/xinetd restart
xinetd: [ OK ] xinetd: [ OK ]
表示重启成功接下来便可查看是否已经安装成功
[root@localhost /]# netstat -a|grep tftp
. nfs服务器
首先查看nfs服务器是否被安装(这里为red-had5)rpm –q nfs-utils若打印出如下信息则表示已经被安装
[root@localhost ~]# rpm -q nfs-utils
utils-1.0.9-24.el5
若没有安装nfs服务器则先下载相应的nfs服务器包百度一个即可
然后rpm –ivh nfs- utils-1.0.9-24.el5.i386.rpm这里使用的nfs版本为utils-1.0.9-24.el5故不同版本安装不同,然后进入nfs配置
/etc/exports/nfsroot/rootfs 211.67.216.* (rw,sync,no_root_squash)
.67.216.* 配置网段为自己IP地址同一网段
然后启动NFS服务器
/etc/init.d/nfs start 启动nfs服务器如下所示:
[ OK ]
NFS quotas: [ OK ]
NFS daemon: [ OK ]
NFS mountd: [ OK ]
然后即可挂载nfs服务器上的共享目录了
–t nfs xx.xx.xx.xx:/xx /mnt
.xx.xx.xx为nfs服务器ip地址/xx 为需要挂载的目录
接下来ls /mnt 即可查看是否挂载成功
. samba服务器
在安装linux时选中安装samba服务器然后这里就只需配置即可/etc/samba/smb.conf
[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = %S
valid users = MYDOMAIN%S
然后粘贴修改如下
[root]
comment = Root Directories
browseable = yes
writable = yes
path = /
valid users = smb
valid users = MYDOMAIN%S
这里valid users = smb如果smb用户存在则不需添加否则需要添加
smb
然后设置smb账户登录密码
–a smb
重启smb服务器
/etc/init.d/smb restart
设置好linux ip后
在windows命令行运行\xx.xx.xx.xx 输入账户密码即可访问linux目录了
.xx.xx.xx为虚拟机linux IP地址
通过chmod修改权限即可实现linux和windows文件共享了。

. 交叉编译工具链的安装
首先去百度下载个arm-linux-gcc,arm,linux,gcc交叉编译工具
然后解压
zxvf arm-linux-gcc.tgz –C/
然后为了整个文件系统下都能使用交叉编译命令,需要将/usr/local/arm/4.3.2/bin添加到环境变量PATH中修改/root/ .bashrc添加代码:
PATH=$PATH:/usr/local/arm/4.3.2/bin
这样编译文件时加上arm-linux-gcc即可在开发板上运行了例如这里的hello.c文件arm-linux-gcc hello.c –o hello。

相关主题