MogileFS system installation configuration instance

Source: Internet
Author: User
Tags pkill

MogileFS system installation configuration instance

Tutorial principle:

MogileFS is an open-source Distributed File System used to build a distributed file cluster developed by DangaInteractive under LiveJournal. The Danga Team has developed good open-source projects including Memcached, MogileFS, and Perlbal: (Note: perlbal is a powerful reverse proxy server written in Perl ). MogileFS is an Open Source Distributed File System. Main features include: Application Layer components, no spof, automatic file replication, better reliability than RAID, no RAID support, etc ...... The core roles are as follows:

Tracker node: stores the metadata information of each node file in the database to save the storage location distribution of all keys in each domain. This allows you to conveniently retrieve and locate data and monitor nodes at the same time, inform the client of the location of the storage zone and command the storage node to copy data copies. The process name is mogilefsd (7001 ).

Database node: provides data access services for tracker nodes.

Storage node: converts keys in a specified domain to their unique file names and stores them in a specified device file. The converted file name is a value. The storage node automatically maintains the key-value relationship, because the storage node uses http for data transmission, it depends on perlbal. The storage node front-end can use nginx for reverse proxy, but the nginx-mogilefs-module-master module must be installed for name conversion, process name: mogstored (7501), perbal (7500 ).

Domain: the key value in a Domain is unique. A MogileFS can have multiple domains, and the Domain can be used to store containers of different application types of data.

Host: each storage node is called a Host. A Host can have multiple storage devices (separate hard disks). Each device has an ID, and Domain + Fid is used to locate files.

Class: The minimum unit for copying, manages file attributes, and defines the number of copies of files stored on different devices.

Experimental System: CentOS 6.6 _ x86_64

Prerequisites: Prepare the compiling environment in advance, and disable both firewall and selinux.

Tutorial Description: There are three hosts in this experiment. IP address and role allocation are shown in the topology.

Http://pan.baidu.com/s/1dDyfBGl used in the test with mariadb software.

------------------------------------------ Split line ------------------------------------------

FTP address: ftp://ftp1.bkjia.com

Username: ftp1.bkjia.com

Password: www.bkjia.com

Install and configure an instance in the LinuxIDC.com \ MogileFS System on April 9

For the download method, see

------------------------------------------ Split line ------------------------------------------

MogileFS sets Memcached

Use Nginx in MogileFS

Use Nginx In the Open-Source Distributed File System MogileFS

Custom Nagios monitoring MogileFS storage node script

Tutorial topology:

1. Install MySQL and MogileFS on MySQL 19.66

Install mysql:

tar xf mariadb-10.0.20-linux-x86_64.tar.gz  -C /usr/local/cd /usr/local/ln -sv mariadb-10.0.20-linux-x86_64 mysqluseradd -r mysqlmkdir -pv /mydata/datachown -R mysql.mysql /mydata/data/cd mysql/chown -R root.mysql .scripts/mysql_install_db --user=mysql --datadir=/mydata/data/cp support-files/my-large.cnf /etc/my.cnfcp support-files/mysql.server /etc/init.d/mysqldchkconfig --add mysqldchkconfig mysqld on

2. Install YAML:

wget http://search.cpan.org/CPAN/authors/id/I/IN/INGY/YAML-1.15.tar.gz
tar xf YAML-1.15.tar.gz
cd YAML-1.15
perl Makefile.PL
make && make install

3. Use cpan to install MogileFS online and related modules:

Cpan -----------------------------------> install MogileFS: Server // enter yes and press enter if yes is entered.

4. Create an authorized user:

/usr/local/mysql/bin/mysql------------------------------------------>
USE mysql;
UPDATE user SET Password=PASSWORD(123456) WHERE User='root';GRANT ALL ON mogilefs.* TO 'moguser'@'192.168.19.%' IDENTIFIED BY '123456';
GRANT ALL ON *.* TO 'root'@'192.168.19.%' IDENTIFIED BY '123456';FLUSH PRIVILEGES;

5. initialize the database:

mogdbsetup --dbhost=192.168.19.66 --dbrootuser=root --dbrootpass=123456 --dbuser=moguser --dbpass=123456 --yes

If the following error occurs, run the command again. Generally, the data can be imported normally:

6. Create a Tracker configuration file:

mkdir /etc/mogilefsvim /etc/mogilefs/mogilefsd.conf--------------------------------------------------------->db_dsn = DBI:mysql:mogilefs:host=192.168.19.66db_user = moguserdb_pass = 123456conf_port = 7001listener_jobs = 5node_timeout = 5rebalance_ignore_missing = 1

7. Create a mogile user and start the test. Check the port and check that 7001 has started listening. You can also use "pkill mogilefsd" to stop the mogilefsd service.

useradd mogilesu mogile -c "mogilefsd -c /etc/mogilefs/mogilefsd.conf --deamon"

2. Install MogileFS on 19.74 and 19.76

1. Install YAML:

wget http://search.cpan.org/CPAN/authors/id/I/IN/INGY/YAML-1.15.tar.gztar xf YAML-1.15.tar.gzcd YAML-1.15perl Makefile.PLmake && make install

2. Use cpan to install MogileFS online:

cpan-------------------------------->install MogileFS::Server

3. Create a Storage configuration file:

Mkdir/data/mogdata-pvuseradd mogilechown-R mogile. mogile/data/mogdatamkdir/etc/mogilefsvim/etc/mogilefs/mogstored. conf ---------------------------------------------------> httplisten = 192.168.19.74: 7500 // change the address on 19.76 to mgmtlisten = 192.168.19.74: 7501 docroot =/data/mogdata

4. Start the MogileFS Storage node and check the ports. The Listening Starts at 7500 and 7501. In addition, you can use "pkill mogstored" to stop the mogstored service.

mogstored --daemon

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.