温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Redis 源代码安装以及启动、停止

发布时间:2020-08-09 00:29:21 来源:ITPUB博客 阅读:135 作者:skyin_1603 栏目:关系型数据库
  • 安装步骤:
$ cd /opt
$ wget http://download.redis.io/releases/redis-3.2.8.tar.gz
$ tar xzf redis-3.2.8.tar.gz
$ cd redis-3.2.8
$ make && make install
$ sudo ln -s /opt/redis-3.2.8 /usr/local/redis
$ cp /usr/local/redis/utils/redis_init_script /etc/init.d/redis_6379
$ vi /etc/init.d/redis_6379
REDISPORT=6379
$ mkdir /etc/redis
$ mkdir -p /data/redis
$ cp /usr/local/redis/redis.conf /etc/redis/6379.conf
$ vi  /etc/redis/6379.conf
daemonize yes
port 6379
dir /data/redis/


  • 安装说明:
make install 命令来将安装目录的src文件中的可执行文件复制到/usr/local/bin目录中,
从而达到环境变量中可以直接调用到redis的执行文件。


  • 启动:
$ redis-server  /etc/redis/6379.conf
或者
$ /etc/init.d/redis_6379 start

  • 停止:
$ redis-cli shutdown
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI