tftp和NFS服务器的建立
2012-02-29 21:02
246 查看
tftp和NFS服务器的建立
在嵌入式linux的开发环境中经常通过tftp服务器在U-boot启动后加载内核,内核启动后通过NFS挂载根文件系统,以下详细介绍两个服务器的建立过程。
1.tftp服务器的建立
sudo apt-get install tftpd xinetd
sudo mkdir /tftpboot
sudo chmod -R 777 /tftpboot
sudo gedit /etc/xinetd.d/tftp
编辑:
service tftp
{
disable = NO
server =/usr/sbin/in.tftp
server_args = -S /tftpboot
sock_type = dgram
protocol = udp
wait = yes
user = root
per_source =11
cps = 100 2
flags = ipv4
}
启动:
/etc/init.d/xinetd restart
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
对于ubuntu 11.10,以上的设置可能不成功,所以可用如下的方式
sudo apt-get install tftp-hpa tftpd-hpa
xinetd
配置/etc/default/tftpd-hpa,内容如下:
#/etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure -c"
重新启动服务:
$sudo /etc/init.d/tftpd-hpa restart
通过tftp的get和put进行测试:
$tftp localhost
tftp>get xx
tftp>put yy
/////////////////////////////////////////////////////
2.NFS服务器的建立
sudo apt-get install portmap nfs-kernel-server nfs-common
sudo gedit /etc/exports
编辑:
/nfsroot *(rw, sync, no_root_squash)
启动:
/etc/init.d/portmap restart
/etc/init.d/nfs-kernel-server restart
查看状态:
/etc/init.d/nfs-kernel-server status
或者
netsata -a | grep nfs
测试NFS:
sudp mount -t nfs 192.168.1.57:/nfsrootfs /mnt/nfs 将主机nfsrootfs目录挂载在/mnt/nfs下
在嵌入式linux的开发环境中经常通过tftp服务器在U-boot启动后加载内核,内核启动后通过NFS挂载根文件系统,以下详细介绍两个服务器的建立过程。
1.tftp服务器的建立
sudo apt-get install tftpd xinetd
sudo mkdir /tftpboot
sudo chmod -R 777 /tftpboot
sudo gedit /etc/xinetd.d/tftp
编辑:
service tftp
{
disable = NO
server =/usr/sbin/in.tftp
server_args = -S /tftpboot
sock_type = dgram
protocol = udp
wait = yes
user = root
per_source =11
cps = 100 2
flags = ipv4
}
启动:
/etc/init.d/xinetd restart
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
对于ubuntu 11.10,以上的设置可能不成功,所以可用如下的方式
sudo apt-get install tftp-hpa tftpd-hpa
xinetd
配置/etc/default/tftpd-hpa,内容如下:
#/etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure -c"
重新启动服务:
$sudo /etc/init.d/tftpd-hpa restart
通过tftp的get和put进行测试:
$tftp localhost
tftp>get xx
tftp>put yy
/////////////////////////////////////////////////////
2.NFS服务器的建立
sudo apt-get install portmap nfs-kernel-server nfs-common
sudo gedit /etc/exports
编辑:
/nfsroot *(rw, sync, no_root_squash)
启动:
/etc/init.d/portmap restart
/etc/init.d/nfs-kernel-server restart
查看状态:
/etc/init.d/nfs-kernel-server status
或者
netsata -a | grep nfs
测试NFS:
sudp mount -t nfs 192.168.1.57:/nfsrootfs /mnt/nfs 将主机nfsrootfs目录挂载在/mnt/nfs下
相关文章推荐
- 关于在ubuntu中建立tftp与nfs服务器的方法
- mini6410基于linux2.6.36内核通过NFS启动根文件系统总结(一搭建开发环境——建立tftp服务器)
- 在Linux下安装tftp服务器NFS服务器以及Samba服务器
- DM6446开发板NFS和TFTP服务器的配置
- 使用nfs共享建立多个httpd服务器
- Ubuntu下搭建tftp、nfs服务器
- 在ubuntu上安装tftp服务器与nfs服务器
- RedHat Enterprise Linux 5 安装TFTP服务器和NFS服务器
- 嵌入式系统建立NFS服务器时的eth0 link up link down 错误
- RedHat Enterprise Linux 5 安装TFTP服务器和NFS服务器
- ubuntu16.04 LTS 下NFS服务器建立
- TFTP与NFS服务器配置
- DM6446开发板NFS和TFTP服务器的配置
- 在LINUX中建立NFS和TFTP应注意的几个问题
- Ubuntu下建立tftp服务器
- Ubuntu14.04寸建立nfs服务器
- 关于嵌入式linux开发环境搭建-TFTP,SAMBA,NFS服务器的搭建
- ubuntu 建立tftp服务器
- nfs启动:u-boot启动后从ubuntu tftp下载内核及设备树,文件系统挂载在nfs服务器目录
- [置顶] Ubuntu 12.10搭建tftp和nfs服务器