- Joined
- Dec 8, 2012
- Messages
- 773
- Points
- 63
1. Install repo
Check your OS version
Read more guides here: https://forumweb.hosting/13638-how-to-check-centos-version.html
After check OS version, you can choose one of Repo as follows to install Memcached on your hosting
2. Install memcached
3. Configure memcached
Using the command
For example:
PORT : memcached uses port 1121
MAXCONN : maximum connections to your server
CACHESIZE : How much MB of ram for storing cache files
4. Restart memcached and auto start when booting your server
5. Check memcached status
For example, you should see these
Check your OS version
Read more guides here: https://forumweb.hosting/13638-how-to-check-centos-version.html
After check OS version, you can choose one of Repo as follows to install Memcached on your hosting
Code:
[B]#Centos 5.x_86[/B]
rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
[B]#Centos 5.x_x86_x64[/B]
rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm
[B]#Centos 6.x_86[/B]
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
[B]
#Centos 6.x_x86_64[/B]
rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
Code:
yum install memcached -y
3. Configure memcached
Using the command
Code:
/etc/sysconfig/memcached
Code:
PORT="11211"
USER="memcached"
MAXCONN="10024"
CACHESIZE="128"
OPTIONS="-1 127.0.0.1"
MAXCONN : maximum connections to your server
CACHESIZE : How much MB of ram for storing cache files
4. Restart memcached and auto start when booting your server
Code:
/etc/init.d/memcached start
/etc/init.d/memcached stop
chkconfig --levels 235 memcached on
Code:
netstat -tulpn | grep :11211
Code:
[root@server /]# netstat -tulpn | grep :11211
tcp 0 0 0.0.0.0:11211 0.0.0.0:* LISTEN 12314/memcached
tcp 0 0 :::11211 :::* LISTEN 12314/memcached
udp 0 0 0.0.0.0:11211 0.0.0.0:* 12314/memcached
udp 0 0 :::11211 :::* 12314/memcached