Skip to content

Instantly share code, notes, and snippets.

@dpyro
Created April 5, 2017 03:48
Show Gist options
  • Save dpyro/19b842ba6f9e0e7f91437bc21cac965a to your computer and use it in GitHub Desktop.
Save dpyro/19b842ba6f9e0e7f91437bc21cac965a to your computer and use it in GitHub Desktop.
how to build and install rexray for macos

Building & Installing REX-Ray on macOS

  1. Install GNU Make if gmake is not available:
    brew install make
  2. Clone the repository:
    git clone https://github.com/codedellemc/rexray
  3. Build it:
    cd rexray
    gmake
    If the build was successful you should see something like this:
    The rexray binary is 52MB and located at:
    
    ./rexray
  4. Copy it somewhere useful:
    mkdir -p ~/bin
    cp ./rexray ~/bin
  5. Be sure to include ~/bin in $PATH:
    cat <<EOT >> ~/.bashrc
    # Path: ~/bin" >> ~/.bashrc
    if [ -s "$HOME/bin" ]; then
        export PATH="$HOME/bin:$PATH"
    fi
    EOT
  6. Run your .bashrc again:
    source ~/.bashrc
  7. Verify:
    cd ~
    rexray

And you're done!

@houshengbo
Copy link

houshengbo commented May 5, 2019

This is good tutorial, except missing the command "export GOOS=darwin", before running "gmake". By default, it builds the binary for Linux system. The env variables GOOS and GOARCH will determine which OS and architecture the binary will be built for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment