Some processes within MySource Matrix are quite time and resource intensive, resulting in them running longer than the PHP script execution time limit allows. To avoid this, HIPO jobs run in steps or chunks to process a set number of assets at a time. With the use of the Squiz Server, these processes can be run from start to finish without needing to refresh the browser, and result in a quicker execution time than would normally be possible.
You would have received the Squiz Server package as a single gzipped tar archive called squiz_server.tar.gz. You will need to extract the contents of this archive to begin installation. The default and recommended directory for installation is /usr/local.
The following commands assume the file squiz_server_tar-gz exists inside /usr/local.
$ cd /usr/local $ tar -zxvf squiz_server.tar.gz
Make sure the server has write access to the PID file
/var/run/squiz_server.pidSquiz server should belong to the same user as the one executing the web server process running MySource Matrix. This will avoid problems with files/directories created by the Squiz Server being inaccessible by the web interface.
If your Squiz Server is running as user apache who is in group www-data the permissions on the PID file should be set like the following
$ chown apache:www-data /var/run/squiz_server.pid
The permissions on all directories in the Squiz Server install should be 755, on files 644. All files and directories have to belong to a user other than the one running the Squiz Server.
EXCEPTION: logs/ should be writable by the Squiz Server process.
Inside the newly created squiz_server directory, there is a sample configuration file called server.conf.example. This file is used to identify each MySource Matrix system that is allowed to use this copy of the Squiz Server. The sample configuration file should should be copied to a file called server.conf and edited to reflect your settings.
$ cd /usr/local/squiz_server $ cp server.conf.example server.conf $ vi server.conf
Each system listed in the configuration file must have the following information specified.
<?php
$systems = Array(
'system1' => Array(
'system_type' => 'MySource3',
'system_root' => '/home/websites/mysource_matrix',
),
);
?>
There are two ways of running the Squiz Server, as a System V init script, or as a process managed by the supervise daemon. Which approach to use will depend on your server configuration and is beyond the scope of this guide.
In the squiz_server/scripts directory, there is a file called squiz_server.init. Edit this file and change the following settings to match those of your server:
After the configuration is complete, you can test the Squiz Server is running correctly by issuing the following command:
$ squiz_server.init start
If the process starts up correctly, it is then ready to be added to the boot up process of the system. You will need to copy the squiz_server.init file to the system's init.d directory (usually /etc/init.d) and the run the following commands:
$ chkconfig squiz_server.init --add $ chkconfig squiz_server.init on
To start installation of the Squiz Server under the supervise daemon, run the install_supervise.sh script, located in squiz_server/scripts/. Follow the prompts to configure the Squiz Server correctly. Once the script finishes, open the squiz_server/scripts/supervise/run file, and ensure all of the settings are correct. The descriptions for each of the settings is available in the above section, with the exception of WEBUSER, which describes the user the web server runs as.
For the Squiz Server to be found by the Supervise daemon, the path to the 'run' must be symbolically linked under the /service directory. Performing this for the example above would use the following command
$ ln -s /usr/local/squiz_server/scripts/supervise /service/squiz_server
$ netstat -nlpYou'll get a lengthy output, which should include a line like the following:
tcp 0 0 127.0.0.1:9090 0.0.0.0:* LISTEN 16310/phpA PHP script listennig on port 9090 on localhost.
The final step to get the Squiz Server running is to configure your MySource Matrix system to use the Squiz Server.
To access the Squiz Server configuration screen, follow these steps.
Your MySource Matrix system is now running with the Squiz Server. Check that everything is working correctly by trying out some HIPO jobs, such as acquiring the locks on a page.