Installing OpenPSA
OpenPSA can run on any Linux or Mac OS machine. You'll need roughly the following:
- a web server (Apache, nginx, and lighttpd are known to work)
- a database (MySQL or SQLite)
- PHP 7.4+
- Memcache & bytecode cache are recommended
Installing via Composer
You can install OpenPSA via Composer from Packagist. Simply require it in your composer.json and run composer install
.
Manual Installation
Alternatively, you can clone the OpenPSA repository from github like so:
$ git clone git://github.com/flack/openpsa.git
Change into the new directory and run composer install
to install PHP dependencies
Database Setup
Create a new database in your favorite tool, and save the connection information in config/midgard-portable.inc.php
. Then, run
./vendor/bin/midgard-portable schema
to initialize the database.
Setting up Lighttpd
Link OpenPSA's web directory to your document root:
$ ln -s [your-project-root-dir]/web /var/www/[your-project-name]
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/(.*)$" => "/themes/OpenPsa2/static/$1",
"^/midcom-static/(.*)$" => "/static/$1",
"^([^\?]*)(\?(.+))?$" => "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 set up the appropriate rules.In Apache 2.4, a vhost entry could looks like this:
<VirtualHost *:80> ServerName MY-FIRST-SERVER DocumentRoot [PATH TO YOUR PROJECT'S web/ FOLDER] DirectoryIndex /rootfile.php <Directory [DOCUMENT ROOT]> Options FollowSymLinks AllowOverride None Order Allow,Deny Allow from All FallbackResource /rootfile.php </Directory> </VirtualHost>
Restart the web server and you're good to go.