MojoMojo Detailed Installation Guide
Overview
MojoMojo is a sophisticated web application that requires some effort to install and configure. This article steps one through the process so they can reap the benefits of a high grade web page authoring system.
CPAN to Install the Software
Use cpan client
cpan MojoMojo
Many Module Dependencies
MojoMojo depends on a lot of good modules. CPAN will ask if you want to install any modules MojoMojo relies on that you don’t current have installed. Say yes to all mandatory modules, and make a decision if you want optional modules. Some Formatter modules are optional (e.g DocBook). Say no unless you want them. It will make install easier by not requiring installation of certain system pacakges (docboo, xlst etc.)1.
Time Consuming
The module installation is the slowest part of the process, particularly the first time you install MojoMojo. It may take several minutes depending on how many modules you need.
Tests
Goddess willing all modules needed will pass their tests as will MojoMojo pass its own tests.
If you have failed test, you may choose to proceed with ‘force install MojoMojo’ from cpan command.
In particular there may be times when a module MojoMojo requires has a test that is broken (oh my goodness).
jpeg test failure with t/schema_DBIC_Attachment.t
If you see something like:
t/schema_DBIC_Attachment.t .. 1/13 format 'jpeg' not supported - formats bmp, ico, pnm, raw, sgi, tga available for reading at /home/user/D/MojoMojo-0.999028/lib/MojoMojo/Schema/Result/Photo.pm line 177.
You need to make sure you have libjpeg dev package4 installed (e.g. libjpeg62-dev) and then re-install Imager[5] You can ‘force intall Imager’ if you are at the latest version already.
Debian, Ubuntu packages for full MojoMojo support
libpng12-dev libjpeg62-dev libxslt1-dev libexpat1-dev libgdbm-dev libgcrypt11-dev docbook-xsl docbook-xsl-doc-html libfreetype6-dev
Configuration of MojoMojo
Once all the necessary modules are installed, one needs to configure MojoMojo. One will need to locate where MojoMojo was installed and find the configuration file:libexpat1-dev
Configuration File
The MojoMojo configuration file is:
mojomojo.conf
It lives in the same directory as MojoMojo/INSTALL which should be just under wherever MojoMojo.pm ended up. For example:
/usr/local/share/perl/5.10.0/MojoMojo/mojomojo.conf
Locating mojomojo.conf
Use locate
If you are you fortunate enough to have the locate utility then do:
updatedb locate mojomojo.conf
Print Where Perl Finds MojoMojo.pm
Another way to find the configuration file is to use the location of MojoMojo.pm The mojomojo.conf file lives in the MojoMojo/ subdirectory of where MojoMojo.pm is found. One can find3 where MojoMojo.pm is as follows:
perl -MMojoMojo -le 'print $INC{"MojoMojo.pm"}'
This will print out something like:
/usr/local/share/perl/5.10.0/MojoMojo.pm
Once you’ve located your configuration file then it’s time to make some edits to match your particular needs.
Database Configuration
The database connection information is the most important. It is standard DBI connection information.
One can choose amongst PostgreSQL, MySQL or SQLite. They are configured respectively:
PostgreSQL: connect_info dbi:Pg:dbname=mojomojo;host=localhost;port=5432 connect_info user connect_info password MySQL: connect_info dbi:mysql:database=mojo_database;host=localhost connect_info user connect_info password SQLite: connect_info dbi:SQLite:/var/lib/mojomojo/mojomojo.db connect_info not_used connect_info not_used
NOTE: SQLite does not require a user/password. Access privileges are based on the file permissions of mojomojo.db.
Search Index
Default
One can leave the default of:
index_dir __path_to(index)__
which will cause the search engine (KinoSearch) to place its index/ directory under where mojomojo.conf was installed2.
Custom
A custom directory path for MojoMojo search index files can be specified in mojomojo.conf as follows:
index_dir /var/lib/mojomojo/search_index
Uploads
Default
One can leave the default of:
attachment_dir __path_to(uploads)__
which will cause the uploads to be placed in the uploads/ directory under where mojomojo.conf was installed.
Custom
A custom directory path for upload files can be specified in mojomojo.conf as follows:
attachment_dir /var/lib/mojomojo/uploads
Preserve Your Configuration
One can use simply the mojomojo.conf file to configure MojoMojo for their needs, but a better idea is to copy mojomojo.conf over to mojomojo_local.conf after it’s been configured. This local conf file will override settings in mojomojo.conf and be preserved upon upgrades of your MojoMojo installation that create a new mojomojo.conf.
Initialize the Database
Now that we have database connection information, we can intialize the MojoMojo database. This process asks a few questions about your particular MojoMojo instance like a site name and admin account information. Run the following from the directory where mojomojo.conf lives:
root@hanuman:/usr/local/share/perl/5.10.0/MojoMojo# mojomojo_spawn_db.pl
and you will see the following set of questions to which you can accept the default or type in something different:
It's time to set some default values: Name of the wiki? [default MojoMojo] Username of the admin user? [default admin] Password of the admin user? [default admin] Full name of the admin user? [default root] E-Mail address of the admin user? [default root@localhost] E-Mail address of the Anonymous user? [default anonymous.coward@localhost] Deploying schema to dbi:SQLite:/var/www/db/mojomojo.db Creating initial data Success!
Start up MojoMojo
Now you are ready to reap the dividends of installation of configuration. Start up the MojoMojo application with:
mojomojo_server.pl -p 3000
This will start an instance on port 3000. You should see something like:
You can connect to your server at http://localhost:3000
Login to MojoMojo
Go the URL you are presented with after start MojoMojo and Login with the admin account you created which defaults to:
user: admin password: admin
Additonal Help
MojoMojo IRC
Generous installation help can often be found at:
server: irc.perl.org channel: #mojomojo
Mailing List
If you prefer asynchronous communication try the mailing list at:
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
1 Imager requires some development libraries for graphics such as jpeg or png.
2 MojoMojo will attempt to create both the search index and uploads directories, but it must have adequate permissions to succeed. One may always create them by hand and set their permissions appropriately in which case chmod, chown, and/or chgrp are your friends.
3 Thanks to Khisanth for the tip.
4 Debian packages for full MojoMojo support: libpng12-dev libjpeg62-dev libxslt1-dev libgdbm-dev libgcrypt11-dev docbook-xsl docbook-xsl-doc-html libfreetype6-dev
5 Debian based systems require the package build-essential to be installed before one can install Perl modules such as Imager which need to compile extensions.
Showing changes from previous revision. Removed | Added
