Installing dependencies (This will work for Ubuntu and Debian)

sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev libgmp3-dev

Compiling Xray Core from source

git clone https://github.com/xraychain --recursive
cd xray && make -C depends/
DEPENDS="$(pwd)/depends/x86_64-pc-linux-gnu"
./autogen.sh
./configure --prefix=$DEPENDS
make
make install

This will install all the Xray binaries on depends/x86_64-pc-linux-gnu

From Release File

wget https://github.com/xraychain/archive/mainnet-v1.tar.gz
tar -xpf mainnet-v1.tar.gz && cd xray-mainnet-v1 
git clone --recursive https://github.com/xraychain/cpp-eth-xray.git src/cpp-ethereum
make -C depends/
DEPENDS="$(pwd)/depends/x86_64-pc-linux-gnu"
./autogen.sh
./configure --prefix=$DEPENDS
make
make install

This will install all the Xray binaries on depends/x86_64-pc-linux-gnu

Runing Xray Core

Type from a terminal:

xrayd -daemon

Also, make sure to create a xray.conf with your credentials if needed for accessing RPC calls.

This is a sample xray.conf file

cd /.xray

sudo nano xray.conf

rpcuser=user
rpcassword=password
server=1
rpcallowip=127.0.0.1
logevents=1
daemon=1