centos6.X 安装 redis

redis在centos6.4中安装

Redis是一个开源的使用ANSIC语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库,(百度百科)

本文使用的版本是redis-3.0.0 如果需要请加群找我 也可以自己去下载

[root@localhost /]# cd redis/

[root@localhost redis]# mkdir 6379

创建目录

#编译make
#安装

[root@localhost redis]# cd redis-3.0.0/

[root@localhost redis-3.0.0]# make install PREFIX=/redis/6379

[root@localhost redis-3.0.0]# cd /redis/


编译完以后就看到以下目录


设置后台启动

拷贝配置文件到6379目录下 修改配置文件

[root@localhost redis-3.0.0]# cp redis.conf /redis/6379/

[root@localhost 6379]# vi 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
#daemonize no

然后启动服务端和客户端

[root@localhost 6379]# ./bin/redis-server redis.conf
[root@localhost 6379]# ./bin/redis-cli


安装 启动完成

相关文章

linux下开机自启: 在/etc/init.d目录下新建文件elasticsear...
1、因为在centos7中/etc/rc.d/rc.local的权限被降低了,所以...
最简单的查看方法可以使用ls -ll、ls-lh命令进行查看,当使用...
ASP.NET Core应用程序发布linux在shell中运行是正常的。可一...
设置时区(CentOS 7) 先执行命令timedatectl status|grep &...
vim /etc/sysconfig/network-scripts/ifcfg-eth0 B...