Tutorial: Step-by-step setup of a MySource Matrix CMS on a blank debian 3.1

I wanted to try out the MySource Matrix CMS. But I couldn't find a demosite or something else, just the flash demo on the website. So I decided to install it on a fresh Debian 3.1 installation. Since the whole process was a little tricky, I want to share this step-by-step guide.

First Steps

  • I started with a netinst Debian image. And installed it in a VMWare.
  • I ran the command base-config and chose the predefined sollections of software Web server and SQL database
    screen1.gif

Requirements

The following steps are important to comply with the requirements.

apt-get install php-mail-mime mime-support
apt-get install php4-cli php4-common php4-pear
apt-get install php4-pgsql apache2-mpm-prefork

Preparation for the Postgres DB

Switch user to postgres:

$ su postgres

Run the steps basically described here.

$ createuser -U postgres matrix
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
CREATE USER
$ createuser -U postgres matrix_secondary
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
CREATE USER
$ createdb -U postgres -O matrix mysource_matrix
CREATE DATABASE
$ createlang -U postgres plpgsql mysource_matrix

Switch user back to root.

$ su root

This thread suggests to allow connections to PostgreSQL from the local server without a password. Edit this file

vi /var/lib/postgres/data/pg_hba.conf

and change the upper two "local" lines and change "ident sameuser" to "trust".
Restart the postgres server.

/etc/init.d/postgresql restart

Download and install.

Basically described here.
I installed version 3.8.2. The latest version is to find here.

$ cd /var/www
$ wget http://matrix.squiz.net/__data/assets/file/8162/mysource_3-8-2.tar.gz
$ tar -zxvf mysource_3-8-2.tar.gz
$ cd /var/www/mysource_matrix
$ php install/step_01.php .

Edit this file

$ vi data/private/conf/main.inc

and change these settings:

define('SQ_CONF_DB_DSN', 'pgsql://matrix@unix()/mysource_matrix');
define('SQ_CONF_DB2_DSN', 'pgsql://matrix@unix()/mysource_matrix');
define('SQ_CONF_DB3_DSN', 'pgsql://matrix_secondary@unix()/mysource_matrix');
.
.
.
.
define('SQ_CONF_SYSTEM_ROOT_URLS', '192.168.65.134');

Note: The address/ip in this example is the local address of my installation. Find out the ip of your machine with the command ifconfig.


$ php install/step_02.php .
$ php install/compile_locale.php .
$ php install/step_03.php .
$ php install/compile_locale.php .
$ chmod -R 755 /var/www/mysource_matrix

$ cd /var/www/mysource_matrix
$ chown -R www-data:www-data data cache
$ chmod -R g+w data cache

Apache Configuration

Edit the file

/etc/apache2/sites-available/default

paste these lines

<VirtualHost *>
     DocumentRoot /var/www/mysource_matrix/core/web
<Directory "/var/www/mysource_matrix">
            Options Indexes FollowSymLinks
            Order deny,allow
            Deny from all
     </Directory>
     <Directory "/var/www/mysource_matrix/core/web">
            Options Indexes FollowSymLinks
            Order allow,deny
            Allow from all
     </Directory>
     <Directory "/var/www/mysource_matrix/core/lib">
            Options Indexes FollowSymLinks
            Order allow,deny
            Allow from all
     </Directory>
     <Directory "/var/www/mysource_matrix/data/public">
            Options Indexes FollowSymLinks
            Order allow,deny
            Allow from all
     </Directory>
     <Directory "/var/www/mysource_matrix/fudge">
            Options Indexes FollowSymLinks
            Order allow,deny
            Allow from all
     </Directory> 

Alias "/__data"    "/var/www/mysource_matrix/data/public"
     Alias "/__lib"     "/var/www/mysource_matrix/core/lib"
     Alias "/__fudge"   "/var/www/mysource_matrix/fudge"
     Alias "/"          "/var/www/mysource_matrix/core/web/index.php/" 

</VirtualHost>

restart Apache

/etc/init.d/apache2 restart

Done!

If everything worked well, you should see this when entering your local address in your browser URL field. In our case the URL ist http://192.168.65.134/_admin/

screen2.gif
The UID/password is root/root by default.

The initial Admin Interface looks like this:

MySource Matrix Admin Interface

Published in: on May 28, 2006 at 8:54 am  Comments (7)