Redis基础教程第1节 Ubuntu Linux 上安装Redis

本文将介绍如何安装redis在ubuntu系统上面。


步骤如下:

1. ~$ sudo apt-get update


2. ~$ sudo apt-get install make gcc python-dev

3.  下载, 解压和编译compile Redis:

    

1
2
3
4
$ wget http://download.redis.io/releases/redis-3.2.0.tar.gz
    tar xzf redis-3.2.0.tar.gz
    cd redis-3.2.0
    make




4. 启动Redis-server:
    The binaries that are now compiled are available in the src directory. Run Redis with:

1
2
michael@ubuntu:~$ cd redis-3.2.0
    $ src/redis-server



5. 启动默认Redis-client并与Server进行交互

1
2
3
4
5
6
 michael@ubuntu:~$ cd redis-3.2.0
    $ src/redis-cli
    redis> set name HelloWorld
    OK
    redis> get name
    "HelloWorld"









本文转自 yuanzhitang 51CTO博客,原文链接:http://blog.51cto.com/yuanzhitang/1782316,如需转载请自行联系原作者
上一篇:ubuntu安装python3.8


下一篇:ubuntu安装和查看已安装