Installing iHRIS on Ubuntu 10.4 (Lucid)

From IHRIS Wiki
Revision as of 11:56, 20 December 2010 by Litlfred (talk | contribs) (→‎APC)

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

APC

To compile pecl packages yourself you'll need these packages installed. They may already be installed. <source lang="bash"> sudo apt-get install php5-dev apache2-prefork-dev </source>

The version of APC that ships with 10.4 and 10.10 causes problems. You'll need to downgrade it for it to work. When it asks if you want to use the spin locks type in yes. Run the following commands in a terminal: <source lang="bash"> sudo apt-get remove php-apc sudo pecl config-set preferred_state beta sudo pecl install APC-3.1.5 sudo pecl config-set preferred_state stable </source> SEE: http://pecl.php.net/bugs/bug.php?id=16814

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=100M 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>