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 /user/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 /usr/local/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/loal/bin/redis-server /etc/redis/redis.conf -bash: /usr/loal/bin/redis-server: no such file or directory [root@ecs-3c46 redis]# /usr/local/bin/redis-server /etc/redis/redis.conf 73449:m 13 may 10:56:00.839 * increased maximum number of open files to 10032 (it was originally set to 1024).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ redis 3.0.7 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| port: 6379
| `-._ `._ / _.-' | pid: 73449
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
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 教程,希望对大家有所帮助!
上一篇: Napatech网络加速卡
推荐阅读
-
nvidia显卡驱动无法安装更新教程详解 驱动人生解决显卡驱动问题
-
CentOS 6.2使用yum安装LAMP以及phpMyadmin详解_PHP教程
-
PHP7+Nginx的配置与安装教程详解,php7nginx教程详解_PHP教程
-
php中ssh2扩展安装详解_PHP教程
-
PHP7+Nginx的配置与安装教程详解 php7 mysql php7安装教程 ubuntu php
-
Centos7下nginx的安装与配置教程详解
-
PHP安装mbstring扩展模块详解_PHP教程
-
Redis 的安装配置介绍_PHP教程
-
Ubuntu18.04 安装 Anaconda3的教程详解
-
PHP APC的安装与使用详解_PHP教程