Table of contents
Directory
Updated at 2020-03-20 16:00:22

TarsCpp

1 Intro

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

2 Dependent environment

SoftwareSoftware 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

2.1. Download and install build package dependency

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

3 Construction of development environment

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
Chapter