Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Sunday, 15 May 2016

Install & Configure Memcached With phpMemcachedAdmin on CentOS/RHEL 6x

Install & Configure Memcached With phpMemcachedAdmin on CentOS/RHEL 6x

Q. What Is Memcached ?

-- Memcached is a general-purpose distributed memory caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read.

Step: 1. Bind Hosts File :

# vi /etc/hosts

192.168.72.141    memcache.domain.com    memcache

-- Save & Quit (:wq)

Step: 2. Disable Selinux & Stop Firewall :

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

# service iptables stop
# chkconfig iptables off

Step: 3. Reboot the System :

# init 6

Step: 4. Configure EPEL Repo :

# yum -y install epel-release

Step: 5. Install Apache Server :

# yum -y install httpd httpd-devel

Step: 6. Install PHP :

# yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml php-xmlrpc php-snmp

Step: 7. Install Memcached :

# yum -y install memcached

Step: 8. Configure Memcached :

# vi /etc/sysconfig/memcached

# Running on Port 11211
PORT="11211"

# Start as memcached daemon
USER="memcached"

# Set max simultaneous connections to 1024
MAXCONN="1024"

# Set Memory size to 2048 - 4GB(4096)
CACHESIZE="2048"

# Set server IP address
OPTIONS="-l 192.168.72.141"

-- Save & Quit (:wq)

Step: 9. Start Memcached :

# chkconfig memcached on
# service memcached start
# service memcached status

Step: 10. Verifing Memcached :

# netstat -tulpn | grep :11211

# memcached-tool 192.168.72.141 stats

Step: 11. Install Memcached PHP Extension :

# yum -y install php-pecl-memcached php-pecl-memcache

Step: 12. Install Memcached Perl Library :

# yum -y install perl-Cache-Memcached

Step: 13. Install Memcached Python Library :

# yum -y install python-memcached

Step: 14. Star Apache Server :

# service httpd restart
# chkconfig httpd on

Step: 15. Configure Memcache For Web Monitoring :

# cd /var/www/html
# mkdir memcached
# cd memcached
# wget http://phpmemcacheadmin.googlecode.com/files/phpMemcachedAdmin-1.2.2-r262.tar.gz
# tar -xvzf phpMemcachedAdmin-1.2.2-r262.tar.gz
# chmod +rx *
# chmod 0777 Config/Memcache.php
# chmod 0777 Temp/
# rm phpMemcachedAdmin-1.2.2-r262.tar.gz

Step: 16. Configure Apache Password Protected Directory :

# vi /etc/httpd/conf/httpd.conf

<Directory /var/www/html/memcached>
        Options -Indexes +Multiviews
           DirectoryIndex index.php index.html
        AllowOverride AuthConfig

        AuthUserFile /etc/httpd/.htpasswd
        AuthName "phpMemcachedAdmin Login Area"
        AuthType Basic
        require user memadmin
        

        Allow from all
</Directory>

-- Save & Quit (:wq)


Step: 17. Setup AuthUserFile for Apache :

# htpasswd -cm /etc/httpd/.htpasswd memadmin

New password:
Re-type new password:
Adding password for user memadmin


Step: 18. Restart Apache Service & Access URL :

# service httpd restart

http://192.168.72.141/
memcached

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog


memcached is an open source distributed memory object caching system used for accelerating applications.  - See more at: https://docs.nexcess.net/article/what-is-memcached.html#sthash.g7XxDDq9.dpuf
memcached is an open source distributed memory object caching system used for accelerating applications. - See more at: https://docs.nexcess.net/article/what-is-memcached.html#sthash.g7XxDDq9.dpuf
memcached is an open source distributed memory object caching system used for accelerating applications. - See more at: https://docs.nexcess.net/article/what-is-memcached.html#sthash.g7XxDDq9.dpuf
memcached is an open source distributed memory object caching system used for accelerating applications. - See more at: https://docs.nexcess.net/article/what-is-memcached.html#sthash.g7XxDDq9.dpuf
memcached is an open source distributed memory object caching system used for accelerating applications. - See more at: https://docs.nexcess.net/article/what-is-memcached.html#sthash.g7XxDDq9.dpuf
memcached is an open source distributed memory object caching system used for accelerating applications. - See more at: https://docs.nexcess.net/article/what-is-memcached.html#sthash.g7XxDDq9.dpuf
memcached is an open source distributed memory object caching system used for accelerating applications. - See more at: https://docs.nexcess.net/article/what-is-memcached.html#sthash.g7XxDDq9.dpuf

0 comments:

Post a Comment

Copyright © 2016 Kousik Chatterjee's Blog