Ярлыки

.htaccess (4) тестирование (8) шаблоны проектирования (3) css (5) Debian (6) docker (2) Doctrine2 (6) Git (6) html (4) java (6) javascript (13) jquery (11) LFS (3) linux (23) mac os (4) mod_rewrite (2) MSSQL (4) MySQL (18) ORM Doctrine (17) patterns (3) PDO (3) perl (7) PHP (64) PHPUnit (8) Python (15) SEO (2) Silex (1) SimpleXML (1) SQL (14) ssh (4) Ubuntu (24) Yii1 (1) Zend Framework (19) ZendFramework2 (8)

суббота, 27 ноября 2010 г.

Debian. Установка memcache.

apt-get install memcached
ps aux | grep memcache
nobody    9224  0.0  0.0   2584  1084 ?        S    13:53   0:00 /usr/bin/memcached -m 64 -p 11211 -u nobody -l 127.0.0.1

Качаем Development package xampp и исходники модуля memcache для php c http://pecl.php.net/package/memcache.
Распаковываем:
debian:tar xvfz xampp-linux-devel-1.7.3a.tar.gz -C /opt 
debian:/home/leon/Downloads# exit
exit
leon@debian:~/Downloads$ tar xzf memcache-3.0.5.tgz 
leon@debian:~/Downloads$ cd memcache-3.0.5
leon@debian:~/Downloads/memcache-3.0.5$ sudo /opt/lampp/bin/phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

leon@debian:~/Downloads/memcache-3.0.5$ sudo apt-get install autoconf
...
leon@debian:~/Downloads/memcache-3.0.5$ sudo /opt/lampp/bin/phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
leon@debian:~/Downloads/memcache-3.0.5$ 
leon@debian:~/Downloads/memcache-3.0.5$ ./configure --enable-memcache --with-php-config=/opt/lampp/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... no
checking for gcc... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
leon@debian:~/Downloads/memcache-3.0.5$ sudo apt-get install gcc
...
leon@debian:~/Downloads/memcache-3.0.5$ ./configure --enable-memcache --with-php-config=/opt/lampp/bin/php-config
...
checking for the location of zlib... configure: error: memcache support requires ZLIB. Use --with-zlib-dir=<DIR>
to specify prefix where ZLIB include and library are located
...
leon@debian:~/Downloads/memcache-3.0.5$ sudo apt-get install zlib1g-dev
...
leon@debian:~/Downloads/memcache-3.0.5$ ./configure --enable-memcache --with-php-config=/opt/lampp/bin/php-config
leon@debian:~/Downloads/memcache-3.0.5$ sudo apt-get install make
leon@debian:~/Downloads/memcache-3.0.5$ make
leon@debian:~/Downloads/memcache-3.0.5$ sudo make install
...
Installing shared extensions:     /opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/
leon@debian:~/Downloads/memcache-3.0.5$ sudo nano /opt/lampp/etc/php.ini
Добавляем расширение:
extension="memcache.so"
Перезапускаем xampp ...

Комментариев нет:

Отправить комментарий