Skip to main content

Installing memcached And The PHP5 On Debian Etch (Apache2)

I have tested this on a Debian Etch server where Apache2 and PHP5 are already installed and working.  apt-get install memcached php5-memcache

server1:~# netstat -tap | grep memcached
tcp        0      0 *:11211                 *:*                     LISTEN     3053/memcached  vi /etc/memcached.conf

# Specify which IP address to listen on. The default is to listen on all IP addresses
# This parameter is one of the only security measures that memcached has, so make sure
# it's listening on a firewalled interface.
# -l
[...]  /etc/init.d/memcached restart

... and run

netstat -tap | grep memcached

again. As you see, memcached is now listening on localhost only:

server1:~# netstat -tap | grep memcached
tcp        0      0 localhost.localdo:11211 *:*                     LISTEN     3092/memcached

Afterwards, we restart Apache so that our new PHP configuration takes effect:

/etc/init.d/apache2 restart


  • Hits: 6614