Huanli-Meng commented on a change in pull request #8919:
URL: https://github.com/apache/pulsar/pull/8919#discussion_r541419352



##########
File path: site2/docs/client-libraries-cpp.md
##########
@@ -14,40 +14,100 @@ Pulsar C++ client is supported on **Linux** and **MacOS** 
platforms.
 
 [Doxygen](http://www.doxygen.nl/)-generated API docs for the C++ client are 
available [here](/api/cpp).
 
+## System requirements
+
+You need to have the following installed to use the C++ client:
+
+* [CMake](https://cmake.org/)
+* [Boost](http://www.boost.org/)
+* [Protocol Buffers](https://developers.google.com/protocol-buffers/) 2.6
+* [Log4CXX](https://logging.apache.org/log4cxx)
+* [libcurl](https://curl.haxx.se/libcurl/)
+* [Google Test](https://github.com/google/googletest)
+* [JsonCpp](https://github.com/open-source-parsers/jsoncpp)
+
 ## Linux
 
+### Compilation 

Review comment:
       I think it is better to use an ordered list to refine this part. Ans use 
the period (.) at the end of each sentence instead of a colon (:). Please check 
through the whole updates.

##########
File path: site2/docs/client-libraries-cpp.md
##########
@@ -14,40 +14,100 @@ Pulsar C++ client is supported on **Linux** and **MacOS** 
platforms.
 
 [Doxygen](http://www.doxygen.nl/)-generated API docs for the C++ client are 
available [here](/api/cpp).
 
+## System requirements
+
+You need to have the following installed to use the C++ client:
+
+* [CMake](https://cmake.org/)
+* [Boost](http://www.boost.org/)
+* [Protocol Buffers](https://developers.google.com/protocol-buffers/) 2.6
+* [Log4CXX](https://logging.apache.org/log4cxx)
+* [libcurl](https://curl.haxx.se/libcurl/)
+* [Google Test](https://github.com/google/googletest)
+* [JsonCpp](https://github.com/open-source-parsers/jsoncpp)
+
 ## Linux
 
+### Compilation 
+
+The compilation starts with cloning the Pulsar repository:
+
+```shell
+$ git clone https://github.com/apache/pulsar
+```
+
+Install all of the necessary dependencies:
+
+```shell
+$ apt-get install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev \
+  libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev 
libjsoncpp-dev
+```
+
+Then compile and install [Google Test](https://github.com/google/googletest):
+
+```shell
+# libgtest-dev version is 1.18.0 or above
+$ cd /usr/src/googletest
+$ sudo cmake .
+$ sudo make
+$ sudo cp ./googlemock/libgmock.a ./googlemock/gtest/libgtest.a /usr/lib/
+
+# less than 1.18.0
+$ cd /usr/src/gtest
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgtest.a /usr/lib
+
+$ cd /usr/src/gmock
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgmock.a /usr/lib
+```
+
+Finally, compile the Pulsar client library for C++ inside the Pulsar repo:
+
+```shell
+$ cd pulsar-client-cpp
+$ cmake .
+$ make
+```
+
+The resulting files, `libpulsar.so` and `libpulsar.a` will be placed in the 
`lib` folder of the repo. The tools `perfProducer` and `perfConsumer` will be 
placed in the `perf` directory.
+
+### Install Dependencies
+
 > Since 2.1.0 release, Pulsar ships pre-built RPM and Debian packages. You can 
 > download and install those packages directly.
 
-Four kind of libraries `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / 
`libpulsarwithdeps.a` are included in your `/usr/lib` after rpm/deb download 
and install.
-By default, they are build under code path `${PULSAR_HOME}/pulsar-client-cpp`, 
using command
- `cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared 
pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3`
-These libraries rely on some other libraries, if you want to get detailed 
version of dependencies libraries, please reference 
[these](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/rpm/Dockerfile)
 
[files](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/deb/Dockerfile).
+Four kinds of libraries `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / 
`libpulsarwithdeps.a` are included in your `/usr/lib` after rpm/deb being 
downloaded and installed.

Review comment:
       ```suggestion
   The `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and 
`libpulsarwithdeps.a` libraries are included in your `/usr/lib` after RPM or 
DEB being downloaded and installed.
   ```

##########
File path: site2/docs/client-libraries-cpp.md
##########
@@ -14,40 +14,100 @@ Pulsar C++ client is supported on **Linux** and **MacOS** 
platforms.
 
 [Doxygen](http://www.doxygen.nl/)-generated API docs for the C++ client are 
available [here](/api/cpp).
 
+## System requirements
+
+You need to have the following installed to use the C++ client:
+
+* [CMake](https://cmake.org/)
+* [Boost](http://www.boost.org/)
+* [Protocol Buffers](https://developers.google.com/protocol-buffers/) 2.6
+* [Log4CXX](https://logging.apache.org/log4cxx)
+* [libcurl](https://curl.haxx.se/libcurl/)
+* [Google Test](https://github.com/google/googletest)
+* [JsonCpp](https://github.com/open-source-parsers/jsoncpp)
+
 ## Linux
 
+### Compilation 
+
+The compilation starts with cloning the Pulsar repository:
+
+```shell
+$ git clone https://github.com/apache/pulsar
+```
+
+Install all of the necessary dependencies:
+
+```shell
+$ apt-get install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev \
+  libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev 
libjsoncpp-dev
+```
+
+Then compile and install [Google Test](https://github.com/google/googletest):
+
+```shell
+# libgtest-dev version is 1.18.0 or above
+$ cd /usr/src/googletest
+$ sudo cmake .
+$ sudo make
+$ sudo cp ./googlemock/libgmock.a ./googlemock/gtest/libgtest.a /usr/lib/
+
+# less than 1.18.0
+$ cd /usr/src/gtest
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgtest.a /usr/lib
+
+$ cd /usr/src/gmock
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgmock.a /usr/lib
+```
+
+Finally, compile the Pulsar client library for C++ inside the Pulsar repo:
+
+```shell
+$ cd pulsar-client-cpp
+$ cmake .
+$ make
+```
+
+The resulting files, `libpulsar.so` and `libpulsar.a` will be placed in the 
`lib` folder of the repo. The tools `perfProducer` and `perfConsumer` will be 
placed in the `perf` directory.
+
+### Install Dependencies
+
 > Since 2.1.0 release, Pulsar ships pre-built RPM and Debian packages. You can 
 > download and install those packages directly.
 
-Four kind of libraries `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / 
`libpulsarwithdeps.a` are included in your `/usr/lib` after rpm/deb download 
and install.
-By default, they are build under code path `${PULSAR_HOME}/pulsar-client-cpp`, 
using command
- `cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared 
pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3`
-These libraries rely on some other libraries, if you want to get detailed 
version of dependencies libraries, please reference 
[these](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/rpm/Dockerfile)
 
[files](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/deb/Dockerfile).
+Four kinds of libraries `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / 
`libpulsarwithdeps.a` are included in your `/usr/lib` after rpm/deb being 
downloaded and installed.
+
+By default, they are built under code path `${PULSAR_HOME}/pulsar-client-cpp`. 
You can use this command:
+ `cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared 
pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3`.
+These libraries rely on some other libraries, if you want to get detailed 
version of dependencies, please reference 
[rpm](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/rpm/Dockerfile)
 or 
[deb](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/deb/Dockerfile)
 files.
+
+1. `libpulsar.so` is a shared library, which contains statically linked 
`boost` and `openssl`. It also dynamically links all other needed libraries. 
Below is the command to use this Pulsar library:
 
-1. `libpulsar.so` is the Shared library, it contains statically linked `boost` 
and `openssl`, and will also dynamically link all other needed libraries.
-The command the when use this pulsar library is like this:
 ```bash
  g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so 
-I/usr/local/ssl/include
 ```
 
-2. `libpulsarnossl.so` is the Shared library that similar to `libpulsar.so` 
except that the library `openssl` and `crypto` are dynamically linked.
-The command the when use this pulsar library is like this:
+2. `libpulsarnossl.so` is a shared library that similar to `libpulsar.so` 
except that the libraries `openssl` and `crypto` are dynamically linked. Below 
is the command to use this Pulsar library:
+
 ```bash
  g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsarnossl.so -lssl 
-lcrypto -I/usr/local/ssl/include -L/usr/local/ssl/lib
 ```
 
-3. `libpulsar.a` is the Static library, it need to load some dependencies 
library when using it. 
-The command the when use this pulsar library is like this:
+3. `libpulsar.a` is the static library. You need load dependencies before 
using this library. Below is the command to use this Pulsar library:

Review comment:
       ```suggestion
   3. `libpulsar.a` is a static library. You need load dependencies before 
using this library. Below is the command to use this Pulsar library:
   ```

##########
File path: site2/docs/client-libraries-cpp.md
##########
@@ -14,40 +14,100 @@ Pulsar C++ client is supported on **Linux** and **MacOS** 
platforms.
 
 [Doxygen](http://www.doxygen.nl/)-generated API docs for the C++ client are 
available [here](/api/cpp).
 
+## System requirements
+
+You need to have the following installed to use the C++ client:
+
+* [CMake](https://cmake.org/)
+* [Boost](http://www.boost.org/)
+* [Protocol Buffers](https://developers.google.com/protocol-buffers/) 2.6
+* [Log4CXX](https://logging.apache.org/log4cxx)
+* [libcurl](https://curl.haxx.se/libcurl/)
+* [Google Test](https://github.com/google/googletest)
+* [JsonCpp](https://github.com/open-source-parsers/jsoncpp)
+
 ## Linux
 
+### Compilation 
+
+The compilation starts with cloning the Pulsar repository:
+
+```shell
+$ git clone https://github.com/apache/pulsar
+```
+
+Install all of the necessary dependencies:
+
+```shell
+$ apt-get install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev \
+  libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev 
libjsoncpp-dev
+```
+
+Then compile and install [Google Test](https://github.com/google/googletest):
+
+```shell
+# libgtest-dev version is 1.18.0 or above
+$ cd /usr/src/googletest
+$ sudo cmake .
+$ sudo make
+$ sudo cp ./googlemock/libgmock.a ./googlemock/gtest/libgtest.a /usr/lib/
+
+# less than 1.18.0
+$ cd /usr/src/gtest
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgtest.a /usr/lib
+
+$ cd /usr/src/gmock
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgmock.a /usr/lib
+```
+
+Finally, compile the Pulsar client library for C++ inside the Pulsar repo:
+
+```shell
+$ cd pulsar-client-cpp
+$ cmake .
+$ make
+```
+
+The resulting files, `libpulsar.so` and `libpulsar.a` will be placed in the 
`lib` folder of the repo. The tools `perfProducer` and `perfConsumer` will be 
placed in the `perf` directory.

Review comment:
       ```suggestion
   The resulting files, `libpulsar.so` and `libpulsar.a` will be placed in the 
`lib` folder of the repository. The tools `perfProducer` and `perfConsumer` 
will be placed in the `perf` directory.
   ```

##########
File path: site2/docs/client-libraries-cpp.md
##########
@@ -14,40 +14,100 @@ Pulsar C++ client is supported on **Linux** and **MacOS** 
platforms.
 
 [Doxygen](http://www.doxygen.nl/)-generated API docs for the C++ client are 
available [here](/api/cpp).
 
+## System requirements
+
+You need to have the following installed to use the C++ client:
+
+* [CMake](https://cmake.org/)
+* [Boost](http://www.boost.org/)
+* [Protocol Buffers](https://developers.google.com/protocol-buffers/) 2.6
+* [Log4CXX](https://logging.apache.org/log4cxx)
+* [libcurl](https://curl.haxx.se/libcurl/)
+* [Google Test](https://github.com/google/googletest)
+* [JsonCpp](https://github.com/open-source-parsers/jsoncpp)
+
 ## Linux
 
+### Compilation 
+
+The compilation starts with cloning the Pulsar repository:
+
+```shell
+$ git clone https://github.com/apache/pulsar
+```
+
+Install all of the necessary dependencies:
+
+```shell
+$ apt-get install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev \
+  libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev 
libjsoncpp-dev
+```
+
+Then compile and install [Google Test](https://github.com/google/googletest):
+
+```shell
+# libgtest-dev version is 1.18.0 or above
+$ cd /usr/src/googletest
+$ sudo cmake .
+$ sudo make
+$ sudo cp ./googlemock/libgmock.a ./googlemock/gtest/libgtest.a /usr/lib/
+
+# less than 1.18.0
+$ cd /usr/src/gtest
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgtest.a /usr/lib
+
+$ cd /usr/src/gmock
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgmock.a /usr/lib
+```
+
+Finally, compile the Pulsar client library for C++ inside the Pulsar repo:
+
+```shell
+$ cd pulsar-client-cpp
+$ cmake .
+$ make
+```
+
+The resulting files, `libpulsar.so` and `libpulsar.a` will be placed in the 
`lib` folder of the repo. The tools `perfProducer` and `perfConsumer` will be 
placed in the `perf` directory.
+
+### Install Dependencies
+
 > Since 2.1.0 release, Pulsar ships pre-built RPM and Debian packages. You can 
 > download and install those packages directly.
 
-Four kind of libraries `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / 
`libpulsarwithdeps.a` are included in your `/usr/lib` after rpm/deb download 
and install.
-By default, they are build under code path `${PULSAR_HOME}/pulsar-client-cpp`, 
using command
- `cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared 
pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3`
-These libraries rely on some other libraries, if you want to get detailed 
version of dependencies libraries, please reference 
[these](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/rpm/Dockerfile)
 
[files](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/deb/Dockerfile).
+Four kinds of libraries `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / 
`libpulsarwithdeps.a` are included in your `/usr/lib` after rpm/deb being 
downloaded and installed.
+
+By default, they are built under code path `${PULSAR_HOME}/pulsar-client-cpp`. 
You can use this command:
+ `cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared 
pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3`.
+These libraries rely on some other libraries, if you want to get detailed 
version of dependencies, please reference 
[rpm](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/rpm/Dockerfile)
 or 
[deb](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/deb/Dockerfile)
 files.

Review comment:
       ```suggestion
   These libraries rely on some other libraries, if you want to get detailed 
version of dependencies, see 
[RPM](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/rpm/Dockerfile)
 or 
[DEB](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/deb/Dockerfile)
 files.
   ```

##########
File path: site2/docs/client-libraries-cpp.md
##########
@@ -14,40 +14,100 @@ Pulsar C++ client is supported on **Linux** and **MacOS** 
platforms.
 
 [Doxygen](http://www.doxygen.nl/)-generated API docs for the C++ client are 
available [here](/api/cpp).
 
+## System requirements
+
+You need to have the following installed to use the C++ client:
+
+* [CMake](https://cmake.org/)
+* [Boost](http://www.boost.org/)
+* [Protocol Buffers](https://developers.google.com/protocol-buffers/) 2.6
+* [Log4CXX](https://logging.apache.org/log4cxx)
+* [libcurl](https://curl.haxx.se/libcurl/)
+* [Google Test](https://github.com/google/googletest)
+* [JsonCpp](https://github.com/open-source-parsers/jsoncpp)
+
 ## Linux
 
+### Compilation 
+
+The compilation starts with cloning the Pulsar repository:
+
+```shell
+$ git clone https://github.com/apache/pulsar
+```
+
+Install all of the necessary dependencies:
+
+```shell
+$ apt-get install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev \
+  libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev 
libjsoncpp-dev
+```
+
+Then compile and install [Google Test](https://github.com/google/googletest):
+
+```shell
+# libgtest-dev version is 1.18.0 or above
+$ cd /usr/src/googletest
+$ sudo cmake .
+$ sudo make
+$ sudo cp ./googlemock/libgmock.a ./googlemock/gtest/libgtest.a /usr/lib/
+
+# less than 1.18.0
+$ cd /usr/src/gtest
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgtest.a /usr/lib
+
+$ cd /usr/src/gmock
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgmock.a /usr/lib
+```
+
+Finally, compile the Pulsar client library for C++ inside the Pulsar repo:
+
+```shell
+$ cd pulsar-client-cpp
+$ cmake .
+$ make
+```
+
+The resulting files, `libpulsar.so` and `libpulsar.a` will be placed in the 
`lib` folder of the repo. The tools `perfProducer` and `perfConsumer` will be 
placed in the `perf` directory.
+
+### Install Dependencies
+
 > Since 2.1.0 release, Pulsar ships pre-built RPM and Debian packages. You can 
 > download and install those packages directly.
 
-Four kind of libraries `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / 
`libpulsarwithdeps.a` are included in your `/usr/lib` after rpm/deb download 
and install.
-By default, they are build under code path `${PULSAR_HOME}/pulsar-client-cpp`, 
using command
- `cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared 
pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3`
-These libraries rely on some other libraries, if you want to get detailed 
version of dependencies libraries, please reference 
[these](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/rpm/Dockerfile)
 
[files](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/deb/Dockerfile).
+Four kinds of libraries `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / 
`libpulsarwithdeps.a` are included in your `/usr/lib` after rpm/deb being 
downloaded and installed.
+
+By default, they are built under code path `${PULSAR_HOME}/pulsar-client-cpp`. 
You can use this command:
+ `cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared 
pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3`.
+These libraries rely on some other libraries, if you want to get detailed 
version of dependencies, please reference 
[rpm](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/rpm/Dockerfile)
 or 
[deb](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/deb/Dockerfile)
 files.
+
+1. `libpulsar.so` is a shared library, which contains statically linked 
`boost` and `openssl`. It also dynamically links all other needed libraries. 
Below is the command to use this Pulsar library:
 
-1. `libpulsar.so` is the Shared library, it contains statically linked `boost` 
and `openssl`, and will also dynamically link all other needed libraries.
-The command the when use this pulsar library is like this:
 ```bash
  g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so 
-I/usr/local/ssl/include
 ```
 
-2. `libpulsarnossl.so` is the Shared library that similar to `libpulsar.so` 
except that the library `openssl` and `crypto` are dynamically linked.
-The command the when use this pulsar library is like this:
+2. `libpulsarnossl.so` is a shared library that similar to `libpulsar.so` 
except that the libraries `openssl` and `crypto` are dynamically linked. Below 
is the command to use this Pulsar library:
+
 ```bash
  g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsarnossl.so -lssl 
-lcrypto -I/usr/local/ssl/include -L/usr/local/ssl/lib
 ```
 
-3. `libpulsar.a` is the Static library, it need to load some dependencies 
library when using it. 
-The command the when use this pulsar library is like this:
+3. `libpulsar.a` is the static library. You need load dependencies before 
using this library. Below is the command to use this Pulsar library:
+
 ```bash
  g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.a -lssl -lcrypto 
-ldl -lpthread  -I/usr/local/ssl/include -L/usr/local/ssl/lib -lboost_system 
-lboost_regex -lcurl -lprotobuf -lzstd -lz
 ```
 
-4. `libpulsarwithdeps.a` is the Static library, base on `libpulsar.a`, and 
archived in the dependencies libraries of `libboost_regex`,  `libboost_system`, 
`libcurl`, `libprotobuf`, `libzstd` and `libz`, 
-The command the when use this pulsar library is like this:
+4. `libpulsarwithdeps.a` is a static library, based on `libpulsar.a`. It is 
archived in the dependencies of `libboost_regex`, `libboost_system`, `libcurl`, 
`libprotobuf`, `libzstd` and `libz`. Below is the command to use this Pulsar 
library:
+
 ```bash
  g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsarwithdeps.a -lssl 
-lcrypto -ldl -lpthread  -I/usr/local/ssl/include -L/usr/local/ssl/lib
 ```
-`libpulsarwithdeps.a` does not include library openssl related libraries: 
`libssl` and `libcrypto`, because these 2 library is related to security, 
-by using user local system provided version is more reasonable, and more easy 
for user to handling security issue and library upgrade.
+`libpulsarwithdeps.a` does not include library openssl related libraries 
`libssl` and `libcrypto`, because these 2 libraries are related to security. It 
is more reasonable and easier to use the versions provided by the local system 
to handle security issues and upgrade libraries.

Review comment:
       ```suggestion
   `libpulsarwithdeps.a` does not include library `openssl` related libraries 
`libssl` and `libcrypto`, because these two libraries are related to security. 
It is more reasonable and easier to use the versions provided by the local 
system to handle security issues and upgrade libraries.
   ```

##########
File path: site2/docs/client-libraries-cpp.md
##########
@@ -14,40 +14,100 @@ Pulsar C++ client is supported on **Linux** and **MacOS** 
platforms.
 
 [Doxygen](http://www.doxygen.nl/)-generated API docs for the C++ client are 
available [here](/api/cpp).
 
+## System requirements
+
+You need to have the following installed to use the C++ client:
+
+* [CMake](https://cmake.org/)
+* [Boost](http://www.boost.org/)
+* [Protocol Buffers](https://developers.google.com/protocol-buffers/) 2.6
+* [Log4CXX](https://logging.apache.org/log4cxx)
+* [libcurl](https://curl.haxx.se/libcurl/)
+* [Google Test](https://github.com/google/googletest)
+* [JsonCpp](https://github.com/open-source-parsers/jsoncpp)
+
 ## Linux
 
+### Compilation 
+
+The compilation starts with cloning the Pulsar repository:
+
+```shell
+$ git clone https://github.com/apache/pulsar
+```
+
+Install all of the necessary dependencies:
+
+```shell
+$ apt-get install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev \
+  libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev 
libjsoncpp-dev
+```
+
+Then compile and install [Google Test](https://github.com/google/googletest):
+
+```shell
+# libgtest-dev version is 1.18.0 or above
+$ cd /usr/src/googletest
+$ sudo cmake .
+$ sudo make
+$ sudo cp ./googlemock/libgmock.a ./googlemock/gtest/libgtest.a /usr/lib/
+
+# less than 1.18.0
+$ cd /usr/src/gtest
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgtest.a /usr/lib
+
+$ cd /usr/src/gmock
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgmock.a /usr/lib
+```
+
+Finally, compile the Pulsar client library for C++ inside the Pulsar repo:
+
+```shell
+$ cd pulsar-client-cpp
+$ cmake .
+$ make
+```
+
+The resulting files, `libpulsar.so` and `libpulsar.a` will be placed in the 
`lib` folder of the repo. The tools `perfProducer` and `perfConsumer` will be 
placed in the `perf` directory.
+
+### Install Dependencies
+
 > Since 2.1.0 release, Pulsar ships pre-built RPM and Debian packages. You can 
 > download and install those packages directly.
 
-Four kind of libraries `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / 
`libpulsarwithdeps.a` are included in your `/usr/lib` after rpm/deb download 
and install.
-By default, they are build under code path `${PULSAR_HOME}/pulsar-client-cpp`, 
using command
- `cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared 
pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3`
-These libraries rely on some other libraries, if you want to get detailed 
version of dependencies libraries, please reference 
[these](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/rpm/Dockerfile)
 
[files](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/deb/Dockerfile).
+Four kinds of libraries `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / 
`libpulsarwithdeps.a` are included in your `/usr/lib` after rpm/deb being 
downloaded and installed.
+
+By default, they are built under code path `${PULSAR_HOME}/pulsar-client-cpp`. 
You can use this command:

Review comment:
       how is this command is used for? used for build libraries under the 
default code path or use this command to build these libraries under a 
different code path? It is better ti explain more detailed.

##########
File path: site2/docs/client-libraries-cpp.md
##########
@@ -14,40 +14,100 @@ Pulsar C++ client is supported on **Linux** and **MacOS** 
platforms.
 
 [Doxygen](http://www.doxygen.nl/)-generated API docs for the C++ client are 
available [here](/api/cpp).
 
+## System requirements
+
+You need to have the following installed to use the C++ client:
+
+* [CMake](https://cmake.org/)
+* [Boost](http://www.boost.org/)
+* [Protocol Buffers](https://developers.google.com/protocol-buffers/) 2.6
+* [Log4CXX](https://logging.apache.org/log4cxx)
+* [libcurl](https://curl.haxx.se/libcurl/)
+* [Google Test](https://github.com/google/googletest)
+* [JsonCpp](https://github.com/open-source-parsers/jsoncpp)
+
 ## Linux
 
+### Compilation 
+
+The compilation starts with cloning the Pulsar repository:
+
+```shell
+$ git clone https://github.com/apache/pulsar
+```
+
+Install all of the necessary dependencies:
+
+```shell
+$ apt-get install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev \
+  libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev 
libjsoncpp-dev
+```
+
+Then compile and install [Google Test](https://github.com/google/googletest):
+
+```shell
+# libgtest-dev version is 1.18.0 or above
+$ cd /usr/src/googletest
+$ sudo cmake .
+$ sudo make
+$ sudo cp ./googlemock/libgmock.a ./googlemock/gtest/libgtest.a /usr/lib/
+
+# less than 1.18.0
+$ cd /usr/src/gtest
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgtest.a /usr/lib
+
+$ cd /usr/src/gmock
+$ sudo cmake .
+$ sudo make
+$ sudo cp libgmock.a /usr/lib
+```
+
+Finally, compile the Pulsar client library for C++ inside the Pulsar repo:
+
+```shell
+$ cd pulsar-client-cpp
+$ cmake .
+$ make
+```
+
+The resulting files, `libpulsar.so` and `libpulsar.a` will be placed in the 
`lib` folder of the repo. The tools `perfProducer` and `perfConsumer` will be 
placed in the `perf` directory.
+
+### Install Dependencies
+
 > Since 2.1.0 release, Pulsar ships pre-built RPM and Debian packages. You can 
 > download and install those packages directly.
 
-Four kind of libraries `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / 
`libpulsarwithdeps.a` are included in your `/usr/lib` after rpm/deb download 
and install.
-By default, they are build under code path `${PULSAR_HOME}/pulsar-client-cpp`, 
using command
- `cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared 
pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3`
-These libraries rely on some other libraries, if you want to get detailed 
version of dependencies libraries, please reference 
[these](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/rpm/Dockerfile)
 
[files](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/deb/Dockerfile).
+Four kinds of libraries `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / 
`libpulsarwithdeps.a` are included in your `/usr/lib` after rpm/deb being 
downloaded and installed.
+
+By default, they are built under code path `${PULSAR_HOME}/pulsar-client-cpp`. 
You can use this command:
+ `cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared 
pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3`.
+These libraries rely on some other libraries, if you want to get detailed 
version of dependencies, please reference 
[rpm](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/rpm/Dockerfile)
 or 
[deb](https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/pkg/deb/Dockerfile)
 files.
+
+1. `libpulsar.so` is a shared library, which contains statically linked 
`boost` and `openssl`. It also dynamically links all other needed libraries. 
Below is the command to use this Pulsar library:
 
-1. `libpulsar.so` is the Shared library, it contains statically linked `boost` 
and `openssl`, and will also dynamically link all other needed libraries.
-The command the when use this pulsar library is like this:
 ```bash
  g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so 
-I/usr/local/ssl/include
 ```
 
-2. `libpulsarnossl.so` is the Shared library that similar to `libpulsar.so` 
except that the library `openssl` and `crypto` are dynamically linked.
-The command the when use this pulsar library is like this:
+2. `libpulsarnossl.so` is a shared library that similar to `libpulsar.so` 
except that the libraries `openssl` and `crypto` are dynamically linked. Below 
is the command to use this Pulsar library:

Review comment:
       ```suggestion
   2. `libpulsarnossl.so` is a shared library that is similar to `libpulsar.so` 
except that the libraries `openssl` and `crypto` are dynamically linked. Below 
is the command to use this Pulsar library:
   ```

##########
File path: site2/docs/client-libraries-cpp.md
##########
@@ -129,6 +189,45 @@ Debian packages are created at 
`pulsar-client-cpp/pkg/deb/BUILD/DEB/`.
 
 ## MacOS
 
+### Compilation
+
+The compilation starts with cloning the Pulsar repository:

Review comment:
       use an ordered list and use a period(.) instead of a colon (:) at the 
end of each sentence.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to