标签:memcached
centos安装memcached
1、查看memcached是否有版本。
[root@iZ94uyronrjZ bin]# yum list memcached Loaded plugins: security base | 3.7 kB 00:00 epel | 4.4 kB 00:00 epel/primary_db | 6.7 MB 00:01 extras | 3.4 kB 00:00 updates | 3.4 kB 00:00 updates/primary_db | 4.4 MB 00:01 Installed Packages memcached.x86_64
2、安装
yum install memcached.x86_64
[root@iZ94uyronrjZ bin]# service memcached start Starting memcached: [ OK ] [root@iZ94uyronrjZ bin]# netstat -antp | grep memcached tcp 0 0 0.0.0.0:11211 0.0.0.0:* LISTEN 8544/memcached [root@iZ94uyronrjZ bin]#
[root@iZ94uyronrjZ bin]# memcached-tool 127.0.0.1:11211 stats #127.0.0.1:11211 Field Value accepting_conns 1 auth_cmds 0 auth_errors 0 bytes 716 bytes_read 1945 bytes_written 144 cas_badval 0 cas_hits 0 cas_misses 0 cmd_flush 0 cmd_get 0 cmd_set 6 conn_yields 0 connection_structures 7 curr_connections 6 curr_items 2 decr_hits 0 decr_misses 0 delete_hits 0 delete_misses 0 evictions 0 get_hits 0 get_misses 0 incr_hits 0 incr_misses 0 limit_maxbytes 67108864 listen_disabled_num 0 pid 8544 pointer_size 64 rusage_system 0.001999 rusage_user 0.002999 threads 4 time 1437824548 total_connections 7 total_items 6 uptime 139 version 1.4.4 [root@iZ94uyronrjZ bin]#
4、修改端口等参数
vim /etc/init.d/memcached
或者
vim /etc/sysconfig/memcached
哪个有效,或者都有效。。。
PORT=11211 //端口 USER=memcached //使用的用户名 MAXCONN=1024 //同时最大连接数 CACHESIZE=64 //使用的内存大小 OPTIONS="" // 附加参数
5、设置开机启动
chkconfig --level 2345 memcached on
还有啥!待补充。。。
版权声明:本文为博主原创文章,未经博主允许不得转载。
【Memcached】linux centos 安装memcached和它的常用基本操作
标签:memcached
原文地址:http://blog.csdn.net/fcly2013/article/details/47059321