FreeBSD: Install PHP xcache Opcode Cacher

www.‮.iruttual‬com
FreeBSD: Install PHP xcache Opcode Cacher

To install the PHP XCache opcode cacher on a FreeBSD system, you will need to do the following:

  1. Update the system's package database by running the following command:
# pkg update
  1. Install the PHP XCache extension using the pkg package manager:
# pkg install php72-xcache

This will install the PHP XCache extension on your FreeBSD system.

To enable the PHP XCache extension, you will need to add the following line to the /usr/local/etc/php/extensions.ini file:

extension=xcache.so

To configure the PHP XCache extension, you will need to edit the /usr/local/etc/php/php.ini file and add the following lines:

[xcache]
xcache.size = 64M
xcache.var_size = 0M
xcache.count = 1
xcache.ttl = 0
xcache.gc_interval = 0
xcache.var_gc_interval = 300
xcache.test = Off
xcache.readonly_protection = Off
xcache.cacher = On
xcache.stat = On

This will configure the PHP XCache extension with a cache size of 64MB and various other options.

To test the PHP XCache extension, you can create a PHP file, index.php, in the document root with the following content:

<?php
    phpinfo();
?>

Then, visit the PHP file in a web browser and look for the xcache section in the PHP information page. If the PHP XCache extension is installed and enabled correctly, you should see the xcache section in the PHP information page.

For more information about using the PHP XCache extension on a FreeBSD system, you can refer to the PHP XCache documentation and the php man page by running man php on the command line.

Created Time:2017-10-28 20:40:38  Author:lautturi