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

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

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 已提交
16

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

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

G
groot 已提交
21
cmake_build/src/libmilvus_engine.a is the static library
G
groot 已提交
22

23 24 25
    git submodule init
    git submodule update
    
G
groot 已提交
26 27 28
    cd [sourcecode path]/cpp
    ./build.sh -t Debug
    ./build.sh -t Release
29
    ./build.sh -l -t Release # Build license version(only available for Release)
Z
zhiru 已提交
30 31 32 33 34 35 36 37 38 39 40 41 42 43

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 已提交
44
#### To build unittest:
Z
zhiru 已提交
45

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

G
groot 已提交
50 51 52 53 54
#### To run code coverage

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

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

X
xj.lin 已提交
58
Add milvus/lib to LD_LIBRARY_PATH
Z
zhiru 已提交
59 60

```
X
xj.lin 已提交
61
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/milvus/lib
Z
zhiru 已提交
62 63
```

J
jinhai 已提交
64
Then launch server with config:
G
groot 已提交
65 66 67
    cd [build output path]
    start_server.sh
    stop_server.sh
J
jinhai 已提交
68

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

G
groot 已提交
73 74 75
    cd [build output path]/test_client
    test_client -c [sourcecode path]/cpp/conf/server_config.yaml

J
jinhai 已提交
76 77 78 79 80 81 82 83 84 85
### 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.