This section mainly introduces the development environment required for the development and compilation of the tars CPP service based on Centos7.
Note: if Tars has been compiled and deployed on the machine before, the development environment of tars CPP will work automatically
Software | Software requirements |
---|---|
linux kernel: | >=2.6.18 |
gcc version: | >=4.8、glibc-devel |
bison version: | >=2.5 |
flex version: | >=2.5 |
cmake version: | >=2.8.8 |
mysql version: | >=4.1.17 |
Source compilation needs to be installed: gcc, glibc, bison, flex, cmake
for example,in Centos7:
yum install glibc-devel gcc gcc-c++ bison flex cmake
git clone https://github.com/TarsCloud/TarsCpp.git --recursive
cd TarsCpp
cmake .
make
make install
At this point, the compilation environment of tars CPP has been completed, and the next step is to implement the tars service of CPP.
if you want open ssl & http2 support:
cmake .. -DTARS_SSL=ON -DTARS_HTTP2=ON
make
make install
close support:
cmake .. -DTARS_SSL=OFF -DTARS_HTTP2=OFF
make
make install