NFS与SMB文件共享服务

关闭firewalld和selinux
[root@gym ~]# systemctl stop firewalld.service 
[root@gym ~]# systemctl disable firewalld.service 
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
停用selinux
[root@gym ~]# setenforce 0
配置文件中的selinux不在启动
[root@gym ~]# vim /etc/selinux/config 
该服务器的作用是发布nginx的web项目
安装nginx
[root@gym ~]# yum -y install --downloadonly --downloaddir=./soft/ nginx
配置一个本地的nginx仓库
只下载不安装 yum -y install --downloadonly --downloaddir=./soft/
创建本地仓库,安装createrepo
[root@gym ~]# yum -y install createrepo
安装完成dreaterepo,用于创建本地仓库
使用createrepo生成仓库文件
soft目录中生成一个repodata目录
[root@gym ~]# createrepo ./soft/
检查soft目录中是不是保存了一个repodata文件
[root@gym ~]# tree ./soft
在/etc/yum.
文件共享服务之nfs_smb

NFS(Network File System)⽹络⽂件系统
主要⽤于linux系统上实现⽂件共享的⼀种协议,其客户端主要是Linux
没有⽤户认证机制,且数据在⽹络上传送的时候是明⽂传送,⼀般只能在局域
⽹中使⽤
⽀持多节点同时挂载及并发写⼊
企业应⽤:为集群中的web server提供前端端存储
该服务包括的组件:
RPC(Remote Procedure Call Protocol):
远程过程调⽤协议,它是⼀种通过⽹络从远程计算机程序上请求服务,不需要了解
底层⽹络技术的协议。
rpcbind //负责NFS的数据传输,远程过程调⽤ ==tcp/udp协议 端⼝
111==
nfs-utils //控制共享哪些⽂件,权限管理
[root@web-server ~]# systemctl stop firewalld
[root@web-server ~]# systemctl disable firewalld
[root@web-server ~]# vim /etc/selinux/config 
SELINUX=disabled
[root@web-server ~]# yum -y install nginx
[root@web-server ~]# ls /usr/share/nginx/html/
50x.html  css  favicon.ico  index.html  js  歌单.png
[root@web-server ~]# vim /usr/share/nginx/html/index.html 
<html><body><img src="歌单.png"/></body></html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值