Installing v2ray is fairly simple. Below is the official command from v2ray's documentation:
curl -Ls https://install.direct/go.sh | sudo bash
Note that running unknown scripts like that is pretty risky. We recommend you download and review the script first. At the time of writing (2020-04-16) we reviewed the script to be safe.