Advertisement: Linux VPS from $4/month - contact support for custom offer.
+ Post New Thread
Results 1 to 2 of 2

Thread: Install memcache/memcached on WHM linux centos server

  1. #1
    Join Date
    Mar 2013

    Install memcache/memcached on WHM linux centos server

    How to install memcache/memcached at Linux CentOS with WHM control panel.

    WHM / Software / Easyapache / Build based on previous ... tick (enable) memcache (in extended apps), Build

    SSH command: yum install memcached
    if not found, try installing so called EPEL or RPMFORGE repository.

    WHM / Software / Module Installers / PHP Pecl / search for memcache and install memcache + memcached

    SSH command: service httpd restart

    5. Veriffy its running by looking phpinfo();
    example adding following code into a .php file and running it, find "memcache" on that page.
    <?php phpinfo(); ?>
    6. In my case memcached was not running even it was found in phpinfo(). So make it running and make it run at boot (it was off by default)
    service memcached restart
    chkconfig memcached on

    7. Configuration file: /etc/init.d/memcached (need to restart memcached after its changed)

    8. See memcached stats: memcached-tool stats
    (total_connections value should be increasing as time will go / websites are loaded)

    curr_connections Current number of open connections.
    cmd_get Total number of retrieval requests (get operations).
    cmd_set Total number of storage requests (set operations).
    get_hits Number of keys that have been requested and found present.
    limit_maxbytes Number of bytes this server is permitted to use for storage.
    bytes Current number of bytes used by this server to store items.
    evictions Number of valid items removed from cache to free memory for new items.

    9. Have firewall, make sure port 11211 is in the allowed ports. I have CSF firewall, so i editted /etc/csf/csf.conf
    And added 11211 to the TCP_IN and TCP_OUT line and restarted firewall by command "csf -r"

    10. PHP testing script for memcache:
    $mem = new Memcache();
    $mem->addServer("", 11211);

    $result = $mem->get("blah");

    if ($result) {
    echo $result;
    } else {
    echo "No matching key found. I'll add that now!";
    $mem->set("blah", "I am data! I am held in memcached!") or die("Couldn't save anything to memcached...");

  2. #2
    Join Date
    Mar 2013

    Is this useful / helpfull? Yes | No
    Hi, im newbie too, but i would check "memcached-tool" command (mentioned in the first post) output. if evictions is zero or near zero, i guess you dont need to increase memory size, maybe

+ Post New Thread

Similar Threads

  1. Replies: 0
    Last Post: 07-29-2016, 04:15 PM
  2. Replies: 0
    Last Post: 07-24-2016, 03:09 PM
  3. Replies: 0
    Last Post: 11-02-2014, 11:17 AM
  4. Replies: 0
    Last Post: 05-27-2014, 08:47 AM
  5. How to install webmin on Linux OS (Centos)
    By Fli in forum Linux Forums
    Replies: 0
    Last Post: 04-05-2013, 02:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
 Protected by : ZB BLOCK  &  StopForumSpam