linux下实现web数据同步的四种方式(性能比较)

2019-10-14 21:56:16于海丽

#anonuid=48,指定此用户的id能访问共享文件
#anongid=48指定此组的id能访问共享文件
######################################
[root@jie1 htdocs]# service nfs start  #开启nfs服务
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]
Stopping RPC idmapd:                                       [  OK  ]
Starting RPC idmapd:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
[root@jie1 htdocs]#

web:客户端的配置

1)、安装httpd的软件

[root@jie3 /]# yum -y install httpd

2)、设置web的相关配置,使得web能够提供web服务


[root@jie3 /]# vim /etc/httpd/conf/httpd.conf
########################################
ServerName 172.16.22.3:80
#DocumentRoot "/var/www/html"
<VirtualHost *:80>
   ServerName www.jie.com
   DocumentRoot  /website   #存放网页文件的路径
</VirtualHost>
#######################################
[root@jie3 /]# mkdir /website
[root@jie3 /]# httpd -t
Syntax OK
[root@jie3 /]# service httpd start
Starting httpd:                                            [  OK  ]
[root@jie3 ~]# cd /website/
[root@jie3 website]# ls   #现在查看是没有任何文件
[root@jie3 website]#

实现同步:

1)服务器端设置apache用户对共享的文件有读写权限