您的位置:首页 > 编程语言 > PHP开发

Ubuntu 14.04 安装配置tftp及NFS服务

2016-07-05 19:12 671 查看
1、建立tftf测试环境

       sudo apt-get install tftp tftpd xinetd

 

       建立服务配置文件:

       sudo vi /etc/xinetd.d/tftp

service tftp

{

   socket_type = dgram

   protocol = udp

   wait = yes

   user = root

   server = /usr/sbin/in.tftpd

   server_args = -s /tftpboot

   disable = no

   per_source = 11

   cps = 100 2

    flags= IPv4

}

 

建立tftp服务文件目录

sudo mkdir /tftpboot

sudu chmod 777 /tftpboot

 

重新启动服务

sudo /etc/init.d/xinetd restart

 

测试

       echo foo > a.txt

       tftp localhost

       tftp>put a.txt

 

2、建立NFS测试环境

       sudo apt-get install nfs-kernel-server

 

       配置/etc/exports文件,增加挂载目录

       /nfsroot*(rw,sync,no_root_squash)

 

建立NFS服务文件目录

sudo mkdir /nfsroot

sudu chmod 777 /nfsroot

 

       重启服务

       sudo /etc/init.d/nfs-kernel-serverrestart

 

       测试

       showmount -e

Export list for foox-ubuntu:

/nfsroot *

 

       sudo mount -t nfs localhost:/nfsroot /mnt

       sudo umount /mnt
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: