Manage Your Consulting Business

OpenPsa 2 setup

  1. Create a new company database
  2. Create a new host
  3. Add MidCOM Cron service call for your host
  4. Setting up modules
  5. Setting up an owner group

This document outlines how to set up a new OpenPsa 2. You must have installed it first.

Create a new company database

  • Midgard can host multiple OpenPsa using companies on same server using a concept called sitegroups
  • Sitegroups are created using the following command

    # php /usr/share/php/midcom/lib/midgard/admin/sitegroup/bin/create-sitegroup.php -u admin -p password -s mycompany --admin_password=newpassword
    
  • This will create a new sitegroup named mycompany, with administrative user admin that has password newpassword. The command will output something like the following:

    Sitegroup created with id : 3
    
  • Write this ID down, it will be required in the next phase

Note: Run php /usr/share/php/midcom/lib/midgard/admin/sitegroup/bin/create-sitegroup.php --help if you want to learn more about the command.

Create a new host

  • After you have created the sitegroup you have to set up a new Virtual Host for running the OpenPsa installation. You can do this with datagard
  • Once the VirtualHost has been created into Apache configuration, you can set up the new OpenPsa 2 site using the command

    # php /usr/share/php/midcom/lib/midgard/admin/sitegroup/bin/create-host.php -u admin -p password --sitegroup_id 3 --topic_midcom org.openpsa.mypage --extend_style template_OpenPsa2 --hostname localhost --host_prefix /openpsa
    
  • Tune the hostname, sitegroup ID and host prefix to fit your setup. The command above would set up OpenPsa 2 to http://localhost/openpsa.

Note: Run php /usr/share/php/midcom/lib/midgard/admin/sitegroup/bin/create-host.php --help if you want to learn more about the command.

Add MidCOM Cron service call for your host

  • Locate script midcom_services_cron.sh, it not already make a copy of it to /usr/local/bin (or some other directory of your choice).
  • Edit the script and add your newly created host to the SITES list (in our example case the entry would be localhost/openpsa).
  • Make sure the script is run from the system cron, if you wish to use the directmarketing module run it every minute, otherwise every 30 minutes is enough.

Setting up modules

After this you should have an OpenPsa 2 installation up and running. Access it via browser, log in, and use the Create Subfolder functionality to enable those modules you wish to use.

Setting up an owner group

You should create your own organization as a company in the OpenPsa Contacts module and configure OpenPsa to recognize it as the owner group of the system. To do this create a snippet named /sitegroup-config/org.openpsa.core/config with contents like the following:

'owner_organization' => 'b6702bd7d60fa57049ab0f75fc42b235',
OpenPsa is a web-based management suite for consultancies. It has been developed by Nemein and is available under a Free Software license.