zoukankan      html  css  js  c++  java
  • linux环境搭建系列之memcached安装步骤

    1、从官网在线下载最新的安装包  

    wget http://memcached.org/downloads/memcached-1.4.34.tar.gz 该命令为在线下载

    注意:最新的地址会变动,所以最好去官网上看看

    2、赋权限 chmod 777 文件名

    3、解压memcached安装包

    解压命令:tar -zvxf 文件名

    4cd memcached文件夹

    5./configure && make  &&  make install

    出现报错:

    解决方法:

    第一,我安装了libevent

    安装步骤:

    tar -xzvf libevent-1.3b.tar.gz
    cd libevent-1.3b
    ./configure --prefix=/安装目录

    make && make install

    测试是否安装成功

    ls -al /usr/lib | grep libevent

    第二,

    cd memcached

    ./configure && make  &&  make install

    依旧存在该问题

    specify its path using --with-libevent=/dir/

    该错误是告诉我们要配置libevent地址

    6、于是我配置了

    ./configure --prefix=memcached文件目录   -- with-libevent=libevent文件目录

    这个命令的意思:

    ./configure --变量名=某个值   就是设置这个变量的值

    命令行要切换到这个目录下才能设置里面的 configure 文件

    6、make && make install

    7、测试安装是否成功

    命令: ls -al /app/memcached/lmemcached文件夹 | grep memcached

     

    8、配置环境变量 

    #cd ~

    [root@localhost ~]# vi /etc/profile

    export PATH="/app/memcached/memcached-1.4.34/bin:$PATH"

    使其生效

    [root@localhost ~]# source /etc/profile

    测试是否生效

    [root@localhost ~]# ps -ef | grep memcached

    root      18683  18214  0 01:21 pts/1    00:00:00 grep memcached

    [root@localhost ~]# telnet 192.168.10.156 12000

    Trying 192.168.10.156...

    telnet: connect to address 192.168.10.156: Connection refused

    [root@localhost ~]# memcached -d -p 12000

    can't run as root without the -u switch

    [root@localhost ~]# su llxx

    [llxx@localhost root]$ memcached -d -p 12000

    [llxx@localhost root]$ ps -ef | grep memcached

    500       18708      1  0 01:23 ?        00:00:00 memcached -d -p 12000

    500       18716  18692  0 01:23 pts/1    00:00:00 grep memcached

    OK可以成功使用了。

  • 相关阅读:
    商品翻牌效果(纯css)
    3D旋转相册(纯css)
    3D旋转
    前端搜索js
    js打字的效果
    淡入淡出,类似于轮播图
    返回顶部
    java设计模式--状态模式
    java设计模式--抽象工厂模式
    java设计模式--观察者模式
  • 原文地址:https://www.cnblogs.com/llxx07/p/6473405.html
Copyright © 2011-2022 走看看