Redis 安装:

$ wget http://redis.googlecode.com/files/redis-2.4.5.tar.gz

$ tar xzf redis-2.4.5.tar.gz

$ cd redis-2.4.5

$ make & make install

测试:

$ src/redis-server

$ src/redis-cli

auth haojg //haojg是密码

redis> set foo bar

OK

redis> get foo

"bar"

将redis.conf中的daemonize no 变成daemonize yes

$ cd ../utils/

$./install_server     //安装启动服务

显示信息:

root@hman utils]# ./install_server.sh

Welcome to the redis service installer

This script will help you easily set up a running redis server

Please select the redis port for this instance: [6379]

Selecting default: 6379

Please select the redis config file name [/etc/redis/6379.conf]

Selected default - /etc/redis/6379.conf

Please select the redis log file name [/var/log/redis_6379.log]

Selected default - /var/log/redis_6379.log

Please select the data directory for this instance [/var/lib/redis/6379]

Selected default - /var/lib/redis/6379

Please select the redis executable path [/usr/local/bin/redis-server]

s#^port [0-9]{4}$#port 6379#;s#^logfile .+$#logfile /var/log/redis_6379.log#;s#^dir .+$#dir /var/lib/redis/6379#;s#^pidfile .+$#pidfile /var/run/redis_6379.pid#;s#^daemonize no$#daemonize yes#;

Copied /tmp/6379.conf => /etc/init.d/redis_6379

Installing service...

./install_server.sh: line 178: update-rc.d: command not found

exists, process is already running or crashed

Installation successful!

默认就可以了,一路回车

执行完后,查看/etc/redis/6379.conf,这个文件默认不能用chkconfig来添加到启动项,会报错的,可以使用附件里的文件来替换或修改。

fedorea19安装redis的更多相关文章

  1. Ubuntu安装redis并配置远程、密码以及开启php扩展

    一.前言 redis是当前流行的nosql数据库,很多网站都用它来做缓存,今天我们来安装并配置下redis 二.安装并配置redis 1.安装redis sudo apt-get install re ...

  2. CentOS 7 下安装redis步骤

    1. 从redis官网下载redis源码,本例安装在/usr/opt下 [root@localhost opt]# pwd /usr/opt [root@localhost opt]# wget ht ...

  3. 安装redis以windows服务形式

    安装redis以windows服务形式 安装redis以windows服务形式 redis windows windows 服务 以前跑redis,老是要开一个命令行窗口,一旦关闭,redis服务就挂 ...

  4. Mac Pro 编译安装 Redis 的 PHP 客户端 phpredis

    1.去官网下载 redis 扩展源码包 https://github.com/phpredis/phpredis 2.安装 redis 扩展 /usr/local/src/mac-sdk/source ...

  5. 编译安装PHP7并安装Redis扩展Swoole扩展

    编译安装PHP7并安装Redis扩展Swoole扩展 在编译php7的机器上已经有编译安装过php5.3以上的版本,从而依赖库都有了 本php7是编译成fpm-php 使用的, 如果是apache那么 ...

  6. 【安装Redis】CentOS7 下安装NodeJs+Express+MongoDB+Redis

    Redis,V3.2,官网l官方链接:http://www.redis.io/download,参考:http://blog.csdn.net/mlks_2008/article/details/19 ...

  7. centos7.0 安装redis集群

    生产环境下redis基本上都是用的集群,毕竟单机版随时都可能挂掉,风险太大.这里我就来搭建一个基本的redis集群,功能够用但是还需要完善,当然如果有钱可以去阿里云买云数据库Redis版的,那个还是很 ...

  8. Linux(Centos)之安装Redis及注意事项

    1.redis简单说明 a.在前面我简单的说过redis封装成共用类的实现,地址如下:http://www.cnblogs.com/hanyinglong/p/Redis.html. b.redis是 ...

  9. centos上如何安装redis?|centos傻瓜式安装redis教程

    本文介绍centos安装redis,请不要安装2.4.3,是有问题的. 首先安装gcc yum -y install gcc yum -y install gcc-c++ yum install ma ...

随机推荐

  1. codevs 1997 守卫者的挑战

    /* 表示很遗憾.. 开始状态想的没错 就是转移的时候出了问题 自己也想到了数组平移 然而没往下写 与正解擦肩而过…. 然后为了好转移写了个4维的 时间不多了没来得及降维 草草的算算空间就交了… 尼玛 ...

  2. C#解leetcode 18. 4Sum

    Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = tar ...

  3. C#学习第六天

    今天的内容主要是参数数组,C#允许函数指定一个(只能指定一个)特定的参数,这个参数必须是函数定义中最后一个参数,成为参数数组. 参数数组可以使用个数不定的参数调用函数,可以使用params关键字定义它 ...

  4. MySQL存储过程的基本函数(三)

    (1).字符串类 首先定义一个字符串变量:set @str="lxl"; CHARSET(str) //返回字串字符集 select charset(@str);+-------- ...

  5. 使用ajax与服务器通信的步骤

    使用ajax与服务器通信的步骤: 1. 创建一个XMLHttpRequest对象 2. 创建url,data,通过xmlHttpRequest.send() 3. 服务器端接收ajxa的请求,做相应处 ...

  6. PHP 关于文件操作的简单介绍

    文件操作一直是Web程序员头疼的地方,而文件操作在CMS这样的系统中又是必须的.如今,PHP文件操作的函数内容已经非常强大,文件这部分也是学习PHP非常重要的一部分,希望大家不要忽略.这篇文章会简单介 ...

  7. wpf Content数据绑定StringFormat起作用的原理和解决(转)

    1.简单示例: <Window x:Class="WpfOne.Bind.Bind6" xmlns="http://schemas.microsoft.com/wi ...

  8. 国内各IE内核浏览器所调用的IE版本--转了

    60浏览器,腾讯浏览器,世界之窗,遨游…IE的套套浏览器真是到处都是,在日常生活中,身边的朋友用的也不少,毕竟很多人对浏览器这东西不了解,在他们眼里,神马内核一点区别都没有,但咱们做前端的对这些东西可 ...

  9. Android - Layout时发生'Unfortunately xxx has stopped'

    概述 我在进行LinearLayout和TableLayout的嵌套布局的时候,发生题的错误.如下布局xml代码: <LinearLayout xmlns:android="http: ...

  10. 【SQL Server】SQL与Excel的数据互通导入导出

    转载至:http://jingyan.baidu.com/article/73c3ce28c839b7e50243d950.html