大漠駝鈴

          置身浩瀚的沙漠,方向最為重要,希望此blog能向大漠駝鈴一樣,給我方向和指引。
          Java,Php,Shell,Python,服務器運維,大數據,SEO, 網站開發、運維,云服務技術支持,IM服務供應商, FreeSwitch搭建,技術支持等. 技術討論QQ群:428622099
          隨筆 - 238, 文章 - 3, 評論 - 117, 引用 - 0
          數據加載中……

          CentOS7安裝Memcached 三步曲

          1.yum 安裝
          yum clean all
          yum -y update
          yum -y install memcached
          2.Memcached 運行
          memcached -h

          //查看考號修改配置
          vim /etc/sysconfig/memcached
          內容如下:
          PORT=”11211″
          USER=”memcached”
          MAXCONN=”1024″
          CACHESIZE=”64″
          OPTIONS=”"

          可以修改端口,用戶和最大內存,緩存大小
          //重啟,啟動,開機啟動,狀態,關閉
          systemctl restart memcached
          systemctl start memcached
          systemctl enable memcached
          systemctl status memcached
          systemctl stop memcached


          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           0
                        bytes_read           7
                     bytes_written           0
                        cas_badval           0
                          cas_hits           0
                        cas_misses           0
                         cmd_flush           0
                           cmd_get           0
                           cmd_set           0
                         cmd_touch           0
                       conn_yields           0
             connection_structures          11
                  curr_connections          10
                        curr_items           0
                         decr_hits           0
                       decr_misses           0
                       delete_hits           0
                     delete_misses           0
                 evicted_unfetched           0
                         evictions           0
                 expired_unfetched           0
                          get_hits           0
                        get_misses           0
                        hash_bytes      524288
                 hash_is_expanding           0
                  hash_power_level          16
                         incr_hits           0
                       incr_misses           0
                          libevent 2.0.21-stable
                    limit_maxbytes    67108864
               listen_disabled_num           0
                               pid       27929
                      pointer_size          64
                         reclaimed           0
                      reserved_fds          20
                     rusage_system    0.055134
                       rusage_user    0.091092
                           threads           4
                              time  1429863174
                 total_connections          11
                       total_items           0
                        touch_hits           0
                      touch_misses           0
                            uptime         910
                           version      1.4.15
          3.擴展一下,安裝PHP-memcache擴展,防火墻放開11211端口
          yum -y install php-pecl-memcache
          如果是PHP56版本的應該運行
          yum -y install php56w-pecl-memcache
          防火墻放開11211
          firewall-cmd --permanent --zone=public --add-port=11211/tcp
          檢查端口是否開放
          echo stats | nc memcache_host_name_or_ip 11211

          posted on 2015-04-25 15:40 草原上的駱駝 閱讀(13382) 評論(0)  編輯  收藏 所屬分類: 應用服務器Linux

          主站蜘蛛池模板: 磐安县| 长泰县| 北川| 宕昌县| 保亭| 莲花县| 无锡市| 潮州市| 黑河市| 新密市| 荔浦县| 镇巴县| 津南区| 灵石县| 禄丰县| 瓮安县| 乌鲁木齐县| 邢台县| 娱乐| 安泽县| 和龙市| 招远市| 右玉县| 罗源县| 奇台县| 鹿泉市| 东源县| 高唐县| 右玉县| 福贡县| 余姚市| 凤山市| 古丈县| 屏边| 东安县| 科尔| 冀州市| 驻马店市| 米林县| 彭水| 城步|