Home >Backend Development >PHP Tutorial >Install memcache and php extensions

Install memcache and php extensions

巴扎黑
巴扎黑Original
2016-11-11 11:14:58922browse

Install memcache

tar zxvf memcache-2.2.5.tgz
cd memcache-2.2.5/
/usr/local/php/bin/phpize (?)
./configure --with-php-config=/usr /local/php/bin/php-config
make
sudo make install

Install the Memcache PHP extension
1. Select the memcache version you want to download at http://pecl.php.net/package/memcache.
2. Install PHP’s memcache extension
tar vxzf memcache-2.2.1.tgz
cd memcache-2.2.1
/usr/local/php/bin/phpize
./configure --enable-memcache --with-php -config=/usr/local/php/bin/php-config --with-zlib-dir
make
make install
Note: After installation, Installing shared extensions: /usr/local/php/lib/php will appear /extensions/no-debug-non-zts-20090626/
3. Add the following two lines at the end of php.ini, before END

extension_dir = "/usr/local/php/lib/php/extensions/no- debug-non-zts-20090626/"

extension=memcache.so

4. Restart php
5. Use phpinfo(); to check whether memcache is installed successfully

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn