MidRepository installation
**************************
Copyright (C) 2003 David Schmitter, Dataflow Solutions GmbH <schmitt@dataflow.ch>

The install scripts are borrowed from the data package.

If you care about your data, BACK IT UP!


Dependencies 
------------
PHP 4.2.3 with command line support, should work with 4.3 with minor modifications
PHP extensions: domxml, curl, mysql.
atd which apache user may use (modify /etc/at.deny or similar)
CVS >= 1.11
Midgard from CVS --with-multilang --with-vc --with-repligard-enhance --with-page-owner --with-cache-fix

Preparations
------------
* /var/mgd or whatever base directory configured needs to be added to your include_path in php.ini. Setting max_execution_time = 0, memory_limit = 256M is also recommended. If you have a separate php.ini for the CGI version you need to include it there too. 

* If your php commandline interpreter is not located at /usr/bin/php4 you need to make a symlink to that location.

*** Choose between ***

New install
-----------
* Installs a fresh staging / live setup with current oldadmin + asgard, borrowed from the data package. I also made a similar package based on Aegir but I don't distribute it because of possible license problems.

* Run ./configure --with-host=your.host.name --with-ip=1.2.3.4 etc. (see ./configure --help)

* Run ./dbinstall. This will generate 5 databases: frontend staging, backend staging, frontend live, backend live, meta and scripts in /var/mgd (default)

* If you have already run ./dbinstall you first need to run ./clear to wipe the remnants, otherwise ./dbinstall won't work. This wipes all databases, blobs etc. configured, so back up if there is any real data.

* The generated midgard-workflow.conf needs to be included or merged into your apache config.

* Restart apache and run /var/mgd/everymin.php from the command line. If there is no error message, it probably works, and you can verify the everymin.php entry in your /etc/crontab and restart cron.

*** Or ****

Convert your existing DB
------------------------
* Uses an existing DB and tries to convert it into a staging / live setup (everything published initially). It does this without overwriting the original DB. It can take an hour or longer if you have a lot of data. You can't convert a staging / live setup yet.

* Run configure with --with-install=convert --with-convert-db=dbname (the original db). The blobs that belong to your existing db need to be in $blobroot/blobs_$dbname (adjust --with-blobroot)

* Continue as above.


Try it out
----------
Log in to the control interface at http://host:staging-port(default 8001)/vccontrol?path=/sitegroup:SG0/page:Asgard_Root (for example).

Try http://host:staging-port(default 8001)/vc/create to create a test sitegroup. If the page is mostly green, it works :)


Oh well
-------
It's not tested on a lot of different setups and probably won't work without tweaking. Report your problems, please.
