Installing OpenPSA
OpenPSA uses the Midgard content repository as a storage backend and can run on any Linux server. For a local installation on a Linux machine, you'll need the following dependencies:
- Web server (Apache and lighttpd are known to work)
- Database server (MySQL, SQLite, PostgreSQL and others)
- PHP 5.2.4+
- Memcache & APC (recommended)
- Midgard2 content repository
You can find the Midgard2 packages on the OpenSUSE build service for your distribution of choice. Add the repository to your package manager and install the php5-midgard2 package and it's dependencies.
Once they are installed, download the latest release here or clone the OpenPSA repository from github like so:
$ git clone git://github.com/flack/openpsa.git
Next you should link the database schemas to where midgard can find them:
ln -s /[path_to_openpsa]/schemas/* /usr/share/midgard2/schema/
Change into the new directory and set up a database for OpenPSA usage. This can be generated by running:
$ php quick_init.php openpsa
You need php-cgi (typically at /etc/php5/cgi/conf.d/midgard2.ini) with some settings that open a Midgard2 database connection:
extension=midgard2.so
[midgard2]
midgard.engine = On
midgard.http = On
midgard.configuration_file="/etc/midgard2/conf.d/openpsa"
midgard.superglobals_compat = On
And finally install OpenPSA under your document root:
$ cp -R openpsa /var/www/
Setting up Lighttpd
Enable rewrite and fastcgi modules in your Lighttpd config (by default /etc/lighttpd/lighttpd.conf):
server.modules += (
"mod_fastcgi",
"mod_rewrite"
)
Also enable FastCGI to talk to your PHP installation:
fastcgi.server = (
".php" => (
(
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket"
)
)
)
Then just configure your Lighttpd to pass all requests to the OpenPSA "rootfile":
url.rewrite-once = (
"^/midcom-static/OpenPsa2/(.*)$" => "/openpsa/themes/OpenPsa2/static/$1",
"^/midcom-static/(.*)$" => "/openpsa/static/$1",
"^([^\?]*)(\?(.+))?$" => "openpsa/rootfile.php$2"
)
Restart your Lighttpd and point your browser to the address you're using with the server. Default login to OpenPSA is admin/password.
Apache
Installing on Apache involves the same steps: Enable PHP and mod_rewrite and set up the appropriate rules. Restart the web server and you're good to go.
Midgard 1 Installation
Alternatively, you can also run OpenPSA on a Midgard1 backend. You'll find the necessary Midgard packages here. After installing, run
datagard -a install -p openpsa
