1、下载安装

sudo apt-get  install  build-essential
tar -zxf redis-2.2.13.tar.gz
cd redis-2.2.13
make
sudo make install

这时Redis 的可执行文件被放到了/usr/local/bin

2、下载配置文件和init启动脚本:

sudo mv redis-server /etc/init.d/redis-server
sudo chmod +x /etc/init.d/redis-server
sudo mv redis.conf /etc/redis.conf

3、初始化用户和日志路径

第一次启动Redis前,建议为Redis单独建立一个用户,并新建data和日志文件夹

sudo useradd redis
sudo mkdir -p /var/lib/redis
sudo mkdir -p /var/log/redis
sudo chown redis.redis /var/lib/redis
sudo chown redis.redis /var/log/redis

4、设置开机自动启动,关机自动关闭

sudo update-rc.d redis-server defaults

5、启动Redis:

sudo /etc/init.d/redis-server start

6、启动client客户端连接:

$ redis-cli
redis> set foo bar
OK
redis> get foo
"bar"

ubuntu安装启动redis的更多相关文章

  1. 在windows 下安装启动redis

    在windows环境下安装 redis这个需要在github中下载开源代码,https://github.com/mythz/redis-windows 下载最近的zip包然后 解压到任意一个盘符中进 ...

  2. Ubuntu 安装启动Tomcat

    首先下载ubuntu 的tar包 官网: http://tomcat.apache.org/download-80.cgi 安装启动 1 .下载对应的tar 2 .解压任意文件夹下,更改名字tomca ...

  3. ubuntu安装 LNMP+redis

    一.更新软件源 1.修改软件源为163的源 sudo vim /etc/apt/sources.list 替换源为163的源: deb http://mirrors.163.com/ubuntu/ i ...

  4. Ubuntu安装“启动引导器”的设备选哪一项,选默认还是选/boot分区?

    如果你要用Ubuntu的引导器代替Windows的引导器,就选 /dev/sda. 如果你要保留Windows的引导器,就选 /boot分区,但这样一来,装完Ubuntu重启后,只能启动Windows ...

  5. ubuntu 安装nginx redis dotnet

    1 安装nginx sudo apt-get update sudo apt-get install nginx 配置文件 /etc/nginx/nginx.conf 2 安装redis sudo a ...

  6. Ubuntu下启动 Redis时, 提示 "Can't open the log file: Permission denied failed"

    问题来源:在删除var目录下的log文件时,将redis文件夹删除了.然后在重启时:/etc/init.d/redis-server start,提示: Starting redis-server: ...

  7. Ubuntu下启动 Redis时, 提示 "Can't open the log file: Permission denied failed"

    问题来源:在删除var目录下的log文件时,将redis文件夹删除了.然后在重启时:/etc/init.d/redis-server start,提示: Starting redis-server: ...

  8. ubuntu安装mysql,redis,python-mysqldb

    sudo apt-get install mysql-server sudo apt-get install redis-server sudo apt-get install python-redi ...

  9. Window安装配置Redis

    一.下载windows版本的Redis github下载地址:https://github.com/MSOpenTech/redis/tags 二.安装启动Redis Redis 支持 32 位和 6 ...

随机推荐

  1. base64简单使用

    加密: import base64 import random str ="aqwertyuiopasdfghjklzxcvbnm963.0852741,.;'" a = '人生苦 ...

  2. TensorFlow环境

    vps cenots7自带的python2.7各种毛病,浪费了不少时间,装了pyhton3一下就搞定了 mac上有些依赖库需要sudo安装 vps上是基于Anaconda搭建的,感谢极客学院的教程ht ...

  3. java 抽象类 abstract

    package cn.sasa.com; //抽象类 被abstract修饰的类 public abstract class Animal { //抽象类的成员变量 的定义 与 一般类是一样的 pri ...

  4. ActiveMQ介绍及安装

    1.   ActiveMQ 1.1. 什么是ActiveMQ ActiveMQ 是Apache出品,最流行的,能力强劲的开源消息总线.ActiveMQ 是一个完全支持JMS1.1和J2EE 1.4规范 ...

  5. lsof 命令

    [root@localhost ~]# lsof COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME init root cwd DIR , / in ...

  6. 前端 HTML body标签相关内容 常用标签 列表标签 ul,ol,li

    列表标签 ul,ol,li ul.ol.li标签 都属于块级标签,独占一行 网站页面上一些列表相关的内容比如说物品列表.人名列表等等都可以使用列表标签来展示.通常后面跟<li>标签一起用, ...

  7. python安装提示错误Could not find a version that satisfies the requirement dateutil

    今天ytkah在安装python3组件时提示如下错误,这个是缺少依赖的问题,就试着用pip3 install dateutil,但还是提示同样的错误,怎么处理呢? Could not find a v ...

  8. pycharm 运行py文件一直updating indexing

    1.解决一直索引python目录下的文件 File - Settings - Project: yourprojectname - Project Structure - Right click on ...

  9. NYOJ 最大和

    #include<iostream> #include<algorithm> #include<string> using namespace std; ][]; ...

  10. 万恶之源 - Python包的应用

    包的简介 你们听到的包,可不是女同胞疯狂喜欢的那个包,我们来看看这个是啥包 官方解释: Packages are a way of structuring Python’s module namesp ...