memcached install ubuntu
sudo apt-get update && sudo apt install memcached
install memcached tools
sudo apt install libmemcached-tools
configure memcached on ubuntu
sudo nano /etc/memcached.conf
restart memcached on ubuntu server
sudo systemctl restart memcached
All memac hed port on firewall ufw
ufw allow 11211
root@-s-4vcpu-8gb-blr1-01:~# ufw allow 11211
WARN: Skipping ‘openssh-server’: couldn’t process
Rule added
Rule added (v6)
note: you may cloud provider firewall also : digital ocean firewall.
check memcached listening on port
sudo netstat -plunt
root@-s-4vcpu-8gb-blr1-01:~# sudo netstat -plunt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 23277/nginx: master
tcp 0 0 0.0.0.0:1022 0.0.0.0:* LISTEN 1628/sshd
tcp 0 0 0.0.0.0:20482 0.0.0.0:* LISTEN 3529/sshd
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 18109/php-fpm: mast
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 7871/mysqld
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 32494/redis-server
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 23277/nginx: master
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 746/systemd-resolve
tcp6 0 0 :::1022 :::* LISTEN 1628/sshd
tcp6 0 0 :::20482 :::* LISTEN 3529/sshd
tcp6 0 0 :::33060 :::* LISTEN 7871/mysqld
tcp6 0 0 ::1:6379 :::* LISTEN 32494/redis-server
udp 0 0 127.0.0.53:53 0.0.0.0:* 746/systemd-resolve
check memcached running or not
telnet localhost 11211
install memcache php client
apt install memcache
memcached install wordpress w3tc configuration
verify working with http header
memcached vs redis
note people are using redis as of now,
memcached only supports strings and objects but supports more features
read more at redis vs memcached