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

G
groot 已提交
4
    centos7 : 
X
MS-154  
xj.lin 已提交
5
        yum install gfortran qt4 flex bison mysql-devel mysql
G
groot 已提交
6 7
        
    ubuntu16.04 : 
X
MS-154  
xj.lin 已提交
8
        sudo apt-get install gfortran qt4-qmake flex bison libmysqlclient-dev mysql-client
Z
update  
zhiru 已提交
9 10
        
    cd scripts && sudo ./requirements.sh     
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

S
starlord 已提交
22 23 24 25 26
    cd [sourcecode path]/cpp/thirdparty
    git clone git@192.168.1.105:megasearch/knowhere.git
    cd knowhere
    ./build.sh -t Debug
    or ./build.sh -t Release
X
MS-154  
xj.lin 已提交
27

G
groot 已提交
28 29
    cd [sourcecode path]/cpp
    ./build.sh -t Debug
S
starlord 已提交
30
    or ./build.sh -t Release
Z
zhiru 已提交
31 32 33 34 35 36 37 38 39 40 41 42 43 44

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

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

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

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

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

X
MS-154  
xj.lin 已提交
59
Add milvus/lib to LD_LIBRARY_PATH
Z
zhiru 已提交
60 61

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

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

J
jinhai 已提交
70
### Launch test_client(only for debug)
S
starlord 已提交
71 72
If you want to test remote api, you can run sdk example.
    [build output path]/sdk/examples/grpcsimple/sdk_simple