Clear Mysource Matrix Cache from the Command Line

While upgrading from Mysource Matrix 3.20.2 to 3.22.1 you need to turn off and clear the cache from the system.

Unfortunately, if you are running a large system you may not have the memory allocation to perform the system wide clear cache option that can be found under the System Management - Cache Manager - Clear Cache section in the back end.

There is an easier solution though, and for those that have ssh access to their systems I can say it is a much simpler way to clear mysource matrix cache.

SSH into your system and type the following:

psql -U postgres -d DBNAME -c "TRUNCATE sq_cache;" 

v.o.i.l.a.d.o.n.eh.o.w.e.a.s.y.w.a.s.t.h.a.t 

Big cheers to Dan "The Man" Simmons for the tip..... 

Author:

Tags:

Adding URLs to Mysource Matrix

I've recently been asked to build a site for a friend of mine, and what better system to build it on then Mysource Matrix?

Other then setting the site and all its elements in mysource matrix itself, there are a few fundamental tasks that are required to get a website running.

First off is to buy a domain name, and then have it pointing to the right server.

For this my friend bought a domain through MelbourneIT, however I always find they are a little over priced.  I use http://www.domai.nr to find an appropriate domain name and usually buy through godaddy.com.

Once you've bought the domain name you need to update the domains name servers and create a few name server records through your DNS area.

I use Slicehost for my hosting needs, absolutely brilliant in my eyes!

So I update the nameservers on MelbourneIT to point towards

ns1.slicehost.net
ns2.slicehost.net
ns3.slicehost.net

I then visit the Slicehost DNS manager and create a new domain for the site, yoursitedomain.com. Now that has been created you need to associate some records to the domain.

There are numerous records to choose from, but to start with you should set up 3xNS records pointing towards the name servers, and 2xA records pointing yoursitedomain.com and www to the ip address of the server you are hosting with.

If that seems a little confusing, head over to the Slicehost documentation which is very clear and extremely thorough.

Now this is the bit that I wanted to write about at the beginning, adding a URL to the mysource matrix installation.

Go to the terminal window and ssh into your server. 

Type cd /etc/apache2/sites-enabled/

Type sudo vi nameofyourslicehost (so in my case it was sudo vi surfthedream.com.au)

You should see something like this.... 

ServerName surfthedream.com.au

ServerAlias surfthedream.com.au surfthedream.net.au www.surfthedream.com.au www.surfthedream.net.au justinavery.me www.justinavery.me

You want to navigate to the ServerAlias line and press shift+a (A, which takes you to the end of the line to edit in vi).

As you can see from the example you can add multiple urls separating them with spaces.

Once you're finished adding them you should have something like..... 

ServerName surfthedream.com.au

ServerAlias surfthedream.com.au surfthedream.net.au www.surfthedream.com.au www.surfthedream.net.au justinavery.me www.justinavery.me yoursitedomain.com www.yoursitedomain.com

Press <esc> to get out of the editing mode and then :wq to write then quit the file.

Next step is to restart apache, but make sure you test restart apache first to make sure nothing went wrong.

Author: Justin Avery

Tags:

Using Postgres SQL (psql) from the terminal window

While upgrading from Mysource Matrix version 3.20.1 - 3.22.1 I needed to make some changes to the database in Postgres.

Do you think I had any recollection on how this might be done?  Of course not.

After a few attempts I got it back to this....

Open the terminal window and ssh to the server (although you should already be there during the upgrade, this is just incase you are really starting from the beginning)

Type 'psql -d mysource_matrix -U matrix' and press enter

psql  this tells the terminal that you want to go to the postgres command line

-d denotes which database you will be making changes to, so if you're not working with mysource_matrix add your own database name

-U dentoes the user you are performing the commands as.

Both of these default to the current user for both the database and the user, so you need to specify both.

Author: Justin Avery

Tags: