ubuntu12.04下一个samba、tftp、nfs构造

本文详细介绍如何通过Samba、TFTP及NFS三种不同方式配置局域网内的文件共享服务。具体步骤包括安装必要的软件包、配置共享目录权限、编辑服务配置文件以及重启服务进行测试等。
1.samba setting
  1>apt-get install samba
    apt-get install smbfs
  2>mkdir /home/linux/sharefile
    chmod 777 /home/linux/sharefile
  3>vim /etc/samba/smb.conf
    add as follows:
[share]
path=/home/linux/sharefile
public  = yes
writable= yes
read    = yes
  4>/etc/init.d/samba restart
  
2.tftp setting
1>check if tftp installed:
 dpkg -s tftp-hpa
2>apt-get install tftp-hpa
 apt-get install tftpd-hpa
3>sudo vim /etc/default/tftpd-hpa
 change as follows:
  TFTP_USERNAME="tftp"
  TFTP_DIRECTORY="/home/linux/tftpfile"
  TFTP_ADDRESS="0.0.0.0:69"
  TFTP_OPTIONS="-c -s -l"
4>sudo service tftpd-hpa restart
5>test:
 tftp 127.0.0.1
tftp>get file
tftp>put file
tftp>q


3.nfs setting
1>apt-get install nfs-kernel-server
2>vim /etc/exports
 add as follows:
   /home/linux/nfsfile  *(rw,sync,no_root_squash,no_subtree_check)
3>/etc/init.d/nfs-kernel-server restart
4>test:
mkdir /mnt/nfs
monut -t nfs 127.0.0.1:/home/linux/nfsfile /mnt/nfs

版权声明:本文博主原创文章,博客,未经同意不得转载。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值