Skip to content

Instantly share code, notes, and snippets.

@irazasyed
Last active November 15, 2023 14:28
Show Gist options
  • Save irazasyed/6066507 to your computer and use it in GitHub Desktop.
Save irazasyed/6066507 to your computer and use it in GitHub Desktop.
How-To: Install Memcache on CentOS (WHM/cPanel)

How-To: Install Memcache on CentOS (WHM/cPanel)

Without wasting much time, Let us get started!

Follow these simple instructions:

  • Step 1: Login into your WHM panel and using easyapache enable Memcache

  • Step 2: SSH into your server and fire this command yum install memcached.x86_64 php-pecl-memcache.x86_64

  • Step 3: Go to Software -> Module Installers -> PHP Pecl, Search for memcache and then install both memcache & memcached

  • Step 4: Restart apache once, Fire: service httpd restart

  • Step 5: Start memcache by firing this command: memcached -d -m 512 -l 127.0.0.1 -p 11211 -u nobody (d = daemon, m = memory, u = user, l = IP to listen to, p = port)

  • Step 6: Check your memcached server is running successfully: ps -eaf | grep memcached

All Done! If everything goes good, You should now be able to use memcached within your application.

Enjoy Caching :)

@sharabh
Copy link

sharabh commented Sep 7, 2018

I see the option to enable Memcache for PHP 7.1 in EasyApache 4. Enabled it on my server and it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment