nfs

centos7搭建NFS服务

落爺英雄遲暮 提交于 2019-11-28 04:15:20
服务器端 139.155.90.78 客户端 192.168.198.146 先查看自己的系统有没有安装rpcbind 和nfs-utils rpm -qa nfs-utils rpcbind 若使用命令后出现如下结果则说明已经安装 若没有的话可以 yum install nfs-utils rpcbind 安装完成之后 systemctl start rpcbind.service systemctl start nfs.service (一定是先启动rpcbind服务后开启nfs服务) 启动过后可以查看两个服务的状态 关闭防火墙服务 systemctl stop firewalld.service 在服务端创建目录 我在该目录下创建了一个文件 mkdir /home/wjs-nfs touch wjs.txt 之后便是配置目标用户以及共享目录 vim /etc/exports (一开始该文件是空的) 一行代表一个配置 /home/wjs-nfs 192.168.198.146(ro) (共享目录) (客户端主机ip) (共享文件选项配置,,不同选项用 ,(逗号) 隔开) 具体选项 ro:表示只读权限       rw:读写权限       sync:数据同步写内存硬盘       async:将数据先保存在内存缓冲区中,必要时才写入磁盘;       all_squash

NFS

被刻印的时光 ゝ 提交于 2019-11-28 03:57:08
参考 centos7.1安装配置NFS共享文件系统 centos7 下nfs的配置 CentOS7安装配置 NFS nfs设置固定端口并添加防火墙规则 centos7 安装nfs和设置权限问题 搭建简易NFS服务 1. 安装 # master yum install nfs-utils rpcbind -y # client yum install nfs-utils -y 2. 配置 # 提前创建目录 mkdir -p /data/test # 允许 "100.64.192.0/18" 网段的主机读写,"*" 表示允许任何主机 cat << EOF > /etc/exports /data/test 100.64.192.0/18(rw,sync) EOF # 使配置生效 # exportfs -arv exportfs -rv 3. 启动 # 开机启动 systemctl enable rpcbind systemctl enable nfs-server # 启动 systemctl restart rpcbind systemctl restart nfs-server # 验证 rpcinfo -p exportfs # 查看挂载目录权限 cat /var/lib/nfs/etab 4. 固定端口(optional) # 去掉以下内容的注释,如无则添加; #

NFS共享服务

爷,独闯天下 提交于 2019-11-28 03:13:18
一、NFS简介    端口号:TCP、UDP 111 端口 (这是RPC的端口,NFS没有固定端口)   NFS(Network File System)网络文件系统,是一种基于 TCP/IP 传输的网络文件系统协议,最初由 SUM 公司开发。通过使用 NFS协议,客户机可以像访问本地目录一样访问远程服务器中的共享资源。   NFS 没有用户认证机制,而且数据在网络上明文传输,所以安全性很差,一般只能在局域网中使用。NFS服务的实现依赖于 RPC (Remote Process Call)远程过程调用机制,以完成远程到本地的映射过程。    nfs-utils软件包用于NFS共享发布和访问,rpcbind软件包用于RPC支持。 二、搭建nfs服务共享文件 1 在服务器端安装NFS服务软件包并开启,服务器地址:192.168.5.21 [ root@localhost ~] # mount /dev/sr0 /media [ root@localhost ~] # yum -y install nfs-utils rpcbind [ root@localhost ~] # systemctl start nfs [ root@localhost ~] # systemctl start rpcbind 2 关闭防火墙 [ root@localhost ~] # iptables -F

Ways to improve git status performance

偶尔善良 提交于 2019-11-28 03:05:37
I have a repo of 10 GB on a Linux machine which is on NFS. The first time git status takes 36 minutes and subsequent git status takes 8 minutes. Seems Git depends on the OS for caching files. Only the first git commands like commit , status that involves pack/repack the whole repo takes a very long time for a huge repo. I am not sure if you have used git status on such a large repo, but has anyone come across this issue? I have tried git gc , git clean , git repack but the time taken is still/almost the same. Will sub-modules or any other concepts like breaking the repo into smaller ones help?

NFS共享服务

坚强是说给别人听的谎言 提交于 2019-11-28 02:43:13
NFS 网络文件系统 C/S rpc 111 远程过程调用机制 S:设置一个共享目录 C:挂载使用这个共享目录 mount 服务器 yum -y install nfs-utils rpcbind //安装nfs和rpc [root@yum ~]# mkdir /data //创建公共文件夹 [root@yum ~]# vim /etc/exports //修改配置文件 [root@yum ~]# cat /etc/exports /data 192.168.2.0/24(rw) //允许查看的网段与权限 [root@yum ~]# systemctl start rpcbind //切记 首先开启rpc服务 在开启nfs [root@yum ~]# systemctl enable rpcbind [root@yum ~]# systemctl start nfs [root@yum ~]# systemctl enable nfs 客户机 [root@www ~]# yum -y install nfs-utils //可以不用安装nfs 但是安装这个 是为了showmount 命令 [root@www ~]# showmount -e 192.168.2.30 //服务器的IP地址 [root@www ~]# mount 192.168.2.30:/data /opt/ //

nfs

拥有回忆 提交于 2019-11-28 02:39:36
修改/etc/sysconfig/nfs 来固定端口 LOCKD_TCPPORT=32803 #建议修改其他 LOCKD_UDPPORT=32769 #建议修改其他 查看端口 rpcinfo -p 防火墙开启nfs(2249/tcp) rpc-bind mountd(2248/tcp) 还有开启共享的端口 修改/etc/exports /share 192.168.100.0/24 systemctl restart nfs mount 192.168.100.1:/share /mnt/share 自动挂载方法1,写到fstab 192.168.100.1:/share /mnt/share nfs defaults xfs 0 0 方法2,autofs vim /etc/auto.msater vim /etc/auto,nfs share - fstype=nfs,rw,sync 192.168.100.1:/share 来源: https://www.cnblogs.com/smlie/p/11386615.html

Symfony2 and Twig performance in a vagrant box

人走茶凉 提交于 2019-11-28 01:28:52
问题 Prerequisites: http://box.scotch.io/ vagrant box 2. # -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config.vm.box = "scotch/box" config.vm.network "private_network", ip: "192.168.33.10" config.vm.network "forwarded_port", guest: 80, host: 80 config.vm.network "forwarded_port", guest: 3306, host: 3306 config.vm.network "forwarded_port", guest: 443, host: 443 config.vm.network "forwarded_port", guest: 1081, host: 1081 config.vm.hostname = "scotchbox" config.vm.synced

Locking sqlite file on NFS filesystem possible?

强颜欢笑 提交于 2019-11-28 00:51:35
Let's say there are two python scripts that want to write data to the same table which is stored in an SQLite file using the sqlite3 module. The SQLite-file is stored on an NFS filesystem. In the SQLite-FAQ I read: SQLite uses reader/writer locks to control access to the database. [...] But use caution: this locking mechanism might not work correctly if the database file is kept on an NFS filesystem. This is because fcntl() file locking is broken on many NFS implementations. You should avoid putting SQLite database files on NFS if multiple processes might try to access the file at the same

NFS

浪子不回头ぞ 提交于 2019-11-28 00:24:35
NFS:网络文件系存在局域网中,不太安全 无固定端口号 随机端口10000以上 端口号范围:0-65535 NFS文件共享 本地目录映射到远端 cs架构 S(服务器):设置一个共享目录 C:挂载使用 rpc端口号111 服务器:nfs服务共享 mkdir /data #创建一个共享目录 vim /etc/exports #进里面编辑闯将 /data 服务器允许访问网段信息 /24(rw)给与读写权限 yum -y install nfs-utils rpcbind 安装所需软件 systemctl restart nfs rpcbind #启动服务 进入测试机客户端 [root@localhost ~]# showmount -e 192.168.100.122 Export list for 192.168.100.122: #查看信息 [root@localhost ~]# mount 192.168.100.122:/data /opt/ #挂载到/opt下 /etc/fsab 设置开机自动挂载 vim /etc/fstab 服务下的/data下的目录共享 修改里面的内容在客户端中的opt文件夹下可以发现 [root@localhost data]# mkdir -v test2.txt mkdir: 已创建目录 "test2.txt" [root@localhost

HDFS NFS GateWay

倾然丶 夕夏残阳落幕 提交于 2019-11-28 00:00:32
NFS网关支持NFSv3,并允许将HDFS作为客户端本地文件系统进行挂载。目前,NFS Gateway支持并启用以下使用模式: 用户可以通过NFSv3客户端兼容操作系统上的本地文件系统浏览HDFS文件系统。 用户可以将文件从HDFS文件系统下载到其本地文件系统。 用户可以将文件从本地文件系统直接上传到HDFS文件系统。 用户可以通过挂载点将数据直接传输到HDFS。支持文件追加,但不支持随机写入。 CDH部署NFS Gateway 可以在data01.bigdata-heboan.com(192.168.48.129)上验证服务是否启动 rpcinfo -p $nfs_server_ip 现在找一台客户端机器(192.168.48.130) 安装nfs yum install rpcbind nfs-utils -y 验证 HDFS命名空间是否已导入并可以挂载 showmount -e $ nfs_server_ip 来源: https://www.cnblogs.com/sellsa/p/11381569.html