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

Z
zhiru 已提交
4 5
    Install MySQL
    
G
groot 已提交
6
    centos7 : 
Z
zhiru 已提交
7
        yum install gfortran qt4 flex bison mysql-devel
G
groot 已提交
8 9
        
    ubuntu16.04 : 
Z
zhiru 已提交
10 11 12 13 14 15 16
        sudo apt-get install gfortran qt4-qmake flex bison libmysqlclient-dev

If `libmysqlclient_r.so` does not exist after installing MySQL Development Files, you need to create a symbolic link:

```
sudo ln -s /path/to/libmysqlclient.so /path/to/libmysqlclient_r.so
```
G
groot 已提交
17

Z
zhiru 已提交
18
#### Step 2: build(output to cmake_build folder)
Z
zhiru 已提交
19

G
groot 已提交
20
cmake_build/src/milvus_server is the server
G
groot 已提交
21

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

    cd [sourcecode path]/cpp
    ./build.sh -t Debug
    ./build.sh -t Release
27
    ./build.sh -l -t Release # Build license version(only available for Release)
Z
zhiru 已提交
28 29 30 31 32 33 34 35 36 37 38 39 40 41

If you encounter the following error when building:
`protocol https not supported or disabled in libcurl`

1. Install libcurl4-openssl-dev

2. Install cmake 3.14: 

   ```
   ./bootstrap --system-curl 
   make 
   sudo make install
   ```

G
groot 已提交
42
#### To build unittest:
Z
zhiru 已提交
43

G
groot 已提交
44 45 46
    ./build.sh -u
    or
    ./build.sh --unittest
Z
zhiru 已提交
47

G
groot 已提交
48 49 50 51 52
#### To run code coverage

    apt-get install lcov
    ./build.sh -u -c

J
jinhai 已提交
53
### Launch server
G
groot 已提交
54
Set config in cpp/conf/server_config.yaml
G
groot 已提交
55

J
jinhai 已提交
56
Then launch server with config:
G
groot 已提交
57 58 59
    cd [build output path]
    start_server.sh
    stop_server.sh
J
jinhai 已提交
60

J
jinhai 已提交
61
### Launch test_client(only for debug)
G
groot 已提交
62 63
If you want to test remote api, you can build test_client.
test_client use same config file with server:
Z
zhiru 已提交
64

G
groot 已提交
65 66 67
    cd [build output path]/test_client
    test_client -c [sourcecode path]/cpp/conf/server_config.yaml

J
jinhai 已提交
68 69 70 71 72 73 74 75 76 77
### License Generate
Use get_sys_info to get system info file.

    ./get_sys_info                  # system.info will be generated

Use license_generator to generate license file.

    ./license_generator -s system.info -l system.license -b 2019-05-15 -e 2019-08-14                 

Copy the license file to path assigned by license_path in server config file.