• 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'

  • 相关阅读:
    创作纪念日 && 编程练习 - 斐波那契数列
    chrome 外网很多网站提示验证错误进不去问题
    IT这个岗位,人才缺口百万,薪资水涨船高,上不封顶
    web期末大作业 用HTML+CSS做一个漂亮简单的节日网页【传日文化节日中秋节】
    Vue学习之--------路由的query、params参数、路由命名(3)(2022/9/5)
    Selenium:上传文件组件处理总结
    《C++ primer plus》第7章:函数——C++的编程模块
    web网站 固定的邀请码字符 能被爬虫爬取吗?动态改变邀请码的字符是不是可以避免爬虫爬取或数据泄露
    野火FPGA入门(5)
    贰[2],QT异常处理
  • 原文地址:https://blog.csdn.net/xiangliangyu2008/article/details/126743746