Difference between revisions of "MogileFS setup"

From Dreamwidth Notes
Jump to: navigation, search
(adding some db setup info.)
Line 1: Line 1:
Note:  Much of this information was pulled from [http://mogilefs.pbwiki.com/HowTo the MogileFS Wiki] combined with the INSTALL.txt instructions from the mogilefs source.
+
Note:  This page is still a draft. Much of this information was pulled from [http://mogilefs.pbwiki.com/HowTo the MogileFS Wiki] combined with the INSTALL.txt instructions from the mogilefs source.
 
+
Note 2:  This page is still a draft.
+
  
 
== Configuring MogileFS for a Dreamwidth development installation ==
 
== Configuring MogileFS for a Dreamwidth development installation ==
Line 7: Line 5:
 
These are instructions for getting a simple MogileFS installation working on a single instance (likely development/testing) Dreamwidth installation.  This is ''not'' a full setup document for a production, multi-server environment.
 
These are instructions for getting a simple MogileFS installation working on a single instance (likely development/testing) Dreamwidth installation.  This is ''not'' a full setup document for a production, multi-server environment.
  
Basic Steps
+
=== Basic Steps ===
  
 
* Install prerequisites
 
* Install prerequisites
Line 15: Line 13:
 
* Set up Dreamwidth installation to work with MogileFS
 
* Set up Dreamwidth installation to work with MogileFS
  
Install Prerequisites:
+
=== Install Prerequisites ===
  
 
On your Dreamwidth machine:
 
On your Dreamwidth machine:
Line 33: Line 31:
 
You should have all of the other prerequisites installed as part of Dreamwidth.
 
You should have all of the other prerequisites installed as part of Dreamwidth.
  
Build and install MogileFS Debian packages
+
=== Build and Install MogileFS Debian packages ===
  
 
You should already have the source available from the scratch install.  So
 
You should already have the source available from the scratch install.  So
Line 46: Line 44:
 
   $ sudo dpkg -i packages/mogilefsd_1.00-2_all.deb packages/mogilefs-utils_0.01-1_all.deb packages/mogstored_1.00-2_all.deb
 
   $ sudo dpkg -i packages/mogilefsd_1.00-2_all.deb packages/mogilefs-utils_0.01-1_all.deb packages/mogstored_1.00-2_all.deb
  
 +
=== Create MogileFS database ===
  
Create MogileFS database
+
You should already have MySQL installed for your Dreamwidth installation.  So log in as root there and create the mogilefs user:
 
+
You should already have mysql installed for your Dreamwidth installation.  So log in as root there and create the mogilefs user:
+
  
 
  $ mysql -u root -p
 
  $ mysql -u root -p
Line 60: Line 57:
  
 
  $ /usr/bin/mogdbsetup --yes --dbname=mogilefs --dbuser=mogile --dbpassword=mogilepw
 
  $ /usr/bin/mogdbsetup --yes --dbname=mogilefs --dbuser=mogile --dbpassword=mogilepw
 +
 +
[[Category: Dreamwidth Installation]]

Revision as of 21:57, 11 January 2009

Note: This page is still a draft. Much of this information was pulled from the MogileFS Wiki combined with the INSTALL.txt instructions from the mogilefs source.

Configuring MogileFS for a Dreamwidth development installation

These are instructions for getting a simple MogileFS installation working on a single instance (likely development/testing) Dreamwidth installation. This is not a full setup document for a production, multi-server environment.

Basic Steps

  • Install prerequisites
  • Build and install MogileFS Debian packages
  • Create MogileFS Database
  • Configure MogileFS servers
  • Set up Dreamwidth installation to work with MogileFS

Install Prerequisites

On your Dreamwidth machine:

$ sudo apt-get install debhelper dpkg-dev fakeroot

Install prereqs for perlbal:

$ sudo apt-get install libio-aio-perl libdanga-socket-perl libnet-netmask-perl

Install libperlbal

$ cd $LJHOME/cvs/perlbal
$ dpkg-buildpackage -rfakeroot
$ sudo dpkg -i ../libperlbal-perl_1.70-1_all.deb

You should have all of the other prerequisites installed as part of Dreamwidth.

Build and Install MogileFS Debian packages

You should already have the source available from the scratch install. So

 $ cd $LJHOME/cvs/mogilefs

Now you have to do a two-phase build and install:

 $ bin/build-all-debian.sh
 $ sudo dpkg -i ./api/perl/libmogilefs-perl_1.00-1_all.deb
 $ bin/build-all-debian.sh
 $ sudo dpkg -i packages/mogilefsd_1.00-2_all.deb packages/mogilefs-utils_0.01-1_all.deb packages/mogstored_1.00-2_all.deb

Create MogileFS database

You should already have MySQL installed for your Dreamwidth installation. So log in as root there and create the mogilefs user:

$ mysql -u root -p
mysql> create database mogilefs;
mysql> grant all on mogilefs.* to 'mogile'@'%' identified by 'mogilepw';
mysql> flush privileges;
mysql> quit

Then go ahead and create the schema using mogdbsetup

$ /usr/bin/mogdbsetup --yes --dbname=mogilefs --dbuser=mogile --dbpassword=mogilepw