HowTo: Install Memcached: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
With version 4.0.4 of iHRIS you can use memcahced to improve performance. | With version 4.0.4 of iHRIS you can use memcahced to improve performance. | ||
==Install Memcached== | ==Installation on Intrepid== | ||
==Installation on Karmic== | |||
===Install Memcached=== | |||
First install memcached by opening a terminal and typing: | First install memcached by opening a terminal and typing: | ||
<source lang="bash"> | <source lang="bash"> | ||
Line 21: | Line 25: | ||
sudo /etc/init.d/memcached restart | sudo /etc/init.d/memcached restart | ||
</source> | </source> | ||
===Install PHP Module=== | |||
Next we need to link memcached with PHP using the memcached PECL library. First make sure the development packages are installed so PECL can compile memcached. Type the following in a terminal: | |||
<source lang="bash"> | <source lang="bash"> | ||
sudo apt-get install libmemcached2 libmemcached-dev apache2-prefork-dev php5-dev | sudo apt-get install libmemcached2 libmemcached-dev apache2-prefork-dev php5-dev | ||
Line 56: | Line 57: | ||
sudo /etc/init.d/apache2 restart | sudo /etc/init.d/apache2 restart | ||
</source> | </source> | ||
==Installation on Lucid or Meerkat== | |||
Simply do | |||
sudo apt-get install php5-memcached memcached |
Revision as of 08:20, 24 November 2010
With version 4.0.4 of iHRIS you can use memcahced to improve performance.
Installation on Intrepid
Installation on Karmic
Install Memcached
First install memcached by opening a terminal and typing: <source lang="bash"> sudo apt-get install memcached </source>
Then make sure that memcached is enabled. Look at /etc/default/memcached and make sure that it is set to be enabled. You can edit it by typing: <source lang="bash"> sudo gedit /etc/default/memcached </source>
Then make sure the content is: <source lang="ini"> ENABLE_MEMCACHED=yes </source>
If memcached wasn't enabled then after editing that file you'll need to restart it by typing: <source lang="bash"> sudo /etc/init.d/memcached restart </source>
Install PHP Module
Next we need to link memcached with PHP using the memcached PECL library. First make sure the development packages are installed so PECL can compile memcached. Type the following in a terminal: <source lang="bash"> sudo apt-get install libmemcached2 libmemcached-dev apache2-prefork-dev php5-dev </source>
Now install memcached by typing: <source lang="bash"> sudo pecl install memcached </source>
Now enable the module by creating and editing a config file for PHP.
<source lang="bash"> sudo gedit /etc/php5/conf.d/memcached.ini </source>
Save the following for that file: <source lang="ini"> extension=memcached.so </source>
Restart Apache
Now restart apache to enable the PHP memcached library by typing the following in a terminal:
<source lang="bash"> sudo /etc/init.d/apache2 restart </source>
Installation on Lucid or Meerkat
Simply do
sudo apt-get install php5-memcached memcached