Install Memcached And PHP5-MemCached Module On Debian 6.0 (Squeeze)
|
Submitted by anthony.zhan (Contact Author) (Forums) on Fri, 2011-11-25 17:23. :: Debian | Web Server | Apache | PHP
Install Memcached And PHP5-MemCached Module On Debian 6.0 (Squeeze)"Memcached is free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load." This article is going to explain how to install memcached and PHP5-MemCached module on a Debian 6.0(Squeeze) system with Apache2.
1. Installingapt-get install memcached php5-memcached "apt-get" is a very powerful command-line tool for handling packages. Here is a tip about how to use "apt-get", take this situation as an example: I'm going to install Memcached and php module associated with it, but I'm not quite sure about the exact name of the packages, then we can use the following command to search the available package lists: apt-cache search memcache Then you will find something like this: memcached - A high-performance memory object caching system You should find both php5-memcache and php5-memcached, php5-memcached is newer and has sessions support. Here I'm going to use php5-memcached.
2. Testing2.1 Testing MemcachedAfter the installation, memcached should already be running. You can have a check by using the following command: netstat -tap | grep memcached Usually you will get something like this: tcp 0 0 localhost:11211 *:* LISTEN 2132/memcached You can change its configuration by modifying the file /etc/memcached.conf.
2.2 Testing PHP5-Memcached ModuleFirst you need restart Apache web server, /etc/init.d/apache2 restart Create a php file which accessible from web and copy the content to the file: vi phpinfo.php <? Then use browser to open the php file to check result.
3. UsingFor more detail please check http://www.php.net/manual/en/book.memcached.php, here is a simple example: <?php
4. Links
PHP-MemCached Module
|



Recent comments
4 hours 9 min ago
5 hours 8 min ago
8 hours 55 min ago
10 hours 9 min ago
13 hours 46 min ago
21 hours 1 min ago
1 day 5 hours ago
1 day 7 hours ago
1 day 22 hours ago
2 days 54 min ago