You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

已在/etc/riak安装Riak KV 2.2.0,如何在同一主机装另一版本?

Alright, let's tackle installing a second Riak KV instance alongside your existing 2.2.0 on that CentOS 6 system. I’ve broken this down into clear, actionable steps tailored to your setup:

1. Pre-requisites & Planning
  • First, decide which Riak KV version you want to install (pick one compatible with CentOS 6 x86_64, since your system runs the 2.6.32 kernel).
  • Choose a separate installation directory to avoid overwriting your existing /etc/riak setup — I recommend something like /opt/riak-[VERSION] (e.g., /opt/riak-2.1.4) for clarity.
2. Install the Second Riak Instance
  1. Download the RPM package for your target Riak version (make sure it’s built for CentOS 6 x86_64).
  2. Install it to your custom directory using the --prefix flag with rpm — this ensures no overlap with your existing 2.2.0 installation:
    rpm -ivh --prefix=/opt/riak-2.1.4 riak-[TARGET_VERSION]-1.el6.x86_64.rpm
    
    Replace [TARGET_VERSION] with your chosen version number (e.g., 2.1.4).
3. Configure the New Instance to Avoid Conflicts

This is critical — if you skip this, the two instances will fight over ports, data directories, and resources. Head to the new instance’s config directory:

cd /opt/riak-2.1.4/etc/riak

Edit the riak.conf file (Riak 2.x uses this by default) and update these key settings:

  • Node Name: Change it to something unique (your existing instance is likely riak@127.0.0.1):
    nodename = riak2@127.0.0.1
    
  • Ports: Update all network ports to avoid collisions:
    http.port = 8099          # Default is 8098 (used by your 2.2.0 instance)
    pb.port = 8088            # Default is 8087
    handoff.port = 8100       # Default is 8099
    cluster_mgr.port = 9081   # Default is 9080
    
  • Data & Log Directories: Point them to the new instance’s directory to keep data isolated:
    platform_data_dir = /opt/riak-2.1.4/data
    platform_log_dir = /opt/riak-2.1.4/log
    
  • Erlang Cookie (Optional): If you want to cluster the two instances together, set this to match your existing instance’s cookie (check /etc/riak/riak.conf for distributed_cookie). If you just want separate standalone instances, you can leave it as is.
4. Start & Verify Both Instances
  • To start the new instance:
    /opt/riak-2.1.4/bin/riak start
    
  • Check its status to confirm it’s running:
    /opt/riak-2.1.4/bin/riak status
    
  • Your original 2.2.0 instance will continue to work as normal using the standard riak start/status commands.
Pro Tips
  • Create a shell alias for the new instance to save typing:
    echo "alias riak2='/opt/riak-2.1.4/bin/riak'" >> ~/.bashrc
    source ~/.bashrc
    
    Now you can run riak2 status instead of the full path.
  • If you need external access to the new instance, update your CentOS 6 firewall to allow traffic on the new ports (8099, 8088, etc.).

内容的提问来源于stack exchange,提问作者Алексей Сидорин

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 08:18:15