zoukankan      html  css  js  c++  java
  • ubuntu -- 安装memcached

    Memcached的安装依赖libevent。它是memcached所依赖的异步事件通知库,因此在安装memcached之前先要安装libevent

    ubuntu安装软件的方法通常有两种

    第一种:使用ubuntu自带软件安装包进行自动安装;

    第二种:使用源码安装(推荐使用源码安装,因为ubuntu版本不同,所以导致自动安装的软件并非是最新的)

    自动安装

    1、安装libevent:

      sudo apt-get install libevent 

    2、安装memcached

      sudo apt-get install memcached

    注:看起来很方便,但是有时候ubuntu中会出各种问题,比如找不到下载包啊...导致这种安装很难一次成功

     

    源码安装

    1、分别下载 libevent 和 memcached 的压缩文件

      libevent下载地址:http://libevent.org 

      memcached下载地址:http://www.memcached.org

      注:这下载地址并非绝对,能下载到就行

    2、分别解压 tar zxvf ....

    3、分别进入各解压后的文件

      3.1、"./configure --prefix=/usr"  配置安装目录,并非一定要在 /usr 下,但必须保证 libevent 和 memcached 必须安装在同一个目录下

      3.2、"make"            编译

      3.3、"make install"          安装

     

    测试是否安装成功

      1、执行:"memcached -d -m 64 -p 11211 -u root" 运行memcached

      2、执行:"telnet 127.0.0.1 11211"  出现以下情况,说明安装成功

        

     

     

  • 相关阅读:
    谈谈我对雾霾的看法
    2016年书单分享
    我的面试心得:面试官视角
    Cesium原理篇:GroundPrimitive
    Cesium原理篇:Batch
    Peter Hessler和他的中国三部曲(上)
    Cesium原理篇:Material
    全球PM25实时可视化
    Cesium原理篇:Property
    次郎的寿司梦
  • 原文地址:https://www.cnblogs.com/hf8051/p/5073729.html
Copyright © 2011-2022 走看看