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

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

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

56
Add milvus/bin/lib to LD_LIBRARY_PATH
Z
zhiru 已提交
57 58

```
59
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/milvus/bin/lib
Z
zhiru 已提交
60 61
```

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

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

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

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