Memcache:
Cài đặt server client : http://www.cyberciti.biz/faq/howto-install-memcached-under-rhel-fedora-centos/
MongoDB:
Cài đặt mongoDB Server thực hiện theo hướng dẫn sau: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/
Cài đặt mongoDB php driver làm theo hướng dẫn sau: http://docs.mongodb.org/ecosystem/drivers/php/
Nếu gặp issue khi cài đặt mongo client xem theo hướng dẫn sau: http://www.if-not-true-then-false.com/2010/install-php-mongodb-mongo-driver-on-linux-mac-os-x-windows-unix-bsd/
Nếu gặp lỗi :
1 2 |
sh: phpize: command not found ERROR: `phpize' failed |
Cần cài đặt php-devel : yum -y install php-devel
Nếu găp lỗi : zlib errors . Cần cài đặt zlib-devel : yum install zlib-devel
Tham khảo thêm: http://www.maxwhale.com/how-to-install-memcached-on-centos-6/
Check kết quả xem memcache và mongo client đã được cài đặt thành công hay chưa : pecl list
[root@test ~]# pecl list
Installed packages, channel pecl.php.net:
=========================================
Package Version State
memcache 3.0.5 beta
mongo 1.4.5 stable
Cài đặt MongoDB trên Fedora cần tham khảo nguồn sau: http://stackoverflow.com/questions/11081822/mongodb-service-not-running-in-fedora
Nếu gặp thêm issue : /usr/bin/php: symbol SSLeay_version, version OPENSSL_1.0.1 not defined in file libcrypto.so.10 with link time reference . Cần nâng cấp gói openssl để tương thích :
[root@localhost ]# yum update openssl
APC :
[root@localhost ]#pecl install apc
downloading APC-3.1.13.tgz …
Starting to download APC-3.1.13.tgz (171,591 bytes)
……………………………….done: 171,591 bytes
55 source files, building
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
Enable internal debugging in APC [no] : no
Enable per request file info about files used from the APC cache [no] :no
Enable spin locks (EXPERIMENTAL) [no] : no
Enable memory protection (EXPERIMENTAL) [no] : no
Enable pthread mutexes (default) [no] : no
Enable pthread read/write locks (EXPERIMENTAL) [yes] : no
building in /var/tmp/pear-build-rootNPUh0n/APC-3.1.13
………….
Build process completed successfully
Installing ‘/usr/lib64/php/modules/apc.so’
Installing ‘/usr/include/php/ext/apc/apc_serializer.h’
install ok: channel://pecl.php.net/APC-3.1.13
configuration option “php_ini” is not set to php.ini location
You should add “extension=apc.so” to php.ini
# somewhere in you php.ini file add extension
extension=apc.so
# copy the shipped apc.php to see what is going on wit apc on your server
cp /usr/share/pear/apc.php /root_dir_of_your_web_app
to see stats of APC running
http://localhost/root_dir_of_your_web_app/apc.php
#uninstall apc
[root@localhost ]#pecl uninstall apc