Installing iHRIS on Ubuntu 10.4 (Lucid)

From IHRIS Wiki
Revision as of 08:58, 11 May 2010 by Lduncan (talk | contribs)

Ubuntu 10.4 comes with PHP 5.3 so there a few a few issues that need to be corrected.

APC

The version of APC that ships with 10.4 causes problems. You'll need to downgrade it for it to work. Run the following commands in a terminal: <source lang="bash"> sudo apt-get remove apc-php sudo pecl config-set preferred_state beta sudo pecl install APC-3.1.2 sudo pecl config-set preferred_state stable </source>

When it asks if you want to use the spin locks type in yes. If you get errors about missing phpize then you need to install php5-dev by: <source lang="bash"> sudo apt-get install php5-dev </source> If you get errors about apxs then you need to install the apache development package: <source lang="bash"> sudo apt-get install apache2-prefork-dev </source>

Now you need to set the configuration options for APC. Create or edit the ini file by typing: <source lang="bash"> sudo gedit /etc/php5/conf.d/apc.ini </source>

The contents should be: <source lang="ini"> extension=apc.so apc.shm_size=100 apc.write_lock=1 apc-slam_defense=0 </source>

Sessions

Now you need to set the session save path. The default is /tmp but that is causing problems and the script to clean up sessions doesn't look there. You'll need to edit the files for apache and cli and make the same change. To edit the apache php config type: <source lang="bash"> sudo gedit /etc/php5/apache2/php.ini </source>

Find the line that looks like: <source lang="ini">

session.save_path = "/tmp"

</source> And change it to be (don't forget to remove the semi-colon): <source lang="ini"> session.save_path = "/var/lib/php5" </source>

Now edit the cli config file and make the same change: <source lang="bash"> sudo gedit /etc/php5/cli/php.ini </source>

Restart

Now restart apache and memcached (if you're using it) and try to access your site again. <source lang="bash"> sudo /etc/init.d/apache2 restart sudo /etc/init.d/memcached restart </source>