README.md 1.2 KB
Newer Older
G
groot 已提交
1 2
### Compilation
#### Step 1: install necessery tools
G
groot 已提交
3

G
groot 已提交
4
    centos7 : 
G
groot 已提交
5
        yum install gfortran libsqlite3-dev libsnappy-dev libzstd-dev bzip2
G
groot 已提交
6 7
        
    ubuntu16.04 : 
G
groot 已提交
8
        sudo apt-get install gfortran libsqlite3-dev libsnappy-dev libzstd-dev bzip2
G
groot 已提交
9

G
groot 已提交
10
#### Step 2: build third-parties
G
groot 已提交
11 12
Note: If you want to debug into third-parties, you can build debug with CXXFLAGS='-g -O0' with option 
: -t Debug
G
groot 已提交
13 14

    cd [sourcecode path]/cpp/thid_party
G
groot 已提交
15 16
    ./build.sh -t Debug
    ./build.sh -t Release
G
groot 已提交
17
    
G
groot 已提交
18
#### Step 3: build(output to cmake_build folder)
G
groot 已提交
19
cmake_build/src/vecwise_server is the server
G
groot 已提交
20 21

cmake_build/src/libvecwise_engine.a is the static library
G
groot 已提交
22 23 24 25 26

    cd [sourcecode path]/cpp
    ./build.sh -t Debug
    ./build.sh -t Release
    
G
groot 已提交
27
#### To build unittest:
G
groot 已提交
28 29 30 31 32 33 34 35
    
    ./build.sh -u
    or
    ./build.sh --unittest
    
    
### Luanch server
Set config in cpp/conf/server_config.yaml
G
groot 已提交
36

G
groot 已提交
37
Then luanch server with config:
G
groot 已提交
38
    
G
groot 已提交
39 40 41
    cd [build output path]
    start_server.sh
    stop_server.sh
J
jinhai 已提交
42

G
groot 已提交
43
### Luanch test_client(only for debug)
G
groot 已提交
44 45
If you want to test remote api, you can build test_client.
test_client use same config file with server:
G
groot 已提交
46 47 48 49
    
    cd [build output path]/test_client
    test_client -c [sourcecode path]/cpp/conf/server_config.yaml