NAME

MKDoc::Setup::Site - Installs a new MKDoc site somewhere on the system

SYNOPSIS

perl -MMKDoc::Setup -e install_site /var/www/example.com

SUMMARY

MKDoc::Core is an application framework which aims at supporting easy-ish installation of multiple products onto multiple virtual hosts / websites.

Once you have installed the MKDoc master directory using MKDoc::Setup::Core, you can add additional sites using this setup module.

PRE-REQUISITES

First, you need to make sure that you have deployed the MKDoc::Core master repository using MKDoc::Setup::Core.

Then, you need a domain name which points to the IP address of the machine on which you are setting up the new site. If you have no domain name, you can add one temporarily in your /etc/hosts file.

Finally, you need to choose a directory in which your MKDoc::Core site is going to live.

For the sake of the example, we'll assume that we are using a domain called 'www.example.com' which will live in /var/www/example.com.

Note that you do not need to be root to install a new site. It would be best if you created /var/www/example.com as root and then changed the ownership to an unprivileged user.

SETTING UP

First there is a file in your mkdoc-core directory called 'mksetenv.sh'. You need to source this file.

source /usr/local/mkdoc-core/mksetenv.sh

Then run the following command:

perl -MMKDoc::Setup -e install_site /var/www/example.com

You should see the following screen:

1. MKDoc Directory        /usr/local/mkdoc
2. Site Directory         /var/www/mkdoc/example.com
3. Server Name            www.example.com
4. Log Directory          /var/www/mkdoc/example.com/log
5. Domain Admin Email     tech@example.com

D. Delete an option

I. Install with the options above
C. Cancel installation

Input your choice:

Make sure that everything's OK and press 'i' to install the site.

Restart Apache:

/usr/local/apache/bin/apachectl restart

Point your web browser to http://www.example.com/. If you see a page which says 'it worked!' then congratulations, you have installed a minimal MKDoc::Core site.

If you so wish, you can now install more interesting modules such as MKDoc::Auth or MKDoc::Forum.