Recommend OS for Matrix

I am looking into hosting my own personal Matrix site, and I am wondering what the OS of choice is for Matrix? I know here at work we used Debian, which has worked out well. Is this the best choice?


Also, does Squiz have some pre-compiled RPM files that can be used to install Matrix, postgresql, etc., or should I just do it from scratch?



Sorry, it has been a while since I did my first Matrix install (about 2 years), so I am a little rusty… :slight_smile:

If you use Matrix v3.18.1, you can use either CentOS v5.1 or Debian without needing special packages. Both of them will support v3.18 "out-of-the-box", i.e. with stock versions of PHP and PostgreSQL. :slight_smile:

As well as Ubuntu 8.04 LTS did when installing last night.

It has been so long since I have done this, so I am getting hung up on the database part.


I am trying to get Postgresql 8.1 set up on Debian. I have it installed, and I created the two users as instructed in the matrix instructions. There are problems when running step 2.



This is the error I get when running step 2:


    Fatal error: Uncaught exception 'Exception' with message 'Could not create database connection: DBError!:SQLSTATE[08006] [7] FATAL:  IDENT authentication failed for user "matrix"' in /home/websites/mysource_matrix/core/include/mysource.inc:2216
    Stack trace:
    #0 /home/websites/mysource_matrix/core/include/mysource.inc(211): MySource->changeDatabaseConnection('db')
    #1 /home/websites/mysource_matrix/core/include/init.inc(232): MySource->init()
    #2 /home/websites/mysource_matrix/install/step_02.php(57): require_once('/home/websites/...')
    #3 {main}
      thrown in /home/websites/mysource_matrix/core/include/mysource.inc on line 2216

You need to edit pg_hba.conf and allow Trust authentication for localhost access. :)

I must still be missing something.

I added:

    local   mysource_matrix matrix						trust
    local   mysource_matrix matrix_secondary			  trust
    host	mysource_matrix matrix						trust


And I am still getting the errors.

Could something in my db.inc file be wrong?

    <?php
    $db_conf = array (
    		 'db' => array (
    				'DSN' => 'pgsql:dbname=mysource_matrix',
    				'user' => 'matrix',
    				'password' => '',
    				'type' => 'pgsql',
    			   ),
    		'db2' => array (
    				'DSN' => 'pgsql:dbname=mysource_matrix',
    				'user' => 'matrix',
    				'password' => '',
    				'type' => 'pgsql',
    			   ),
    		'db3' => array (
    				'DSN' => 'pgsql:dbname=mysource_matrix',
    				'user' => 'matrix_secondary',
    				'password' => '',
    				'type' => 'pgsql',
    			   ),
    		'dbcache' => NULL,
    		);
return $db_conf;
?></pre>

Have you restarted PostgreSQL? :) I use:

    local all all trust


And turn off TCP/IP access to PostgreSQL.

[quote]Have you restarted PostgreSQL? :slight_smile: I use:

    local all all trust


And turn off TCP/IP access to PostgreSQL.[/quote]

Yes, I have been restarting the database.

I tried local all all trust, and that did not seem to work.

I found one problem. I somehow had both postgre 7.4 and 8.1 installed, so maybe the user and database that I created was not on 8.1. So, I removed 7.4, and created the users and database over, and ran the steps again.

But, step 2 still throws and error, although a slightly different one:

    Fatal error: Uncaught exception 'Exception' with message 'Could not create database connection: DBError!:SQLSTATE[08006] [7] could not connect to server: No such file or directory
    	Is the server running locally and accepting
    	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?' in /home/websites/mysource_matrix/core/include/mysource.inc:2216

Looks like the client isn't able to connect to PostgreSQL via the Unix sockets. This is where my knowledge ends, considering I usually just install it and it works. :)

Well, thanks for the help so far. I think that I will just wipe the server clean and start all over. I might have messed up in a few places.

Thanks!

Use CentOS v5.1 instead! Works out of the Box! </subliminal message> :D

Can you connect to the DB over the command line (psql -U user dbname)? Thats the easiest way to debug connection errors. And check it is listening on that socket (netstat will list whats listening where).


Ah bugger, I should have done that. Oh well, I am up and running now on Debian. Doing everything over worked.

Thanks for all the help, I appreciate it!

Hey Squiz,


Can I suggest that you update your installation guide to include


  • setting permissions for users in the pg_hba.conf file
  • testing a connection to the database with psql -U matrix mysource_matrix
  • using the same database name in the example dsn and the postgres setup instructions (ie - use mysource_matrix consistently as your db name)



    I think all this data is here in the forum - but it would be very helpful if you just updated the installation instructions. Step 2 is causing people a lot of grief, and has for a long time.

Good suggestions. The Matrix site is currently being moved so I cant do any updates, but I've added this to my todo list for next week.