Project: SRPC (Orchestration & Management / Remote Procedure Call)
File: installation.md

SRPC depends on the following modules : CMake(Require >= v3.6.0), OpenSSL(Recommend >= v1.1.0), Protobuf(Require >= v3.5.0) Will get the following output: static library: libsrpc.a (or dylib) dynamic library: libsrpc.so (or dll) tool for generating code: srpc_generator cmake ~~~sh git clone --recursive https://github.com/sogou/srpc.git cd srpc make make install cd tutorial make ~~~ bazel ~~~sh git clone --recursive https://github.com/sogou/srpc.git cd srpc bazel build ... ~~~ In addition, we can use srpc_tools to install and deploy skeleton project. Refer to the usage Workflow, snappy and lz4 can also be found via installed package in the system. If the submodule dependencies are not pulled in third\_party by '--recursive', they will be searched from the default installation path of the system. The version of snappy is required v1.1.6 or above. If you need to install Protobuf from source code, refer to the command: ~~~sh git clone -b 3.20.x https://github.com/protocolbuffers/protobuf.git protobuf.3.20 cd protobuf.3.20 sh autogen.sh ./configure make -j4 make install ~~~ SRPC has been packaged for Debian. It is currently in Debian sid (unstable) but will eventually be placed into the stable repository. In order to access the unstable repository, you will need to edit your /etc/apt/sources.list file. sources.list has the format: `deb <respository server/mirror> <repository name> <sub branches of the repo>` Simply add the 'unstable' sub branch to your repo: sh deb http://deb.debian.org/ main contrib non-free --> deb http://deb.debian.org/ unstable main contrib non-free Once that is added, update your repo list and then you should be able to install it: sh sudo apt-get update To install the srpc library for development purposes: sh sudo apt-get install libsrpc-dev To install the srpc library for deployment: sh sudo apt-get install libsrpc SRPC has been packaged for Fedora. To install the srpc library for development purposes: sh sudo dnf install srpc-devel To install the srpc library for deployment: sh sudo dnf install srpc There is no difference in the srpc code under the Windows version, but users need to use the of Workflow Moreover, srpc_tools is not supported on Windows. Install dependency `OpenSSL` ``` brew install openssl ``` Install `CMake` ``` brew install cmake ``` Specify the `OpenSSL` environment variable The soft link of OpenSSL will not be automatically built after installation by brew, because LibreSSL is provided by default under MacOS. We need to manually configure the execution path, compilation path, and find_package path into the environment variables of cmake. You can execute `brew info openssl` to view relevant information, or configure it as follows: ``` echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.bash_profile echo 'export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"' >> ~/.bash_profile echo 'export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"' >> ~/.bash_profile echo 'export PKGCONFIGPATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"' >> ~/.bash_profile echo 'export OPENSSLROOTDIR=/usr/local/opt/openssl' >> ~/.bash_profile echo 'export OPENSSLLIBRARIES=/usr/local/opt/openssl/lib' >> ~/.bashprofile ``` If you use `zsh`, you need one more step to load the bash configuration: ``` echo 'test -f ~/.bashprofile && source ~/.bashprofile' >> ~/.zshrc source ~/.zshrc ``` The remaining steps are no different from compiling on Linux.