Compiling and Installing Milvus
After the Milvus compilation environment is configured, compile and install the Milvus database.
- Pull the Milvus source code.
1 2
conda activate milvus git clone https://gitee.com/milvus-io/milvus.git
- Add a remote link and obtain the latest modification.
1 2 3 4 5
cd milvus git remote remove origin git remote add origin https://github.com/milvus-io/milvus.git git branch --set-upstream-to=origin/master master git fetch && git pull origin master
- Switch to the target version.
1git checkout v2.4.5
- Compile Milvus.
1make milvus - Configure environment variables.
1 2 3
echo 'export PATH=~/milvus/bin/:$PATH' >> ~/.bashrc echo 'export LD_LIBRARY_PATH=~/milvus/internal/core/output/lib64/:$LD_LIBRARY_PATH' >> ~/.bashrc source ~/.bashrc
- Set the local path for storing Milvus data.
- Open the Milvus configuration file.
1vim ~/milvus/configs/milvus.yaml - Find localStorage and change the path to a custom path.
localStorage: path: /data/milvus/milvus-data/data/ - Find rocksmq and change the path to a custom path.
rocksmq: path: /data/milvus/milvus-data/rdb_data - Find natsmq > server > storeDir and change the path to a custom path.
natsmq: server: storeDir: /data/milvus/milvus-data/nats - Save the configuration and exit.
You can modify the preceding paths based on the server environment. It is recommended that the paths be stored in the same folder for easy observation.
- Open the Milvus configuration file.
- Check whether this package is successfully installed.
1milvus
If no error is reported or the following information is displayed, Milvus is successfully installed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
Usage: milvus run [server type] [flags] Start a Milvus Server. Tips: Only the server type is 'mixture', flags about starting server can be used. [flags] -rootcoord 'true' Start the rootcoord server. -querycoord 'true' Start the querycoord server. -indexcoord 'true' Start the indexcoord server. -datacoord 'true' Start the datacoord server. -alias '' Set alias milvus stop [server type] [flags] Stop a Milvus Server. [flags] -alias '' Set alias milvus mck run [flags] Milvus data consistency check. Tips: The flags are optional. [flags] -etcdIp '' Ip to connect the ectd server. -etcdRootPath '' The root path of operating the etcd data. -minioAddress '' Address to connect the minio server. -minioUsername '' The username to login the minio server. -minioPassword '' The password to login the minio server. -minioUseSSL 'false' Whether to use the ssl to connect the minio server. -minioBucketName '' The bucket to operate the data in it milvus mck cleanTrash [flags] Clean the back inconsistent data Tips: The flags is the same as its of the 'milvus mck [flags]' [server type] querycoord querynode indexnode datacoord datanode standalone rootcoord proxy mixture