|
4 | 4 | rocketmq-client-go is a lightweight wrapper around [rocketmq-client-cpp](https://github.com/apache/rocketmq-client-cpp), so you need install |
5 | 5 | `librocketmq` first. |
6 | 6 |
|
7 | | -#### include file |
8 | | -```bash |
9 | | -git clone https://github.com/apache/rocketmq-client-cpp |
10 | | - |
11 | | -# By default, CFLAGS contains `/usr/local/include` |
12 | | -sudo mkdir -p /usr/local/include/rocketmq/ |
13 | | -sudo cp rocketmq-client-cpp/include/* /usr/local/include/rocketmq |
14 | | -``` |
15 | | - |
16 | | -#### binary library |
17 | | -your could download directly or build manually: |
18 | | - |
19 | | -- download specific release: [rocketmq-client-cpp](https://archive.apache.org/dist/rocketmq/rocketmq-client-cpp/1.2.4/rocketmq-client-cpp-1.2.4-bin-release.tar.gz) |
20 | | - and unzip the package, please choose the right version according to your OS and unzip it, then copy the library files to to your `LDFLAGS` directory(as default, `/usr/local/lib/` works finely). |
21 | | - Please make sure your `LDFLAGS` directory is under the `LD_LIBRARY_PATH`. |
22 | | -- build from source: [Build and Install](https://github.com/apache/rocketmq-client-cpp/tree/master#build-and-install) |
23 | | - |
24 | | -### install |
| 7 | +#### Download by binary release. |
| 8 | +download specific release according you OS: [rocketmq-client-cpp-2.0.0](https://github.com/apache/rocketmq-client-cpp/releases/tag/2.0.0) |
| 9 | +- centos |
| 10 | + |
| 11 | + take centos7 as example, you can install the library in centos6 by the same method. |
| 12 | + ```bash |
| 13 | + wget https://github.com/apache/rocketmq-client-cpp/releases/download/2.0.0/rocketmq-client-cpp-2.0.0-centos7.x86_64.rpm |
| 14 | + sudo rpm -ivh rocketmq-client-cpp-2.0.0-centos7.x86_64.rpm |
| 15 | + ``` |
| 16 | +- debian |
| 17 | + ```bash |
| 18 | + wget https://github.com/apache/rocketmq-client-cpp/releases/download/2.0.0/rocketmq-client-cpp-2.0.0.amd64.deb |
| 19 | + sudo dpkg -i rocketmq-client-cpp-2.0.0.amd64.deb |
| 20 | + ``` |
| 21 | +- macOS |
| 22 | + ```bash |
| 23 | + wget https://github.com/apache/rocketmq-client-cpp/releases/download/2.0.0/rocketmq-client-cpp-2.0.0-bin-release.darwin.tar.gz |
| 24 | + tar -xzf rocketmq-client-cpp-2.0.0-bin-release.darwin.tar.gz |
| 25 | + cd rocketmq-client-cpp |
| 26 | + mkdir /usr/local/include/rocketmq |
| 27 | + cp include/* /usr/local/include/rocketmq |
| 28 | + cp lib/* /usr/local/lib |
| 29 | + ``` |
| 30 | +#### Build from source |
| 31 | +you can also build it manually from source according to [Build and Install](https://github.com/apache/rocketmq-client-cpp/tree/master#build-and-install) |
| 32 | +### Gcc install |
| 33 | +gcc/g++ 4.8+ is needed in the cgo compile, please make sure is it installed in you machine. |
| 34 | +### SDK install |
25 | 35 | 1. Go Version: 1.10 or later |
26 | 36 | 2. `go get github.com/apache/rocketmq-client-go` |
27 | 37 |
|
|
0 commit comments