Memcached centos 5 设置
- font size decrease font size increase font size
- Print Email
(3) 設置memcached
vim /etc/sysconfig/memcached PORT="11211" USER="memcached" MAXCONN="1024" CACHESIZE="512" OPTIONS=""
(4) 啟動memcached
# Set Memcached to start automatically on boot chkconfig memcached on # Start Memcached /etc/init.d/memcached start ## OR ## service memcached start
(5) 檢查memcached是否正常的運作。
yum install nc
nc = netcat
echo stats | nc localhost 11211 STAT pid 7599 STAT uptime 10 STAT time 1265288542 STAT version 1.4.4 STAT pointer_size 32 STAT rusage_user 0.003999 STAT rusage_system 0.052991 STAT curr_connections 10 STAT total_connections 11 STAT connection_structures 11 STAT cmd_get 0 STAT cmd_set 0 STAT cmd_flush 0 STAT get_hits 0 STAT get_misses 0 STAT delete_misses 0 STAT delete_hits 0 STAT incr_misses 0 STAT incr_hits 0 STAT decr_misses 0 STAT decr_hits 0 STAT cas_misses 0 STAT cas_hits 0 STAT cas_badval 0 STAT auth_cmds 0 STAT auth_errors 0 STAT bytes_read 6 STAT bytes_written 0 STAT limit_maxbytes 536870912 STAT accepting_conns 1 STAT listen_disabled_num 0 STAT threads 4 STAT conn_yields 0 STAT bytes 0 STAT curr_items 0 STAT total_items 0 STAT evictions 0 END # Try to get some value echo get some_value | nc localhost 11211 END # Not found, but check the stats again echo stats | nc localhost 11211 STAT pid 7599 STAT uptime 10 STAT time 1265288542 STAT version 1.4.4 [...] STAT cmd_get 1 STAT cmd_set 0 STAT cmd_flush 0 STAT get_hits 0 STAT get_misses 1 STAT delete_misses 0 [...] STAT evictions 0 END
Last modified onTuesday, 26 March 2013 14:53
Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
back to top