23
2024
08
17:05:09

FAQ: Installation: PHP Modules 安装Memcached模块

https://github.com/BoldGrid/w3-total-cache/wiki/FAQ:-Installation:-PHP-Modules#install-memcached-module



FAQ: Installation: PHP Modules

Frederick Townes edited this page on Dec 19, 2018 · 4 revisions

Installation

The following modules are recommended for installation in order to support various caching methods:

  • php-redis

  • php-memcache

  • php-memcached

  • php-opcache

Ubuntu/Debian

apt-get -y install php-redis php-memcache php-memcached php-opcache
service php*-fpm restart

Install Memcached Module

Using PECL:

pecl install memcached

Or manually:

cd /usr/local/src
wget http://pecl.php.net/get/memcache-2.2.6.tgz
tar -xzf memcache-2.2.6.tgz
cd memcache-2.2.6
phpize && ./configure
make && make install

Use the memcache.ini file we prepared for you:

cp /path/to/your/website/wp-content/plugins/w3-total-cache/ini/memcache.ini /etc/php.d/

Restart Apache:

/etc/init.d/httpd restart

Test module:

php -r 'phpinfo();' | grep 'memcache'

Install Alternative PHP Cache (APC) Module

Install APC using PECL:

pecl install apc

Or manually:

cd /usr/local/src
wget http://pecl.php.net/get/APC-3.1.9.tgz
tar -xzf APC-3.1.9.tgz
cd APC-3.1.9
phpize
./configure --enable-apc --enable-apc-mmap --with-apxs=/usr/sbin/apxs --with-php-config=/usr/bin/php-config
make && make install

The paths for --with-apxs= and ---with-php-config= should be the same as the output of:

whereis php-config
whereis apxs

Installation was successful if the output looks like this:

Installing shared extensions: /usr/lib/php/modules/

Configure APC

Use the apc.ini file we prepared for you:

cp /path/to/your/website/wp-content/plugins/w3-total-cache/ini/apc.ini /etc/php.d/

Restart apache when ready:

/etc/init.d/httpd restart

Test the module:

php -r 'phpinfo();' | grep 'apc'

Install XCache Module

cd /usr/local/src
wget http://xcache.lighttpd.net/pub/Releases/1.3.2/xcache-1.3.2.tar.gz
tar -xzf xcache-1.3.2.tar.gz
cd xcache-1.3.2
phpize && ./configure --with-php-config=/usr/bin/php-config --enable-xcache --enable-xcache-optimizer --enable-xcache-coverager
make && make install

The path for ---with-php-config= should be the same as the output of:

whereis php-config

Installation was successful if the output looks like this:

Installing shared extensions: /usr/lib/php/modules/

Configure XCache Module

Use the xcache.ini file we prepared for your:

cp /path/to/your/website/wp-content/plugins/w3-total-cache/ini/xcache.ini /etc/php.d/

Restart apache when ready:

/etc/init.d/httpd restart

Test the module:

php -r 'phpinfo();' | grep 'xcache'

Install eAccelerator Module

cd /usr/local/src
wget http://autosetup1.googlecode.com/files/eaccelerator-0.9.5.3.tar.bz2
tar -xjf eaccelerator-0.9.5.3.tar.bz2
cd eaccelerator-0.9.5.3
phpize && ./configure --with-eaccelerator-shared-memory --with-php-config=/usr/bin/php-config
make && make install

The path for ---with-php-config= should be the same as the output of:

whereis php-config

Installation was successful if the output looks like this:

Installing shared extensions: /usr/lib/php/modules/

Configure eAccelerator Module

Use the eaccelerator.ini file we prepared for your:

cp /path/to/your/website/wp-content/plugins/w3-total-cache/ini/eaccelerator.ini /etc/php.d/

Restart apache when ready:

/etc/init.d/httpd restart

Test the module:

php -r 'phpinfo();' | grep 'eaccelerator'

New Relic Module

Find requirements and installation instructions on New Relic website: Installing New Relic for PHP.

To see if this server supports New Relic click "compatibility check" on the Dashboard tab. Other key resources can be found below:




推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

本文链接:https://hqyman.cn/post/7765.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:
打赏





休息一下~~


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

请先 登录 再评论,若不是会员请先 注册

您的IP地址是: