# Installing MojoMojo2
{{toc 2-}}
The recommended way install is to follow the GitHub installation steps, so that all MojoMojo files end up in one directory, and you have the latest developer version. If you want to use a release version, after `git clone`, you can list the tags with `git tag`, and then checkout a specific tag: `git checkout <tag_name>`.
## Binaries
* On FreeBSD, install the [p5-MojoMojo package](http://www.freshports.org/www/p5-MojoMojo/).
* On Debian, install [libmojomojo-perl](http://packages.debian.org/unstable/perl/libmojomojo-perl). Instructions for [[Debian6Squeeze|Debian 6 Squeeze]].
## System Requirements
* root privileges. Otherwise, you can still install MojoMojo using [local::lib](http://www.catalystframework.org/calendar/2007/8).
* Perl 5.8+ and Catalyst 5.7+
* database: in theory, any database back-end supported by DBIx::Class. MojoMojo has been [cavite housing](http://www.cavite-housing.com/) successfully tested with SQLite, PostgreSQL and MySQL.
* memory requirements: on Linux, 60Mb per FastCGI process, regardless of the wiki database size or back-end type
### External library dependencies
* `libxml2` for Atom feeds
* image manipulation libraries for attachment support, required by {{cpan Imager}}: `libpng-dev` (or `libpng12-dev`), `libgif-dev`, `libjpeg-dev` (or `libjpeg62-dev`)
* `expat`, `libexpat1-dev` and `aptitude install libxml-parser-perl` for {{cpan XML::Feed}}
* docbook-xsl (debian package name) for {{cpan MojoMojo::Formatter::DocBook}}
<a href="http://jamtanganonline.net/">Jam Tangan Murah</a> <a href="http://www.timbangan.co.id">timbangan</a> <a href="http://penumbuhrambut.net">Penumbuh Rambut</a> <a href="http://www.bisnismodalkecil.org">Bisnis Modal Kecil</a>
## Installation from CPAN
1. [install Catalyst](http://dev.catalyst.perl.org/wiki/installingcatalyst). This can be as easy as `cpan Catalyst::Runtime`
2. install the external libraries. For example on Ubuntu, run:
aptitude install libxml2 libpng-dev libgif-dev libjpeg-dev expat libexpat1-dev docbook-xsl
On Windows, you can find `libxml2` and its dependencies at <http://www.zlatkovic.com/pub/libxml/>. You'll need `libxml2.dll`, `iconv.dll` and `zlib1.dll` in a directory listed in `PATH`.
3. install MojoMojo:
* [latest stable version](http://search.cpan.org/dist/MojoMojo/)
* [latest build](http://github.com/marcusramberg/mojomojo/)
To see how likely the installation tests are to succeed, check the [CPAN Testers status of the MojoMojo dependencies](http://deps.cpantesters.org/?module=MojoMojo;perl=latest).
As with any Catalyst application, `mojomojo_*.pl` scripts will be installed installed in `/usr/local/bin`.
4. [configure MojoMojo](http://search.cpan.org/dist/MojoMojo/lib/MojoMojo/Installation.pod). Usually, you'll want to add a local configuration file overriding values from mojomojo.conf. Since MojoMojo is a Catalyst application, it conforms to the naming convention for such configuration files and settings you add to `mojomojo_local.conf` will override those in `mojomojo.conf` (details at the [Catalyst wiki - What is the precedence of various configuration setting locations?](http://dev.catalystframework.org/wiki/faq#What_is_the_precedence_of_various_configuration_setting_locations.3F).
To point MojoMojo to an arbitrary configuration file, set
MOJOMOJO_CONFIG=/my/other/path.conf
[MYAPP_CONFIG](http://search.cpan.org/dist/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader/Manual.pod#ENVIRONMENT_VARIABLES) is also a Catalyst-style environment variable name.
Here is an older [[/documentation/install|example installation progress]].
## Installing the latest build from GitHub, step-by-step
This set of instructions will install MojoMojo's latest build from GitHub, assuming you know nothing about Catalyst or git. MojoMojo will run from the current directory using its built-in standalone web server.
Note: The following instructions assume the root user on a current Ubuntu system.
<pre>
sudo su
aptitude install libxml2 libpng-dev libgif-dev libjpeg-dev expat libexpat1-dev
aptitude install libxslt1-dev libgdbm-dev docbook-xsl docbook-xsl-doc-html make
aptitude install libcatalyst-perl libcatalyst-modules-perl libcatalyst-modules-extra-perl
aptitude install libdbix-class-datetime-epoch-perl libhtml-formfu-model-dbic-perl
aptitude install git-arch
git clone git://github.com/marcusramberg/mojomojo.git
# optional: git tag ; git checkout &lt;release tag from the 'git tag' list>
cd mojomojo
cpan -i Module::Install
perl Makefile.PL
make
make test
# change mojomojo.conf if necessary
script/mojomojo_spawn_db.pl # creates database
script/mojomojo_server.pl # launch development server
</pre>
For an example of installing the latest build from GitHub on openSuSE 11.2, see [[Installing on openSuSE]].
## Upgrading
In general, upgrading via CPAN (or your equivalent distribution package) should be the only step required to upgrade your MojoMojo installation:
<pre>
$ sudo cpan
cpan[1]> install MojoMojo
Running install for module 'MojoMojo'
Running make for M/MR/MRAMBERG/MojoMojo-1.00.tar.gz
Running make test
t/01app.t ....................... ok
t/02pod.t ....................... ok
t/03podcoverage.t ............... skipped: set TEST_POD to enable this test
t/04context.t ................... ok
[snip]
All tests successful.
Files=54, Tests=624, 165 wallclock secs ( 0.20 usr 0.11 sys + 99.55 cusr 5.01 csys = 104.87 CPU)
Result: PASS
MRAMBERG/MojoMojo-1.00.tar.gz
/usr/bin/make test -- OK
Running make install
Prepending /home/justin/.cpan/build/MojoMojo-1.00-hLVXEf/blib/arch /home/justin/.cpan/build/MojoMojo-1.00-hLVXEf/blib/lib to PERL5LIB for 'install'
Installing /usr/local/share/perl/5.10.0/MojoMojo.pm
Installing /usr/local/share/perl/5.10.0/MojoMojo/mojomojo.conf
[snip]
Installing /usr/local/bin/mojomojo_update_db.pl
Installing /usr/local/bin/mojomojo_spawn_db.pl
Installing /usr/local/bin/mojomojo_fastcgi_manage.pl
Installing /usr/local/bin/mojomojo_fastcgi.pl
Installing /usr/local/bin/mojomojo_cgi.pl
Appending installation info to /usr/lib/perl/5.10/perllocal.pod
MRAMBERG/MojoMojo-1.00.tar.gz
/usr/bin/make install -- OK
</pre>
If you come from a pre-1.00 version to 1.00, please check `mojomojo.conf` for updates to the database connection info. The section should look like this:
<Model::DBIC>
<connect_info>
# DB User
user db_user
password db_password
# SQLite DSN (default database type, recommended for small to medium deployments)
dsn dbi:SQLite:mojomojo.db
...
</connect_info>
</Model::DBIC>
Other than that, there are no database schema changes planned as of yet, and a `cpan MojoMojo` (or `git pull`) should take care of upgrading.
## Plugins
Before starting the server, especially if you installed from GitHub, you may want to remove plugins that your installation won't use. To remove a plugin, just delete or move away its `.pm` file and associated directories from `/lib/MojoMojo/Formatter`.
The most common plugins you probably don't need are:
* Dir - formats a directory on your server as XHTML
* File - formats a file as XHTML (`File.pm`, `/lib/MojoMojo/Formatter/File`)
* Text - formats plain text as XHTML
* DocBook - format content as DocBook (`DocBook.pm`, `/lib/MojoMojo/Formatter/DocBook`)
* Defang - prevents cross-site-scripting but [corrupts markup in the process and slows down MojoMojo by a factor of 2](http://github.com/marcusramberg/mojomojo/issues/#issue/60)
<a href="http://blogbali.net/resep-masakan/"> Resep Masakan</a> <a href="http://blogbali.net/tutorial-blog/"> Tutorial Blog</a> <a href="http://blogbali.net/kata-mutiara/"> Kata Mutiara<a href="http://blogbali.net"> Berita Terbaru</a> <a href="http://cepplux.blogspot.com"> Cepplux Blog <a href="http://qecak.com"> Berita Terbaru</a> <a href="http://warsanca.blogspot.com"> Blog</a> <a href="http://caraku.net">Kumpulan Cara</a> <a href="http://kumpulan-cerita-17-tahun.blogspot.com"> Cerita 17 Tahun Cerita Dewasa</a> <a href="http://gambarwallpaper.com"> Gambar Wallpaper</a>
<a href="http://blogbali.net/resep-masakan/"> Resep Masakan</a> <a href="http://blogbali.net/tutorial-blog/"> Tutorial Blog</a> <a href="http://blogbali.net/kata-mutiara/"> Kata Mutiara<a href="http://blogbali.net"> Berita Terbaru</a> <a href="http://cepplux.blogspot.com"> Cepplux Blog <a href="http://qecak.com"> Berita Terbaru</a> <a href="http://warsanca.blogspot.com"> Blog</a> <a href="http://caraku.net">Kumpulan Cara</a> <a href="http://kumpulan-cerita-17-tahun.blogspot.com"> Cerita 17 Tahun Cerita Dewasa</a> <a href="http://gambarwallpaper.com"> Gambar Wallpaper</a> <a href="http://hipreplacementrecall12.pbworks.com"> Hip Replacement Recall</a> <a href="http://hipreplacementlawsuit.pbworks.com"> Hip Repalcement Lawsuit</a>
## After installation
From here on, see [[/documentation/Deployment]]. If you run into problems, see [[/Troubleshooting]].
## TODO
TODO: document where files end up after installation.
(alternatively, run `updatedb` and `locate mojomojo_server.pl`)