Compiling WeSQL From Source Code
You should install the WeSQL binary on each of the three servers. This can be done by compiling it from the source code.
Source Compilation Prerequisites on Linux
:::tab Amazon Linux
note
AWS ECS Linux Version: Amazon linux 2 AMI Kernel 5.10
sudo yum-config-manager --add-repo https://vault.centos.org/centos/7/sclo/x86_64/rh/
sudo yum repolist
sudo wget https://vault.centos.org/centos/7/os/x86_64/Packages/libgfortran5-8.3.1-2.1.1.el7.x86_64.rpm
sudo yum install -y libgfortran5-8.3.1-2.1.1.el7.x86_64.rpm
sudo yum install -y devtoolset-11 --nogpgcheck
sudo yum install -y git curl
scl enable devtoolset-11 bash
scl --list
echo "source scl_source enable devtoolset-11" >> ~/.bashrc && source ~/.bashrc
sudo yum install -y \
cmake3 \
make \
automake \
openssl-devel \
ncurses-devel \
bison \
libaio-devel \
libev-devel \
numactl \
libudev-devel \
libtirpc-devel
Get the WeSQL code
Clone the WeSQL Git repository to local directory.
git clone git@github.com:wesql/wesql-server.git
Building the WeSQL from source on Linux
cd wesql-server
mkdir build && cd build
cmake3 ../ -B ./ \
-DCMAKE_INSTALL_PREFIX="/usr/local/mysql" \
-DWITH_SSL="system" \
-DCMAKE_BUILD_TYPE="DEBUG" \
-DWITH_ROUTER=OFF \
-DWITH_CLONE=1 \
-DWITH_FAIL_POINT=ON \
-DWITH_WESQL_TEST=1 \
-DDOWNLOAD_BOOST=1 -DWITH_BOOST="../extra/"
make
make install
groupadd mysql
grep mysql /etc/group
useradd -r -g mysql -s /bin/false mysql
:::
:::tab Ubuntu
Get the WeSQL code
Clone the WeSQL Git repository to local directory.
git clone git@github.com:wesql/wesql-server.git
:::
Copy Binaries to All Servers
Compress the binary installation directory into a package, distribute it to other nodes, and then extract it for installation.
tar -czf mysql.tar.gz --absolute-names --transform 's|^/u01/||' /usr/local/mysql
scp mysql.tar.gz root@192.168.0.2/home/
ssh 192.168.0.2
cd /home/
tar -xzvf mysql.tar.gz -C /usr/local/