用 KVM 搭建web集群实验笔记 - NFS & Samba 服务

本文是使用KVM搭建web集群的实验笔记,详细介绍了如何配置NFS服务进行静态资源文件共享,以及Samba服务在Linux与Windows间实现文件共享的操作步骤。
摘要由CSDN通过智能技术生成

一、NFS 服务

NFS ( Network File System)的中文意思是网络文件系统,不同的主机之间通过网络共享文件和目录。在web集群中一般用来共享静态资源文件,如图片等。

NFS服务器共享(export)目录,NFS客户端挂载(mount)的 目录,共享的目录可设置为只读、读写等权限。

1 . 服务器安装配置

操作系统为centos 6.6 ,centos 6与centos 5 的不一样。安装前的准备工作是先报防火墙和selinux关闭。

1)安装软件

yum install -y nfs-utils rpcbind
service rpcbind start
service nfs start
chkconfig rpcbind on
chkconfig nfs on
2)检查安装是否成功

[root@nfssvr ~]# ps -ef |egrep "rpc|nfs"
rpc       1268     1  0 06:08 ?        00:00:00 rpcbind
root      1348     2  0 06:15 ?        00:00:00 [rpciod/0]
root      1357     1  0 06:15 ?        00:00:00 rpc.mountd
root      1364     2  0 06:15 ?        00:00:00 [nfsd4]
root      1365     2  0 06:15 ?        00:00:00 [nfsd4_callbacks]
root      1366     2  0 06:15 ?        00:00:00 [nfsd]
root      1367     2  0 06:15 ?        00:00:00 [nfsd]
root      1368     2  0 06:15 ?        00:00:00 [nfsd]
root      1369     2  0 06:15 ?        00:00:00 [nfsd]
root      1370     2  0 06:15 ?        00:00:00 [nfsd]
root      1371     2  0 06:15 ?        00:00:00 [nfsd]
root      1372     2  0 06:15 ?        00:00:00 [nfsd]
root      1373     2  0 06:15 ?        00:00:00 [nfsd]
root      1400     1  0 06:15 ?        00:00:00 rpc.idmapd
root      1407  1107  0 06:16 pts/0    00:00:00 egrep rpc|nfs
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值