VPS参考测评推荐
专注分享VPS主机优惠信息
衡天云优惠活动
华纳云最新优惠促销活动
jtti最新优惠促销活动

Linux之使用MogileFS分布式文件系统并使用nginx实现反向代理

locvps
主机参考:VPS测评参考推荐/专注分享VPS服务器优惠信息!若您是商家可以在本站进行投稿,查看详情!此外我们还提供软文收录、PayPal代付、广告赞助等服务,查看详情!
我们发布的部分优惠活动文章可能存在时效性,购买时建议在本站搜索商家名称可查看相关文章充分了解该商家!若非中文页面可使用Edge浏览器同步翻译!PayPal代付/收录合作

MogileFS是一套高效的文件自动备份组件,由Six Apart开发,广泛应用在包括LiveJournal等web2.0站点上。 MogileFS的特性: 工作在应用层,无单点,自动文件复制(复制的最小单位是class,而不是文件),传输中立且使用nfs或者http协议进行传输。 MogileFS的结构组成: tracker:是mogilefs的核心,是一个调度器,通过数据库来保存元信息,包括daemon,class,host等信息,主要职责:监控后端mogstore节点,并指示store节点完成数据的添加,删除,查询,及节点之间的复制. mogstore:实际数据的存储位置,通常伪一个http服务器. database:用来保存节点的全局信息.

Mogilefs is a set of efficient automatic file backup component developed by six apart, which is widely used in Web2.0 sites including livejournal. Features of mogilefs: working in the application layer, no single point, automatic file replication (the minimum unit of replication is class, not file), transmission neutral and using NFS or HTTP protocol for transmission. The structure of mogilefs is composed of: Tracker: it is the core of mogilefs, and it is a scheduler. It stores meta information through database, including the information of daemon, class, host, etc. main responsibilities: monitor the backend mogstore node, and instruct the store node to complete data addition, deletion, query, and replication between nodes. Mogstore: the storage location of actual data, usually pseudo one hour TTP server. Database: used to save the global information of nodes

1.安装MogileFS a.下载MogileFS MogileFS-Server:https://github.com/mogilefs/MogileFS-Server MogileFS-Utils:https://github.com/mogilefs/MogileFS-Utils perl-MogileFS-Client:https://github.com/mogilefs/perl-MogileFS-Client b.安装: 将文件解压并进入文件内

1. Install mogilefs A. download mogilefs mogilefs server: https://github.com/mogilefs/mogilefs-server mogilefs-utils: https://github.com/mogilefs/mogilefs-utils perl-mogilefs-client: https://github.com/mogilefs/perl-mogilefs-client B. install: extract and enter the file

    [root@clone3 nginx-1.11.12]# make Makefile.PL

    [root@clone3 nginx-1.11.12]# make Makefile.PL

    [root@clone3 nginx-1.11.12]# make  make install

    [root@clone3 nginx-1.11.12]# make  make install

    [root@clone3 nginx-1.11.12]# yum install perl-IO-AIO123123

    [root@clone3 nginx-1.11.12]# yum install perl-IO-AIO123123

2.配置文件讲解

2. Profile explanation

    参数解答:  总用量 8

Parameter answer: total consumption 8

3.启动并测试

3. Start and test

1.创建/var/run/mogilefsd目录并修改属组属主

1. Create / var / run / mogilefsd directory and modify the genus, group and owner

    [root@Master mogilefs]# mkdir -p  /var/run/mogilefsd

    [root@Master mogilefs]# mkdir -p  /var/run/mogilefsd

           [root@Master mogilefs]# chown -R mogilefs.mogilefs /var/run/mogilefsd/

           [root@Master mogilefs]# chown -R mogilefs.mogilefs /var/run/mogilefsd/

2.创建/mog/mogdata目录并修改属组属主

2. Create / MOG / mogdata directory and modify the genus, group, and owner

    [root@Master mogilefs]# mkdir -p /mog/mogdata

    [root@Master mogilefs]# mkdir -p /mog/mogdata

    [root@Master mogilefs]# chown -R mogilefs.mogilefs /mog/mogdata/

    [root@Master mogilefs]# chown -R mogilefs.mogilefs /mog/mogdata/

3.启动mogilefsd进程和mogstored进程

3. Start the mogilefsd process and the mogstored process

    [root@Master mogilefs]# service mogilefsd start

    [root@Master mogilefs]# service mogilefsd start

        Starting mogilefsd                                         

        Starting mogilefsd                                         

    [root@Master mogilefs]# service mogstored start

    [root@Master mogilefs]# service mogstored start

        Starting mogstored                                         

        Starting mogstored                                         

**此处的启动脚本是使用rpm包安装,并且自带的,一般使用make安装的没有服务脚本**

**The startup script here is installed by using RPM package, and comes with it. Generally, there is no service script installed by using make**

4.使用管理工具配置mogstord节点主机

4. Use the management tool to configure the mogstore node host

                      **文件实际访问位置**

* file actual access location**

5.使用浏览器访问 这样一个mogilefs分布式存储就设置好了,只是mogilefsd进程和mogstored进程在统一主机上。 6.负载均衡设计结构 7.使用nginx实,现反向代理 使用nginx反向代理mogilefs时,要用到第三方模块在能使实现代理,nginx身不支持mogilefs的代理,下载模块快为nginx_mogilefs_module,下载地址:http://www.grid.net.ru/nginx/download/nginx_mogilefs_module-1.0.4.tar.gz

5. Use a browser to access such a mogilefs distributed storage. Only the mogilefsd process and the mogstored process are on the unified host. 6. Load balancing design structure 7. Using nginx implementation, now the reverse agent. When using nginx reverse agent mogilefs, the third-party module should be used to realize the agent. Nginx does not support the agent of mogilefs. The download module is fast as nginx 65104; mogilefs ﹐ module, and the download address is http://www.grid.net.ru/nginx/download/nginx ﹐ mogilefs ﹐ module-1.0.4.tar.gz

        **详细参数请参考官方文档:http://www.grid.net.ru/nginx/mogilefs.en.html**

* for detailed parameters, please refer to the official document: http://www.grid.net.ru/nginx/mogilefs.en.html**

8.配置两台mogilefs主机 在配置两台主机是,mogilefsd进程会在数据库中读取mogstord节点的信息,在配置时按照上述阐述仅可以配置,建议在一个mogilefsd节点上配置,另一个节点可以在数据库中读到。 9.测试结果 

8. Configure two mogilefs hosts. When configuring two hosts, the mogilefsd process will read the information of the mogstord node in the database. During the configuration, it can only be configured according to the above description. It is recommended to configure on one mogilefsd node, and the other node can be read in the database. 9. Test results

 

 

--------------------------------------------------------------
主机参考,收集国内外VPSVPS测评主机测评云服务器虚拟主机独立服务器,国内外服务器高性价比建站主机相关优惠信息@zhujicankao.com
详细介绍和测评国外VPS主机,云服务器,国外服务器,国外主机的相关优惠信息,商家背景,网络带宽等等,也是目前国内最好的主机云服务器VPS参考测评资讯优惠信息分享平台

这几篇文章你可能也喜欢:

本文由主机参考刊发,转载请注明:Linux之使用MogileFS分布式文件系统并使用nginx实现反向代理 https://zhujicankao.com/14229.html

【腾讯云】领8888元采购礼包,抢爆款云服务器 每月 9元起,个人开发者加享折上折!
打赏
转载请注明原文链接:主机参考 » Linux之使用MogileFS分布式文件系统并使用nginx实现反向代理
主机参考仅做资料收集,不对商家任何信息及交易做信用担保,购买前请注意风险,有交易纠纷请自行解决!请查阅:特别声明

评论 抢沙发

评论前必须登录!