Difference between revisions of "Package:Xcache"

From Funtoo
Jump to navigation Jump to search
m (Drobbins moved page Xcache to Package:Xcache without leaving a redirect)
Line 7: Line 7:
== Configuring PHP FPM ==
== Configuring PHP FPM ==


As we already installed php with fpm support above we just need to adjust the following settings in ''/etc/php/fpm-php5.3/php-fpm.conf''. You should enable the following settings:
As we already installed php with fpm support above we just need to adjust the following settings:


<pre>
{{file|name=/etc/php/fpm-php-5.3/php-fpm.conf|desc= |body=
user = nginx
user = nginx
group = nginx
group = nginx
pm.start_servers = 20
pm.start_servers = 20
</pre>
}}


The other options should all be very well documented, so make it fit your needs.
The other options should all be very well documented, so make it fit your needs.


== Configuring xcache ==
== Configuring xcache ==
To configure xcache, just edit:


For setting xcache just edit ''/etc/php/fpm-php5.3/ext-active/xcache''
{{file|name=/etc/php/fpm-php-5.3/ext-active/xcache|desc= |body=
 
<pre>
zend_extension=/usr/lib64/php5.3/lib/extensions/no-debug-zts-20090626/          xcache.so                                                                   
zend_extension=/usr/lib64/php5.3/lib/extensions/no-debug-zts-20090626/          xcache.so                                                                   
   2 xcache.admin.enable_auth="On"
   2 xcache.admin.enable_auth="On"
Line 43: Line 42:
  20 xcache.coveragedump_directory="/tmp/coverager"
  20 xcache.coveragedump_directory="/tmp/coverager"
  21 xcache.optimizer="On"
  21 xcache.optimizer="On"
</pre>
}}


it might look like that for you, feel free to change the settings, and if you want to be able to log in into the admin interface set the ''xcache.admin.pass'' as a md5 encrypted password you can find it out with:
it might look like that for you, feel free to change the settings, and if you want to be able to log in into the admin interface set the ''xcache.admin.pass'' as a md5 encrypted password that you can find out with:


<pre>
<console>
php -a
###i## php -a
php> echo md5(PASSWORD);
php> echo md5(PASSWORD);
</pre>
</console>
 
and copy the admin interface to your vhost:


<pre>
then copy the admin interface to your vhost:
cp /usr/share/php/xcache/admin -a /var/www/{VHOST}/htdocs/xcache-admin
<console>
</pre>
###i## cp /usr/share/php/xcache/admin -a /var/www/{VHOST}/htdocs/xcache-admin
</console>


== Starting the service ==
== Starting the service ==


Now start the services:
Now, start the required services:


<pre>
<console>
/etc/init.d/php-fpm start
###i## /etc/init.d/php-fpm start
/etc/init.d/nginx start
###i## /etc/init.d/nginx start
</pre>
</console>


and make them default:
and make them default:


<pre>
<console>
rc-update add php-fpm default
###i## rc-update add php-fpm default
rc-update add nginx default
###i## rc-update add nginx default
</pre>
</console>


== See also ==
{{EbuildFooter}}
{{EbuildFooter}}

Revision as of 23:49, June 26, 2014

Xcache

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.

Configuring PHP FPM

As we already installed php with fpm support above we just need to adjust the following settings:

   /etc/php/fpm-php-5.3/php-fpm.conf
user = nginx
group = nginx
pm.start_servers = 20

The other options should all be very well documented, so make it fit your needs.

Configuring xcache

To configure xcache, just edit:

   /etc/php/fpm-php-5.3/ext-active/xcache
zend_extension=/usr/lib64/php5.3/lib/extensions/no-debug-zts-20090626/          xcache.so                                                                   
  2 xcache.admin.enable_auth="On"
  3 xcache.admin.user="admin"
  4 xcache.admin.pass=""
  5 xcache.cacher="On"
  6 xcache.size="64M"
  7 xcache.count="9"
  8 xcache.slots="8k"
  9 xcache.ttl="0"
 10 xcache.gc_interval="0"
 11 xcache.var_size="8M"
 12 xcache.var_count="1"
 13 xcache.var_slots="8K"
 14 xcache.var_ttl="0"
 15 xcache.var_maxttl="0"
 16 xcache.var_gc_interval="600"
 17 xcache.readonly_protection="Off"
 18 xcache.mmap_path="/dev/zero"
 19 xcache.coverager="On"
 20 xcache.coveragedump_directory="/tmp/coverager"
 21 xcache.optimizer="On"

it might look like that for you, feel free to change the settings, and if you want to be able to log in into the admin interface set the xcache.admin.pass as a md5 encrypted password that you can find out with:

root # php -a
php> echo md5(PASSWORD);

then copy the admin interface to your vhost:

root # cp /usr/share/php/xcache/admin -a /var/www/{VHOST}/htdocs/xcache-admin

Starting the service

Now, start the required services:

root # /etc/init.d/php-fpm start
root # /etc/init.d/nginx start

and make them default:

root # rc-update add php-fpm default
root # rc-update add nginx default