Note:
1, what is opcode? When PHP executes, it is compiled into opcode, and then the Zend engine executes opcode
2, PHP eaccelerator, memcached, XCache, APC 4 acceleration, cache expansion of the difference reference: http://www.jb51.net/article/88281.htm
XCache is a fast and stable PHP opcode cache. After good testing and stable operation on large flow/high load production machine. Test and support the latest release of all existing PHP branches (on Linux), such as Php_4_3 php_4_4 php_5_0 php_5_1 php_5_2 Head (6.x), and support thread-safe/windows. Better than the same opcode cache, such as the ability to quickly follow the PHP version
Http://www.hostloc.com/thread-256173-1-1.html
1, installation XCache:
# wget http://xcache.lighttpd.net/pub/Releases/3.0.1/xcache-3.0.1.tar.gz
# tar XF xcache-3.0.1.tar.gz
# CD xcache-3.0.1 #xcache是php的扩展, to load this extension #/usr/bin/phpize #phpize命令作用是要准备一个php扩展准备编译 using the PHP command
, the extension has to perform the compilation first
#./ Configure--enable-xcache--with-php-config=/usr/bin/php-config
#php-config indicates the ability to obtain PHP configuration information and compile-time option information;
# # Because it is not in the default path, XCache to get the functionality enabled by the PHP installation, XCache will not find the path to PHP
At the end of the installation, something like the following line appears:
Installing Shared extensions:/usr/lib64/php/modules/
2, PHP load XCache expansion
Extension_dir = "/usr/lib64/php/modules/"
Extension=amqp.so
Extension=xcache.so
3. Restart Service
Service PHP-FPM Restart
Service Nginx Restart
4, test, view phpinfo information, as shown in the following figure:
The above is a small set to introduce you to the CentOS PHP extended Xchche installation of the full description of the tutorial, I hope to help you, if you want to learn more content please pay attention to cloud habitat community!