• Centos6.9安装redis-dump


    源码编译ruby2.6.5

    https://ruby-china.org/wiki/ruby-mirror

    安装编译依赖工具,gcc、gcc-c++、gdbm-devel、readline-devel和openssl-devel:

    yum install gcc gcc-c++ gdbm-devel readline-devel openssl-devel -y

    编译安装ruby

    cd /usr/local/ruby-2.6.5

    ./configure --prefix=/usr/local/ruby --enable-shared

    make && make install

    添加ruby环境变量

    vi /etc/profile

    export RUBY_HOME=/usr/local/ruby/

    export PATH=$RUBY_HOME/bin:$RUBY_HOME/lib:$PATH

    source /etc/profile

    检查ruby环境配置是否正确

    # ruby -v

    ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]

    #redis-dump安装

    #vim ~/.gemrc

    ---

    :sources:

    - https://gems.ruby-china.com

    :ssl_verify_mode: 0

    #yum install ruby rubygems ruby-devel -y

    #gem sources --add https://gems.ruby-china.com/  --remove https://rubygems.org/

    # gem sources -l

    *** CURRENT SOURCES ***

    http://gems.ruby-china.com/   #确定只剩这一个

    # curl -L get.rvm.io | bash -s stable

      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                     Dload  Upload   Total   Spent    Left  Speed

    100 24535  100 24535    0     0    959      0  0:00:25  0:00:25 --:--:--   644

    Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz

    Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc

    gpg: Signature made Sat 16 Jan 2021 02:46:22 AM CST using RSA key ID 39499BDB

    gpg: Good signature from "Piotr Kuczynski "

    gpg: WARNING: This key is not certified with a trusted signature!

    gpg:          There is no indication that the signature belongs to the owner.

    Primary key fingerprint: 7D2B AF1C F37B 13E2 069D  6956 105B D0E7 3949 9BDB

    GPG verified '/usr/local/rvm/archives/rvm-1.29.12.tgz'

    Creating group 'rvm'

    Installing RVM to /usr/local/rvm/

    Installation of RVM in /usr/local/rvm/ is almost complete:

      * First you need to add all users that will be using rvm to 'rvm' group,

        and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.

      * To start using RVM you need to run `source /etc/profile.d/rvm.sh`

        in all your open shell windows, in rare cases you need to reopen all shell windows.

      * Please do NOT forget to add your users to the rvm group.

         The installer no longer auto-adds root or users to the rvm group. Admins must do this.

         Also, please note that group memberships are ONLY evaluated at login time.

         This means that users must log out then back in before group membership takes effect!

    Thanks for installing RVM [0m

    Please consider donating to our open collective to help us maintain RVM.

      Donate: https://opencollective.com/rvm/donate

    查找配置文件

    # find / -name rvm.sh

    /etc/profile.d/rvm.sh

    使配置文件生效

    # source /etc/profile.d/rvm.sh

    # rvm -v

    rvm 1.29.12 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]

    #source /usr/local/rvm/scripts/rvm

    #gem install redis-dump -V

    # redis-dump -v

    redis-dump v0.4.0

    # redis-load -v

    redis-dump v0.4.0

    导出数据

    #redis-dump --uri=redis://ip1:port --password='xxxxxx'>/tmp/redis.json

    备份

    关闭目标redis

    清空目标redis

    # rm appendonly.aof

    # rm dump.rdb

    开启目标redis

    还原数据

    cat /tmp/redis.json | redis-load -n --uri=redis://ip2:port --password='xxxxxxxxx'

  • 相关阅读:
    可编程 USB 转串口适配器开发板 SHT3x-DIS 温湿度传感器芯片
    (web前端网页制作课作业)使用HTML+CSS制作非物质文化遗产专题网页设计与实现
    Android中使用AOP进行拦截统一处理功能(如网络判断)
    List的使用
    vim命令
    Flask--路由配置
    2023年Flutter教程_Flutter+Getx仿小米商城项目实战视频教程-V3版
    核工程行业数字化转型----工业软件讲坛第十次讲座
    【Mongo】数据删了磁盘空间但没有减少
    【ROS2】状态机 Smach 包的获取与使用 - Part1
  • 原文地址:https://blog.csdn.net/xiangliangyu2008/article/details/126743746