CentOS6.4 安装Redis
按照下面步骤依次执行
1.检查依赖,安装依赖
[root@ecs-3c46 ~]# whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz
[root@ecs-3c46 ~]# whereis tc
tc: /sbin/tc /usr/lib64/tc /usr/share/tc /usr/share/man/man8/tc.8.gz
[root@ecs-3c46 ~]# whereis wget
wget: /usr/bin/wget /usr/share/man/man1/wget.1.gz
[root@ecs-3c46 ~]# yum -y install tcl
2.进入/user/local/src/
[root@ecs-3c46 ~]# cd /usr/local/src/
3.wget下载redis
[root@ecs-3c46 src]# wget http://download.redis.io/releases/redis-3.0.7.tar.gz
4.解压
[root@ecs-3c46 src]tar zxvf redis-3.0.7.tar.gz
5.将文件转存到/usr/local/redis
[root@ecs-3c46 src]mkdir /usr/local/redis
[root@ecs-3c46 src]mv redis-3.0.7 /usr/local/redis
[root@ecs-3c46 src]ll /usr/local/redis
6.编译安装
[root@ecs-3c46 src]cd /usr/local/redis
[root@ecs-3c46 redis]make && make install
7.在etc目录下创建redi文件夹并创建配置文件,并修改配置文件
[root@ecs-3c46 redis]mkdir -p /etc/redis
[root@ecs-3c46 redis]pwd
[root@ecs-3c46 redis]cp -fr /usr/local/redis/redis.conf /etc/redis/
8.vim编辑/etc/redis/redis.conf,修改daemonize属性为yes
[root@ecs-3c46 redis]# vim /etc/redis/redis.conf
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes
9.执行/usr/loal/bin/redis-server /etc/redis/redis.conf来启动redis服务器
[root@ecs-3c46 redis]# /usr/local/bin/redis-server /etc/redis/redis.conf
-bash: /usr/local/bin/redis-server: No such file or directory
[root@ecs-3c46 redis]# /usr/local/bin/redis-server /etc/redis/redis.conf
:M May ::00.839 * Increased maximum number of open files to (it was originally set to ).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.0. (/) bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port:
| `-._ `._ / _.-' | PID: 73449
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
10.再打开一个终端,切换至redis的安装目录执行redis-cli
[root@ecs-3c46 bin]# redis-cli
127.0.0.1:6379> keys *
(empty list or set)
127.0.0.1:6379>
CentOS6.4 安装Redis的更多相关文章
- centos6.7安装Redis
1.创建安装目录 mkdir /usr/local/redis cd /usr/local/src 2.获取安装包:wget http://download.redis.io/releases/red ...
- Redis — CentOS6.4安装Redis以及安装PHP客户端phpredis
一.安装Redis 1.下载安装包 wget http://download.redis.io/releases/redis-2.8.6.tar.gz 2.解压包 tar xzf redis-2.8. ...
- 转:Centos6.5_x86安装Redis。
Redis是一个高性能的,开源key-value型数据库.是构建高性能,可扩展的Web应用的完美解决方案,可以内存存储亦可持久化存储.因为要使用跨进程,跨服务级别的数据缓存,在对比多个方案后,决定使用 ...
- 【centos6】安装redis + phpredis 以及 常用配置参数
1.redis-server和redis-cli安装文章:http://www.cnblogs.com/skyessay/p/6429988.html 1.前置条件:查看是否安装gcc,命令:gcc ...
- centos6.6安装redis
.安装仓库 yum install epel-release -y2.安装redis yum install redis -y3.程序文件说明 安装完毕后有以下几个文件位于/usr/bin目录: re ...
- centos6.5 安装redis自动启动
1.安装需要的支持环境 在安装Redis之前首要先做的是安装Unix的 Tcl工具 ,如果不安装的话后期将无法对Redis进行测试.在后期执行make test的时候返回如下错误信息: You nee ...
- CentOS6.9安装redis
目录 Centos6.9下的Redis安装和配置(最简易方式) redis客户端登录方式 Centos6.9下的Redis安装和配置(最简易方式) 在服务器上创建一个目录/service,然后下载re ...
- centos6.6安装redis服务安装redis服务,对于discuz来说可以作为缓存使用,减轻服务器压力
获取redis源码包 #wget http://download.redis.io/releases/redis-stable.tar.gz 解压缩 #tar xf redis-stable.tar ...
- 在CentOS6上安装Redis
检查安装依赖程序 yum install -y gcc-c++ tcl wget 获取安装文件 wget http://download.redis.io/releases/redis-2.8.17. ...
- Centos6.8安装redis(一)
最近有在学习会话共享的配置,其中一种呢是 nginx+redis+tomcat 的会话共享配置,在记录此会话共享配置之前呢先记录下redis等的安装.这篇先简单记录下redis的安装,是其中一种方式, ...
随机推荐
- ORM,Entity Framework介绍以及其所包含的基础架构介绍
一:entity framework 6.0 ORM (实体关系模型) O: Domain Object 领域模型 R: Relational Database 关系型数据库 M: Mapping 映 ...
- [LeetCode 题解]: Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 题 ...
- Centos7 因内存 可用大小不足,被killed的解决办法
Linux的内存分配采取的是一种更加积极的分配策略,它假设应用申请了内存空间后并不会立即去使用它,所以允许一定量的超售,当应用真的需要使用它的时候,操作系统可能已经通过回收了其他应用的内存空间而变得有 ...
- 让PHP更快的提供文件下载 【转】
一般来说, 我们可以通过直接让URL指向一个位于Document Root下面的文件, 来引导用户下载文件. 但是, 这样做, 就没办法做一些统计, 权限检查, 等等的工作. 于是, 很多时候, ...
- ASP.NET程序从IIS6移植到IIS7时出现500.22错误(转)
最可能的原因: • 此应用程序在 system.web/httpModules 节中定义配置. 可尝试的操作: • 将配置迁移到 system.webServer/modules 节.也可 ...
- PageAdmin环境配置要求
1.操作系统要求: Win7/win8/win2008/win2012及以上版本都可以,建议用64位的操作系统,服务器建议选择win2012或以上版本. 2.net framework版本要求: ne ...
- ie8在win7系统下怎么安装或重装?[转载]
(一)对于已卸载了IE8的用户 因为微软并没有提供用于Windows 7系统的IE8独立安装包,Windows 7用户是无法通过下载安装包的方法来重装IE8的,而是默认将IE8的安装程序集成在Wind ...
- 279. 完全平方数 leetcode JAVA
题目: 给定正整数 n,找到若干个完全平方数(比如 1, 4, 9, 16, ...)使得它们的和等于 n.你需要让组成和的完全平方数的个数最少. 示例 1: 输入: n = 12 输出: 3 解释: ...
- 为什么 SQLite 用 C 编写?
简评:SQLite 官方出品. C是最好的选择 从 2000 年 5 月 29 日开始,SQLite 就选择了 C 语言.直到今天,C 也是实现 SQLite 这样软件库的最佳语言. C语言是实现 S ...
- P01-Python中列表的复制问题
(1)使用=直接赋值 a = [1, 2, 3, [6, 7]] b = a 初始情况: a: [1, 2, 3, [6, 7]] b: [1, 2, 3, [6, 7]] ------------- ...