That means that what was previously an amazing Open Source CMS is now an astonishingly amazing Open Source CMS!
I've done up some instructions to set up a Ubuntu Server install to run Matrix, complete with instructions for installing eaccelerator and html tidy from source. To prepare, I've just done a basic server install using the Ubuntu 8.10 server cd, and haven't selected any of the default package sets when prompted.
If you're running in a VMWare virtual machine, press F4 after you are prompted for the language on the boot screen and select the minimal virtual machine install. This will install with a kernel that is optimised to run on VMWare architecture, and provides performance benefits over a standard install.
Without further ado, here are the instructions for installing a Matrix 3.20.0 GPL version of MySource Matrix on Ubuntu 8.10. We're assuming the basic OS install has happened, and you're logged in as root:
root@ubuntu:~# apt-get install php5 php5-cli php5-common php5-curl php5-gd php5-pgsql php5-pspell aspell-en php5-dev php-pear poppler-utils antiword openssh-server screen build-essential cvs
root@ubuntu:~# vi /etc/default/locale
---------------------------
Change the file to read:
LANG="C"
LANGUAGE="C"
---------------------------
root@ubuntu:~# export LANG="C"
root@ubuntu:~# export LANGUAGE="C"
root@ubuntu:~# apt-get install postgresql postgresql-client
root@ubuntu:~# pear upgrade-all
root@ubuntu:~# pear install Auth_SASL HTTP HTTP_Client HTTP_Request Image_Canvas-0.3.1 Image_Color Image_Graph-0.7.2 Mail Mail_Mime Mail_Queue Mail_mimeDecode Math_Stats-0.8.5 Net_SMTP Net_Socket Net_URL Numbers_Roman Text_Diff XML_HTMLSax XML_Parser XML_RPC XML_Tree
root@ubuntu:~# cd /usr/local/src
root@ubuntu:/usr/local/src# wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2
root@ubuntu:/usr/local/src# tar xjf eaccelerator-0.9.5.3.tar.bz2
root@ubuntu:/usr/local/src# cd eaccelerator-0.9.5.3/
root@ubuntu:/usr/local/src/eaccelerator-0.9.5.3# phpize
root@ubuntu:/usr/local/src/eaccelerator-0.9.5.3# ./configure
root@ubuntu:/usr/local/src/eaccelerator-0.9.5.3# make
root@ubuntu:/usr/local/src/eaccelerator-0.9.5.3# make install
root@ubuntu:/usr/local/src/eaccelerator-0.9.5.3# vi eaccelerator.ini
-------------------------------
Edit the following 2 lines:
zend_extension="/usr/lib/php4/eaccelerator.so"
eaccelerator.cache_dir = "/tmp/eaccelerator"
So that they say:
zend_extension="/usr/lib/php5/20060613+lfs/eaccelerator.so"
eaccelerator.cache_dir = "/var/cache/eaccelerator"
-------------------------------
root@ubuntu:/usr/local/src/eaccelerator-0.9.5.3# mkdir /var/cache/eaccelerator
root@ubuntu:/usr/local/src/eaccelerator-0.9.5.3# chown www-data:www-data /var/cache/eaccelerator
root@ubuntu:/usr/local/src/eaccelerator-0.9.5.3# cp eaccelerator.ini /etc/php5/conf.d/
root@ubuntu:/usr/local/src/eaccelerator-0.9.5.3# /etc/init.d/apache2 restart
root@ubuntu:/usr/local/src/eaccelerator-0.9.5.3# cd ..
root@ubuntu:/usr/local/src# cvs -z3 -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy co -P tidy
root@ubuntu:/usr/local/src# cd tidy/build/gmake
root@ubuntu:/usr/local/src/tidy/build/gmake# make
root@ubuntu:/usr/local/src/tidy/build/gmake# make install
---------------------
You will get an error. It does not matter for our purposes, tidy will be successfully installed in /usr/local/bin/tidy
---------------------
root@ubuntu:/usr/local/src# ln -s /usr/local/bin/tidy /usr/bin/tidy
root@ubuntu:/usr/local/src# cd /home/
root@ubuntu:/home# mkdir websites
root@ubuntu:/home# cd websites
root@ubuntu:/home/websites/mysource_matrix# wget http://matrix.squiz.net/__data/assets/file/0004/34744/mysource_3-20-0.tar.gz
root@ubuntu:/home/websites/mysource_matrix# tar xzf mysource_3-20-0.tar.gz
root@ubuntu:/home/websites/mysource_matrix# cd mysource_matrix
root@ubuntu:/home/websites/mysource_matrix# vi /etc/postgresql/8.3/main/pg_hba.conf
----------------------
Insert the following 2 lines just above the line that reads
"local all all ident sameuser"
:
local matrix matrix_web md5
local matrix matrix_hipo md5
-----------------------
root@ubuntu:/home/websites/mysource_matrix# /etc/init.d/postgresql-8.3 restart
root@ubuntu:/home/websites/mysource_matrix# su postgres
postgres@ubuntu:/home/websites/mysource_matrix$ createuser -P matrix_web
Enter password for new role:
Enter it again:
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
postgres@ubuntu:/home/websites/mysource_matrix$ createuser -P matrix_hipo
Enter password for new role:
Enter it again:
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
postgres@ubuntu:/home/websites/mysource_matrix$ createdb -O matrix_web -E SQL_ASCII matrix
postgres@ubuntu:/home/websites/mysource_matrix$ createlang plpgsql matrix
postgres@ubuntu:/home/websites/mysource_matrix$ psql matrix
Welcome to psql 8.3.5, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
matrix=# grant all on database matrix to matrix_hipo;
GRANT
matrix=# \q
postgres@ubuntu:/home/websites/mysource_matrix$ exit
root@ubuntu:/home/websites/mysource_matrix# php install/step_01.php `pwd`
root@ubuntu:/home/websites/mysource_matrix# vi data/private/conf/db.inc
---------------------------
Change this to look like, obviously you will need to substitute 'yourpassword' with the password you entered when creating the matrix_web and matrix_hipo db users above:
array (
'DSN' => 'pgsql:dbname=matrix',
'user' => 'matrix_web',
'password' => 'yourpassword',
'type' => 'pgsql',
),
'db2' => array (
'DSN' => 'pgsql:dbname=matrix',
'user' => 'matrix_web',
'password' => 'yourpassword',
'type' => 'pgsql',
),
'db3' => array (
'DSN' => 'pgsql:dbname=matrix',
'user' => 'matrix_hipo',
'password' => 'yourpassword',
'type' => 'pgsql',
),
'dbcache' => NULL,
'dbsearch' => NULL,
);
return $db_conf;
?>
---------------------------
root@ubuntu:/home/websites/mysource_matrix# vi data/private/conf/main.inc
---------------------------
You should modify the following lines:
define('SQ_CONF_SYSTEM_OWNER', '');
define('SQ_CONF_SYSTEM_ROOT_URLS', '');
define('SQ_CONF_DEFAULT_EMAIL', '');
define('SQ_CONF_TECH_EMAIL', '');
define('SQ_CONF_WEB_MEMORY_LIMIT', 16);
define('SQ_CONF_CRON_MEMORY_LIMIT', 16);
As an example, I use:
define('SQ_CONF_SYSTEM_OWNER', 'matrixblogger');
define('SQ_CONF_SYSTEM_ROOT_URLS', 'ubuntu.matrix.local');
define('SQ_CONF_DEFAULT_EMAIL', 'myname@myemailhost.com');
define('SQ_CONF_TECH_EMAIL', 'myname@myemailhost.com');
define('SQ_CONF_WEB_MEMORY_LIMIT', 64);
define('SQ_CONF_CRON_MEMORY_LIMIT', 64);
------------------------------
Please note: You must use email addresses with fqdn's for the default and tech email addresses, i.e. somebody@someplace.someextension. If you just use somebody@someplace, your installation will fail miserably and you'll have to start over, which will not make your day ;)
root@ubuntu:/home/websites/mysource_matrix# php install/step_02.php `pwd`
root@ubuntu:/home/websites/mysource_matrix# php install/compile_locale.php `pwd`
root@ubuntu:/home/websites/mysource_matrix# php install/step_03.php `pwd`
root@ubuntu:/home/websites/mysource_matrix# php install/compile_locale.php `pwd`
root@ubuntu:/home/websites/mysource_matrix# chown -R www-data:www-data data cache
root@ubuntu:/home/websites/mysource_matrix# vi /etc/apache2/sites-available/matrix
------------------------
Create this file so that it looks like this (you'll need modify ubuntu.matrix.local to match the url you set in main.inc, otherwise confusion will abound). This is copied from the matrix installation page at http://matrix.squiz.net/resources/installation :
NameVirtualHost *:80
<VirtualHost *:80>
ServerName ubuntu.matrix.local
DocumentRoot /home/websites/mysource_matrix/core/web
Options -Indexes FollowSymLinks
<Directory /home/websites/mysource_matrix>
Order deny,allow
Deny from all
</Directory>
<DirectoryMatch "^/home/websites/mysource_matrix/(core/(web|lib)|data/public|fudge)">
Order allow,deny
Allow from all
</DirectoryMatch>
<FilesMatch "\.inc$">
Order allow,deny
Deny from all
</FilesMatch>
<LocationMatch "/(CVS|\.FFV)/">
Order allow,deny
Deny from all
</LocationMatch>
Alias /__fudge /home/websites/mysource_matrix/fudge
Alias /__data /home/websites/mysource_matrix/data/public
Alias /__lib /home/websites/mysource_matrix/core/lib
Alias / /home/websites/mysource_matrix/core/web/index.php/
</VirtualHost>
-----------------------------
root@ubuntu:/home/websites/mysource_matrix# a2ensite matrix
root@ubuntu:/home/websites/mysource_matrix# /etc/init.d/apache2 reload
-----------------------------
This will give you a warning about "NameVirtualHost *:80 has no VirtualHosts". You can ignore this warning
-----------------------------
Now, add a hosts entry so that you can access the vm using the url you used in main.inc on this line:
define('SQ_CONF_SYSTEM_ROOT_URLS', '');
In my case I add a host entry like so:
ubuntu.matrix.local 192.168.201.131
And that's it! You should be able to access the administration interface on http://your.system.url/_admin
-------------------------------------------------------------
Addendum: I haven't included installation instructions for a Mail Transport Agent (mail server) for Matrix to send emails. I like postfix, personally, but you can use other MTA's like sendmail or qmail if you are more familiar with those.