本文介绍了NFS drupal实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现NFS是Drupal文件共享中多服务器设置的最佳方式

I found out NFS is the best way for Multi Server setup in Drupal File sharing

有人可以告诉我这是如何工作的。

Can someone tell me how this works.

我有两个服务器,Drupal文件连接到第三台服务器中的公用数据库。

I have two Servers with Drupal Files connected to a common db in third Server

我还有一个服务器文件,我如何链接这个使用NFS的Drupal服务器和NFS的工作原理?

I have one more Server for files how shall I link this too both Drupal Servers using NFS and how NFS works?

当用户从第一个drupal服务器上传文件时,它会在Shared Server中创建一个副本,或者使用

when a user uploads the file from first drupal server does it make a copy in Shared Server or makes a

两个drupal服务器中的符号(软)链接,并将文件添加到共享服务器中?

symbolic(soft) link in both drupal servers and adds the file in shared server?

有人可以告诉我并通过我的MultiServer Drupal安装程序实现NFS的链接。

Can someone please tell me and pass me a link to implement NFS for my MultiServer Drupal Setup.

推荐答案

让我们假设Server-A(ip:aaaa)是要保存文件的服务器,Server-B(ip:bbbb)和Server-C(ip:cccc)将具有drupal。在Server-A中,您可能将文件存储在/ store文件夹中。这将被安装到Server-B和Server-c中的文件夹/ mnt / store。

Let us assume Server-A (ip: a.a.a.a) is the server where you are going to save the files, Server-B(ip: b.b.b.b) and Server-C (ip: c.c.c.c) will have drupal. In Server-A you may be storing the files in /store folder. This is to be mounted to folder /mnt/store in Server-B and Server-c.

为此,您需要在Server-A中安装nfs-kernal-server和所有三个服务器上的nfs-common和portmap。 NFS依赖于远程过程调用(RPC),并且需要使用portmap服务将RPC请求映射到正确的服务。

For this you need to install nfs-kernal-server in Server-A and nfs-common and portmap on all three servers. NFS relies upon Remote Procedure Call(RPC) and portmap service is required to map RPC requests to the correct services.

在Server-A中执行以下配置:

In Server-A do these configurations:

sudo apt-get install nfs-kernel-server portmap nfs-common
sudo mkdir -p /mnt/nfstest
sudo chmod 777 /mnt/nfstest
sudo mount  --bind /store /mnt/nfstest

sudo vi / etc / default / nfs-kernel-server 在此文件集中 NEED_SVCGSSD =否

sudo vi / etc / default / nfs-common 在此文件集中: NEED_IDMAPD = code>和 NEED_GSSD =否

sudo vi / etc / idmapd。 conf 在此文件中 [Mapping] 设置 nobody-User = nobody nobody-Group = nogroup

sudo vi /etc/hosts.deny添加: portmap mountd nfsd statd lockd rquotad:ALL

sudo vi / etc / hosts.allow a dd this: portmap mountd nfsd statd lockd rquotad:bbbb,cccc {ipaddresses}

sudo vi /etc/hosts.allow add this: portmap mountd nfsd statd lockd rquotad : b.b.b.b, c.c.c.c {ipaddresses}

sudo vi / etc / exports 添加: / mnt / nfstest bbbb(rw,sync,no_subtree_check,fsid = 0) / mnt / nfstest cccc(rw,sync,no_subtree_check,fsid = 0)

sudo exportfs -ra
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-kernel-server restart

在Server-B和Server-C中执行此操作

In Server-B and Server-C do this

sudo apt-get install portmap nfs-common
sudo vi /etc/hosts.deny SET: `portmap : ALL`

sudo vi /etc/hosts.allow SET: portmap:aaaa {Server-A的ipaddress}

sudo vi /etc/hosts.allow SET: portmap : a.a.a.a {Server-A's ipaddress}

sudo vi / etc / default / nfs-common SET: NEED_IDMAPD = / code>和 NEED_GSSD =否

sudo vi / etc / idmapd .conf [Mapping] 添加 nobody-User = nobody nobody-Group = nogroup

modprobe nfs
mkdir /mnt/store
sudo mount -t nfs4 a.a.a.a:/ /mnt/store

这篇关于NFS drupal实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 22:50