欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

redis的安装

程序员文章站 2022-05-17 22:17:54
...
  1. 安装gcc的编译环境
[aaa@qq.com ~]# yum install gcc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.huaweicloud.com
 * updates: mirror.bit.edu.cn
Setting up Install Process
Package gcc-4.4.7-23.el6.x86_64 already installed and latest version
Nothing to do
  1. 上传安装包并解压
[aaa@qq.com ~]# tar -zxf redis-3.2.9.tar.gz
[aaa@qq.com ~]# ls
anaconda-ks.cfg  install.log.syslog  redis-3.2.9         word.txt
install.log      opt                 redis-3.2.9.tar.gz  zkdata
  1. 进行编译安装
[aaa@qq.com redis-3.2.9]# make

redis的安装


[aaa@qq.com redis-3.2.9]# make install
cd src && make install
make[1]: Entering directory `/root/redis-3.2.9/src'

Hint: It's a good idea to run 'make test' ;)

    INSTALL install
    INSTALL install
    INSTALL install
    INSTALL install
    INSTALL install
make[1]: Leaving directory `/root/redis-3.2.9/src'

  1. 修改配置文件
[aaa@qq.com redis-3.2.9]# vi redis.conf
  

# JUST COMMENT THE FOLLOWING LINE.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bind CentOS


# are explicitly listed using the "bind" directive.
protected-mode no



# 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

  1. 启动redis
[aaa@qq.com redis-3.2.9]# ./src/redis-server redis.conf

  1. 连接redis

[aaa@qq.com redis-3.2.9]# ./src/redis-cli -h CentOS -p 6379
CentOS:6379>
CentOS:6379> keys *
(empty list or set)
CentOS:6379>

相关标签: redis安装