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: | >=3.2 |
mysql version: | >=5.6 |
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
Note that the demo services of examples are not compiled by default. If you want to compile these demo services, please:
cmake .. -DONLY_LIB=OFF
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。