You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/10 16:54:04 UTC

[GitHub] [pulsar] tisonkun opened a new pull request, #17580: Doc cpp client install

tisonkun opened a new pull request, #17580:
URL: https://github.com/apache/pulsar/pull/17580

   Fixes #17385
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
   
   - [ ] `doc-not-needed` 
   (Please explain why)
   
   - [x] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-complete`
   (Docs have been already added)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] BewareMyPower commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r971515361


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
+Install the latest tagged version with the library and headers:
 
-2. Install all 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
-```
-
-3. 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
-```
-
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+brew install libpulsar
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
+### Deb
 
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+1. Download any one of the Deb packages:
 
-These libraries rely on some other libraries. If you want to get a 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.
-
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
+wget @pulsar:deb:client@
 ```
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:deb:client-devel@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
-
-```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
-```
+</TabItem>
+</Tabs>
 
-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`. You can use this Pulsar library with the command below.
+2. Install the package using the following command:
 
 ```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
+apt install ./apache-pulsar-client*.deb
 ```
 
-The `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.
-
-### Install RPM
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. Download an RPM package from the links in the table. 
+### RPM
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
+1. Download any one of the RPM packages:
 
-2. Install the package using the following command.
+<Tabs>
+<TabItem value="client">
 
 ```bash
-rpm -ivh apache-pulsar-client*.rpm
+wget @pulsar:dist_rpm:client@
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-:::note
-
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
-
-:::
-
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
+</TabItem>
+<TabItem value="client-devel">
 
 ```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+</TabItem>
+</Tabs>
 
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
-```
-
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
-
-To build the C++ library packages, you need to build the Java packages first.
-
-```shell
-mvn install -DskipTests
-```
-
-#### RPM
-
-To build the RPM inside a Docker container, use the command below. The RPMs are in the `pulsar-client-cpp/pkg/rpm/RPMS/x86_64/` path.
-
-```shell
-pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
-```
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |

Review Comment:
   I have the same question.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on pull request #17580: Doc cpp client install

Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#issuecomment-1242767120

   Previews:
   
   <img width="1728" alt="image" src="https://user-images.githubusercontent.com/18818196/189493621-993aae26-e937-4b3a-8a2f-f31871e970e0.png">
   <img width="1728" alt="image" src="https://user-images.githubusercontent.com/18818196/189493667-80f05100-08e3-4d2b-bd3c-686e8ba9af4c.png">
   <img width="1728" alt="image" src="https://user-images.githubusercontent.com/18818196/189493639-418afb5e-73b9-4e5f-b0cc-633b02b16cbb.png">
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] BewareMyPower commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r969641950


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,173 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
+Install the latest tagged version with the library and headers:
 
-:::
-
-### Compilation
+```bash
+brew install libpulsar
+```
 
-#### System requirements
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-You need to install the following components before using the C++ client:
+### Deb
 
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
+1. Download any one of the Deb packages:
 
-1. Clone the Pulsar repository.
+<Tabs>
+<TabItem value="client">
 
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+wget @pulsar:deb:client@
 ```
 
-2. Install all necessary dependencies.
+</TabItem>
+<TabItem value="client-devel">
 
-```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
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-3. 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
-```
+</TabItem>
+</Tabs>
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+2. Install the package using the following command:
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+apt install ./apache-pulsar-client*.deb
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
-
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-These libraries rely on some other libraries. If you want to get a 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.
+### RPM
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+1. Download any one of the RPM packages:
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
-
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
-
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
+</TabItem>
+</Tabs>
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get an error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting a Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
-
-```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
-```
-
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+### Source
 
-2. Install the package using the following command.
+1. Clone the Pulsar repository and switch to the working directory `pulsar-client-cpp`:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
-```
-
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
-
-To build the C++ library packages, you need to build the Java packages first.
-
-```shell
-mvn install -DskipTests
+git clone https://github.com/apache/pulsar
+cd pulsar
+cd pulsar-client-cpp
 ```
 
-#### RPM
+2. Install dependencies:
 
-To build the RPM inside a Docker container, use the command below. The RPMs are in the `pulsar-client-cpp/pkg/rpm/RPMS/x86_64/` path.
+<Tabs>
+<TabItem value="Linux">

Review Comment:
   In addition to "Linux", I think it's better to note this command is only available for Debian-based Linux distributions. Is there any way to add a note in the tab page?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r967677628


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,192 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)

Review Comment:
   Redundant. Included in the `Install dependencies:` tabs.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#issuecomment-1245551732

   > I have a concern that should we just link to https://github.com/apache/pulsar/tree/master/pulsar-client-cpp#compilation instead of adding repeated documents here?
   
   I agree that build from source has low frequency and users who want to do it will be OK to jump to the source code repository. Will push a commit tomorrow. Also, cc @merlimat @RobertIndie @shibd for inputs.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] BewareMyPower commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r969634656


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,192 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.

Review Comment:
   Yes. We can remove this section. https://github.com/apache/pulsar/tree/master/pulsar-client-cpp#compilation is intended for developers that want to build from source.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r967857096


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,192 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
+</TabItem>
+</Tabs>
 
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+2. Install the package using the following command:
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+```bash
+apt install ./apache-pulsar-client*.deb
+```
 
-These libraries rely on some other libraries. If you want to get a 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.
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+### RPM
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
+1. Download any one of the RPM packages:
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
+</TabItem>
+</Tabs>
 
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get the error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
-
-```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
-```
-
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+### Source
 
-2. Install the package using the following command.
+1. Clone the Pulsar repository and switch to the working directory `pulsar-client-cpp`:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
+git clone https://github.com/apache/pulsar
+cd pulsar
+cd pulsar-client-cpp
 ```
 
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
+2. Install dependencies:
 
-To build the C++ library packages, you need to build the Java packages first.
+<Tabs>
+<TabItem value="Linux">
 
-```shell
-mvn install -DskipTests
-```
+```bash
+apt install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev libjsoncpp-dev
 
-#### RPM
+# libgtest-dev version is 1.18.0 or above

Review Comment:
   Good point. I suppose only the client developers should build with test. Don't know whether we have a hard dependency in release mode. cc @BewareMyPower 



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Anonymitaet commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r970418578


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
+Install the latest tagged version with the library and headers:
 
-2. Install all 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
-```
-
-3. 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
-```
-
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+brew install libpulsar
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
+### Deb
 
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+1. Download any one of the Deb packages:
 
-These libraries rely on some other libraries. If you want to get a 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.
-
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
+wget @pulsar:deb:client@
 ```
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:deb:client-devel@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
-
-```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
-```
+</TabItem>
+</Tabs>
 
-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`. You can use this Pulsar library with the command below.
+2. Install the package using the following command:
 
 ```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
+apt install ./apache-pulsar-client*.deb
 ```
 
-The `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.
-
-### Install RPM
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. Download an RPM package from the links in the table. 
+### RPM
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
+1. Download any one of the RPM packages:
 
-2. Install the package using the following command.
+<Tabs>
+<TabItem value="client">
 
 ```bash
-rpm -ivh apache-pulsar-client*.rpm
+wget @pulsar:dist_rpm:client@
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-:::note
-
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
-
-:::
-
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
+</TabItem>
+<TabItem value="client-devel">
 
 ```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+</TabItem>
+</Tabs>
 
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
-```
-
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
-
-To build the C++ library packages, you need to build the Java packages first.
-
-```shell
-mvn install -DskipTests
-```
-
-#### RPM
-
-To build the RPM inside a Docker container, use the command below. The RPMs are in the `pulsar-client-cpp/pkg/rpm/RPMS/x86_64/` path.
-
-```shell
-pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
-```
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |
-| pulsar-client-devel | Static library `libpulsar.a`, `libpulsarwithdeps.a`and C++ and C headers |
-| pulsar-client-debuginfo | Debug symbols for `libpulsar.so` |
-
-#### Debian
-
-To build Debian packages, enter the following command.
-
-```shell
-pulsar-client-cpp/pkg/deb/docker-build-deb.sh
-```
-
-Debian packages are created in the `pulsar-client-cpp/pkg/deb/BUILD/DEB/` path.
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |
-| pulsar-client-dev | Static library `libpulsar.a`, `libpulsarwithdeps.a` and C++ and C headers |
-
-## MacOS
-
-### Compilation
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
-
-2. Install all necessary dependencies.
-
-```shell
-# OpenSSL installation
-brew install openssl
-export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include/
-export OPENSSL_ROOT_DIR=/usr/local/opt/openssl/
-
-# Protocol Buffers installation
-brew install protobuf boost boost-python log4cxx
-# If you are using python3, you need to install boost-python3 
-
-# Google Test installation
-git clone https://github.com/google/googletest.git
-cd googletest
-git checkout release-1.12.1
-cmake .
-make install
-```
-
-3. Compile the Pulsar client library in the repository that you cloned.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
-```
-
-### Install `libpulsar`
-
-Pulsar releases are available in the [Homebrew](https://brew.sh/) core repository. You can install the C++ client library with the following command. The package is installed with the library and headers.
-
-```shell
-brew install libpulsar
-```
-
-## Windows (64-bit)
-
-### Compilation
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
-
-2. Install all necessary dependencies.
-
-```shell
-cd ${PULSAR_HOME}/pulsar-client-cpp
-vcpkg install --feature-flags=manifests --triplet x64-windows
+rpm -ivh apache-pulsar-client*.rpm
 ```
 
-3. Build C++ libraries.
-
-```shell
-cmake -B ./build -A x64 -DBUILD_PYTHON_WRAPPER=OFF -DBUILD_TESTS=OFF -DVCPKG_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=Release -S .
-cmake --build ./build --config Release
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-* For Windows 32-bit, you need to use `-A Win32` and `-DVCPKG_TRIPLET=x86-windows`.
-* For MSVC Debug mode, you need to replace `Release` with `Debug` for both `CMAKE_BUILD_TYPE` variable and `--config` option.
+If you get an error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting a Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-4. Client libraries are available in the following places.
+### Source
 
-```
-${PULSAR_HOME}/pulsar-client-cpp/build/lib/Release/pulsar.lib
-${PULSAR_HOME}/pulsar-client-cpp/build/lib/Release/pulsar.dll
-```
+If you want to build the Pulsar C++ client from source code, read [these instructions](https://github.com/apache/pulsar/tree/master/pulsar-client-cpp#compilation).

Review Comment:
   ```suggestion
   For how to build Pulsar C++ client on different platforms, see [compliation](https://github.com/apache/pulsar/tree/master/pulsar-client-cpp#compilation).
   ```
   
   Thoughts?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r970423433


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
+Install the latest tagged version with the library and headers:
 
-2. Install all 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
-```
-
-3. 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
-```
-
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+brew install libpulsar
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
+### Deb
 
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+1. Download any one of the Deb packages:
 
-These libraries rely on some other libraries. If you want to get a 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.
-
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
+wget @pulsar:deb:client@
 ```
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:deb:client-devel@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
-
-```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
-```
+</TabItem>
+</Tabs>
 
-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`. You can use this Pulsar library with the command below.
+2. Install the package using the following command:
 
 ```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
+apt install ./apache-pulsar-client*.deb
 ```
 
-The `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.
-
-### Install RPM
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. Download an RPM package from the links in the table. 
+### RPM
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
+1. Download any one of the RPM packages:
 
-2. Install the package using the following command.
+<Tabs>
+<TabItem value="client">
 
 ```bash
-rpm -ivh apache-pulsar-client*.rpm
+wget @pulsar:dist_rpm:client@
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-:::note
-
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
-
-:::
-
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
+</TabItem>
+<TabItem value="client-devel">
 
 ```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+</TabItem>
+</Tabs>
 
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
-```
-
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
-
-To build the C++ library packages, you need to build the Java packages first.
-
-```shell
-mvn install -DskipTests
-```
-
-#### RPM
-
-To build the RPM inside a Docker container, use the command below. The RPMs are in the `pulsar-client-cpp/pkg/rpm/RPMS/x86_64/` path.
-
-```shell
-pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
-```
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |
-| pulsar-client-devel | Static library `libpulsar.a`, `libpulsarwithdeps.a`and C++ and C headers |
-| pulsar-client-debuginfo | Debug symbols for `libpulsar.so` |
-
-#### Debian
-
-To build Debian packages, enter the following command.
-
-```shell
-pulsar-client-cpp/pkg/deb/docker-build-deb.sh
-```
-
-Debian packages are created in the `pulsar-client-cpp/pkg/deb/BUILD/DEB/` path.
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |
-| pulsar-client-dev | Static library `libpulsar.a`, `libpulsarwithdeps.a` and C++ and C headers |
-
-## MacOS
-
-### Compilation
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
-
-2. Install all necessary dependencies.
-
-```shell
-# OpenSSL installation
-brew install openssl
-export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include/
-export OPENSSL_ROOT_DIR=/usr/local/opt/openssl/
-
-# Protocol Buffers installation
-brew install protobuf boost boost-python log4cxx
-# If you are using python3, you need to install boost-python3 
-
-# Google Test installation
-git clone https://github.com/google/googletest.git
-cd googletest
-git checkout release-1.12.1
-cmake .
-make install
-```
-
-3. Compile the Pulsar client library in the repository that you cloned.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
-```
-
-### Install `libpulsar`
-
-Pulsar releases are available in the [Homebrew](https://brew.sh/) core repository. You can install the C++ client library with the following command. The package is installed with the library and headers.
-
-```shell
-brew install libpulsar
-```
-
-## Windows (64-bit)
-
-### Compilation
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
-
-2. Install all necessary dependencies.
-
-```shell
-cd ${PULSAR_HOME}/pulsar-client-cpp
-vcpkg install --feature-flags=manifests --triplet x64-windows
+rpm -ivh apache-pulsar-client*.rpm
 ```
 
-3. Build C++ libraries.
-
-```shell
-cmake -B ./build -A x64 -DBUILD_PYTHON_WRAPPER=OFF -DBUILD_TESTS=OFF -DVCPKG_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=Release -S .
-cmake --build ./build --config Release
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-* For Windows 32-bit, you need to use `-A Win32` and `-DVCPKG_TRIPLET=x86-windows`.
-* For MSVC Debug mode, you need to replace `Release` with `Debug` for both `CMAKE_BUILD_TYPE` variable and `--config` option.
+If you get an error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting a Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-4. Client libraries are available in the following places.
+### Source
 
-```
-${PULSAR_HOME}/pulsar-client-cpp/build/lib/Release/pulsar.lib
-${PULSAR_HOME}/pulsar-client-cpp/build/lib/Release/pulsar.dll
-```
+If you want to build the Pulsar C++ client from source code, read [these instructions](https://github.com/apache/pulsar/tree/master/pulsar-client-cpp#compilation).

Review Comment:
   Add `from source code` word. Others accepted.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] shibd commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
shibd commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r971463888


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
+Install the latest tagged version with the library and headers:
 
-2. Install all 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
-```
-
-3. 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
-```
-
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+brew install libpulsar
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
+### Deb
 
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+1. Download any one of the Deb packages:
 
-These libraries rely on some other libraries. If you want to get a 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.
-
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
+wget @pulsar:deb:client@
 ```
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:deb:client-devel@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
-
-```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
-```
+</TabItem>
+</Tabs>
 
-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`. You can use this Pulsar library with the command below.
+2. Install the package using the following command:
 
 ```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
+apt install ./apache-pulsar-client*.deb
 ```
 
-The `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.
-
-### Install RPM
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. Download an RPM package from the links in the table. 
+### RPM
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
+1. Download any one of the RPM packages:
 
-2. Install the package using the following command.
+<Tabs>
+<TabItem value="client">
 
 ```bash
-rpm -ivh apache-pulsar-client*.rpm
+wget @pulsar:dist_rpm:client@
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-:::note
-
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
-
-:::
-
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
+</TabItem>
+<TabItem value="client-devel">
 
 ```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+</TabItem>
+</Tabs>
 
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
-```
-
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
-
-To build the C++ library packages, you need to build the Java packages first.
-
-```shell
-mvn install -DskipTests
-```
-
-#### RPM
-
-To build the RPM inside a Docker container, use the command below. The RPMs are in the `pulsar-client-cpp/pkg/rpm/RPMS/x86_64/` path.
-
-```shell
-pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
-```
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |

Review Comment:
   I don't quite understand. For the user, he can choose these three packages to use, but we didn't introduce the difference between these three packages.
   
   <img width="1291" alt="image" src="https://user-images.githubusercontent.com/33416836/190299259-a328b0ce-9442-4c4e-8b45-80562cd9bc65.png">
   



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] merlimat commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
merlimat commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r968795777


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,191 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
+</TabItem>
+</Tabs>
 
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+2. Install the package using the following command:
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+```bash
+apt install ./apache-pulsar-client*.deb
+```
 
-These libraries rely on some other libraries. If you want to get a 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.
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+### RPM
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
+1. Download any one of the RPM packages:
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
+</TabItem>
+</Tabs>
 
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get the error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
-
-```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
-```
-
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+### Source
 
-2. Install the package using the following command.
+1. Clone the Pulsar repository and switch to the working directory `pulsar-client-cpp`:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
+git clone https://github.com/apache/pulsar
+cd pulsar
+cd pulsar-client-cpp
 ```
 
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
+2. Install dependencies:
 
-To build the C++ library packages, you need to build the Java packages first.
+<Tabs>
+<TabItem value="Linux">
 
-```shell
-mvn install -DskipTests
-```
+```bash
+apt install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev libjsoncpp-dev
 
-#### RPM
+# libgtest-dev version is 1.18.0 or above
+pushd /usr/src/googletest
+sudo cmake .
+sudo make
+sudo cp ./googlemock/libgmock.a ./googlemock/gtest/libgtest.a /usr/lib/
+popd
 
-To build the RPM inside a Docker container, use the command below. The RPMs are in the `pulsar-client-cpp/pkg/rpm/RPMS/x86_64/` path.
+## libgtest-dev less than 1.18.0
+# pushd /usr/src/gtest
+# sudo cmake .
+# sudo make
+# sudo cp libgtest.a /usr/lib
+# popd
 
-```shell
-pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
+pushd /usr/src/gmock
+sudo cmake .
+sudo make
+sudo cp libgmock.a /usr/lib
+popd
 ```
 
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |
-| pulsar-client-devel | Static library `libpulsar.a`, `libpulsarwithdeps.a`and C++ and C headers |
-| pulsar-client-debuginfo | Debug symbols for `libpulsar.so` |
+</TabItem>
+<TabItem value="macOS">
 
-#### Debian
-
-To build Debian packages, enter the following command.
+```bash
+brew install protobuf boost boost-python3 log4cxx googletest cmake openssl

Review Comment:
   ```suggestion
   brew install protobuf boost boost-python3 googletest cmake openssl
   ```



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r971522634


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew

Review Comment:
   Thanks for pointing this out. I have an idea to add the link where keep the wording smooth, will update later.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r971463473


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
+Install the latest tagged version with the library and headers:
 
-2. Install all 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
-```
-
-3. 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
-```
-
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+brew install libpulsar
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
+### Deb
 
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+1. Download any one of the Deb packages:
 
-These libraries rely on some other libraries. If you want to get a 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.
-
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
+wget @pulsar:deb:client@
 ```
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:deb:client-devel@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
-
-```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
-```
+</TabItem>
+</Tabs>
 
-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`. You can use this Pulsar library with the command below.
+2. Install the package using the following command:
 
 ```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
+apt install ./apache-pulsar-client*.deb
 ```
 
-The `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.
-
-### Install RPM
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. Download an RPM package from the links in the table. 
+### RPM
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
+1. Download any one of the RPM packages:
 
-2. Install the package using the following command.
+<Tabs>
+<TabItem value="client">
 
 ```bash
-rpm -ivh apache-pulsar-client*.rpm
+wget @pulsar:dist_rpm:client@
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-:::note
-
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
-
-:::
-
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
+</TabItem>
+<TabItem value="client-devel">
 
 ```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+</TabItem>
+</Tabs>
 
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
-```
-
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
-
-To build the C++ library packages, you need to build the Java packages first.
-
-```shell
-mvn install -DskipTests
-```
-
-#### RPM
-
-To build the RPM inside a Docker container, use the command below. The RPMs are in the `pulsar-client-cpp/pkg/rpm/RPMS/x86_64/` path.
-
-```shell
-pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
-```
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |

Review Comment:
   OK. I get your point. Will push a commit later. FYI - It's not a regression. Previously we don't talk about it in the installation section also.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r967857096


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,192 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
+</TabItem>
+</Tabs>
 
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+2. Install the package using the following command:
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+```bash
+apt install ./apache-pulsar-client*.deb
+```
 
-These libraries rely on some other libraries. If you want to get a 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.
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+### RPM
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
+1. Download any one of the RPM packages:
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
+</TabItem>
+</Tabs>
 
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get the error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
-
-```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
-```
-
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+### Source
 
-2. Install the package using the following command.
+1. Clone the Pulsar repository and switch to the working directory `pulsar-client-cpp`:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
+git clone https://github.com/apache/pulsar
+cd pulsar
+cd pulsar-client-cpp
 ```
 
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
+2. Install dependencies:
 
-To build the C++ library packages, you need to build the Java packages first.
+<Tabs>
+<TabItem value="Linux">
 
-```shell
-mvn install -DskipTests
-```
+```bash
+apt install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev libjsoncpp-dev
 
-#### RPM
+# libgtest-dev version is 1.18.0 or above

Review Comment:
   Good point. I suppose only the client developers should build with test. When users build in release mode, they should simply ignore these test deps. Don't know whether we have a hard dependency in release mode. cc @BewareMyPower 



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#issuecomment-1245383073

   @merlimat @Anonymitaet Thanks for your reviews! Comments addressed.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#issuecomment-1247584733

   @shibd @Demogorgon314 updated. Here is the preview:
   
   <img width="1728" alt="image" src="https://user-images.githubusercontent.com/18818196/190318670-12206e97-da4e-4868-9d4c-dfe3401c3f09.png">
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r970239180


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
+Install the latest tagged version with the library and headers:
 
-2. Install all 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
-```
-
-3. 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
-```
-
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+brew install libpulsar
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
+### Deb
 
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+1. Download any one of the Deb packages:
 
-These libraries rely on some other libraries. If you want to get a 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.
-
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
+wget @pulsar:deb:client@
 ```
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:deb:client-devel@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
-
-```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
-```
+</TabItem>
+</Tabs>
 
-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`. You can use this Pulsar library with the command below.
+2. Install the package using the following command:
 
 ```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
+apt install ./apache-pulsar-client*.deb
 ```
 
-The `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.
-
-### Install RPM
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. Download an RPM package from the links in the table. 
+### RPM
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
+1. Download any one of the RPM packages:
 
-2. Install the package using the following command.
+<Tabs>
+<TabItem value="client">
 
 ```bash
-rpm -ivh apache-pulsar-client*.rpm
+wget @pulsar:dist_rpm:client@
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-:::note
-
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
-
-:::
-
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
+</TabItem>
+<TabItem value="client-devel">
 
 ```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+</TabItem>
+</Tabs>
 
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
-```
-
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
-
-To build the C++ library packages, you need to build the Java packages first.
-
-```shell
-mvn install -DskipTests
-```
-
-#### RPM
-
-To build the RPM inside a Docker container, use the command below. The RPMs are in the `pulsar-client-cpp/pkg/rpm/RPMS/x86_64/` path.
-
-```shell
-pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
-```
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |
-| pulsar-client-devel | Static library `libpulsar.a`, `libpulsarwithdeps.a`and C++ and C headers |
-| pulsar-client-debuginfo | Debug symbols for `libpulsar.so` |
-
-#### Debian
-
-To build Debian packages, enter the following command.
-
-```shell
-pulsar-client-cpp/pkg/deb/docker-build-deb.sh
-```
-
-Debian packages are created in the `pulsar-client-cpp/pkg/deb/BUILD/DEB/` path.
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |
-| pulsar-client-dev | Static library `libpulsar.a`, `libpulsarwithdeps.a` and C++ and C headers |
-
-## MacOS
-
-### Compilation
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
-
-2. Install all necessary dependencies.
-
-```shell
-# OpenSSL installation
-brew install openssl
-export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include/
-export OPENSSL_ROOT_DIR=/usr/local/opt/openssl/
-
-# Protocol Buffers installation
-brew install protobuf boost boost-python log4cxx
-# If you are using python3, you need to install boost-python3 
-
-# Google Test installation
-git clone https://github.com/google/googletest.git
-cd googletest
-git checkout release-1.12.1
-cmake .
-make install
-```
-
-3. Compile the Pulsar client library in the repository that you cloned.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
-```
-
-### Install `libpulsar`
-
-Pulsar releases are available in the [Homebrew](https://brew.sh/) core repository. You can install the C++ client library with the following command. The package is installed with the library and headers.
-
-```shell
-brew install libpulsar
-```
-
-## Windows (64-bit)
-
-### Compilation
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
-
-2. Install all necessary dependencies.
-
-```shell
-cd ${PULSAR_HOME}/pulsar-client-cpp
-vcpkg install --feature-flags=manifests --triplet x64-windows
+rpm -ivh apache-pulsar-client*.rpm
 ```
 
-3. Build C++ libraries.
-
-```shell
-cmake -B ./build -A x64 -DBUILD_PYTHON_WRAPPER=OFF -DBUILD_TESTS=OFF -DVCPKG_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=Release -S .
-cmake --build ./build --config Release
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-* For Windows 32-bit, you need to use `-A Win32` and `-DVCPKG_TRIPLET=x86-windows`.
-* For MSVC Debug mode, you need to replace `Release` with `Debug` for both `CMAKE_BUILD_TYPE` variable and `--config` option.
+If you get an error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting a Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-4. Client libraries are available in the following places.
+### Source
 
-```
-${PULSAR_HOME}/pulsar-client-cpp/build/lib/Release/pulsar.lib
-${PULSAR_HOME}/pulsar-client-cpp/build/lib/Release/pulsar.dll
-```
+If you want to build the Pulsar C++ client from source code, read [these instructions](https://github.com/apache/pulsar/tree/master/pulsar-client-cpp#compilation).

Review Comment:
   See https://github.com/apache/pulsar/pull/17580#pullrequestreview-1105841168 and https://github.com/apache/pulsar/pull/17580#issuecomment-1245551732 for background.
   
   @Anonymitaet could you help with reviewing the wording here?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on pull request #17580: Doc cpp client install

Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#issuecomment-1242766777

   cc @BewareMyPower @shibd @RobertIndie 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] merlimat commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
merlimat commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r968796655


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,191 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
+</TabItem>
+</Tabs>
 
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+2. Install the package using the following command:
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+```bash
+apt install ./apache-pulsar-client*.deb
+```
 
-These libraries rely on some other libraries. If you want to get a 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.
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+### RPM
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
+1. Download any one of the RPM packages:
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
+</TabItem>
+</Tabs>
 
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get the error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
-
-```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
-```
-
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+### Source
 
-2. Install the package using the following command.
+1. Clone the Pulsar repository and switch to the working directory `pulsar-client-cpp`:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
+git clone https://github.com/apache/pulsar
+cd pulsar
+cd pulsar-client-cpp
 ```
 
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
+2. Install dependencies:
 
-To build the C++ library packages, you need to build the Java packages first.
+<Tabs>
+<TabItem value="Linux">
 
-```shell
-mvn install -DskipTests
-```
+```bash
+apt install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev libjsoncpp-dev

Review Comment:
   ```suggestion
   apt install cmake libssl-dev libcurl4-openssl-dev libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev
   ```



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Anonymitaet commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r969052080


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,191 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation

Review Comment:
   ```suggestion
   ## Installation
   
   Use one of the following methods to install a Pulsar C++ client.
   ```
   
   Add an introductory sentence providing background about the topic or main idea.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r970239180


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
+Install the latest tagged version with the library and headers:
 
-2. Install all 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
-```
-
-3. 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
-```
-
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+brew install libpulsar
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
+### Deb
 
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+1. Download any one of the Deb packages:
 
-These libraries rely on some other libraries. If you want to get a 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.
-
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
+wget @pulsar:deb:client@
 ```
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:deb:client-devel@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
-
-```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
-```
+</TabItem>
+</Tabs>
 
-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`. You can use this Pulsar library with the command below.
+2. Install the package using the following command:
 
 ```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
+apt install ./apache-pulsar-client*.deb
 ```
 
-The `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.
-
-### Install RPM
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. Download an RPM package from the links in the table. 
+### RPM
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
+1. Download any one of the RPM packages:
 
-2. Install the package using the following command.
+<Tabs>
+<TabItem value="client">
 
 ```bash
-rpm -ivh apache-pulsar-client*.rpm
+wget @pulsar:dist_rpm:client@
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-:::note
-
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
-
-:::
-
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
+</TabItem>
+<TabItem value="client-devel">
 
 ```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+</TabItem>
+</Tabs>
 
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
-```
-
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
-
-To build the C++ library packages, you need to build the Java packages first.
-
-```shell
-mvn install -DskipTests
-```
-
-#### RPM
-
-To build the RPM inside a Docker container, use the command below. The RPMs are in the `pulsar-client-cpp/pkg/rpm/RPMS/x86_64/` path.
-
-```shell
-pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
-```
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |
-| pulsar-client-devel | Static library `libpulsar.a`, `libpulsarwithdeps.a`and C++ and C headers |
-| pulsar-client-debuginfo | Debug symbols for `libpulsar.so` |
-
-#### Debian
-
-To build Debian packages, enter the following command.
-
-```shell
-pulsar-client-cpp/pkg/deb/docker-build-deb.sh
-```
-
-Debian packages are created in the `pulsar-client-cpp/pkg/deb/BUILD/DEB/` path.
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |
-| pulsar-client-dev | Static library `libpulsar.a`, `libpulsarwithdeps.a` and C++ and C headers |
-
-## MacOS
-
-### Compilation
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
-
-2. Install all necessary dependencies.
-
-```shell
-# OpenSSL installation
-brew install openssl
-export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include/
-export OPENSSL_ROOT_DIR=/usr/local/opt/openssl/
-
-# Protocol Buffers installation
-brew install protobuf boost boost-python log4cxx
-# If you are using python3, you need to install boost-python3 
-
-# Google Test installation
-git clone https://github.com/google/googletest.git
-cd googletest
-git checkout release-1.12.1
-cmake .
-make install
-```
-
-3. Compile the Pulsar client library in the repository that you cloned.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
-```
-
-### Install `libpulsar`
-
-Pulsar releases are available in the [Homebrew](https://brew.sh/) core repository. You can install the C++ client library with the following command. The package is installed with the library and headers.
-
-```shell
-brew install libpulsar
-```
-
-## Windows (64-bit)
-
-### Compilation
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
-
-2. Install all necessary dependencies.
-
-```shell
-cd ${PULSAR_HOME}/pulsar-client-cpp
-vcpkg install --feature-flags=manifests --triplet x64-windows
+rpm -ivh apache-pulsar-client*.rpm
 ```
 
-3. Build C++ libraries.
-
-```shell
-cmake -B ./build -A x64 -DBUILD_PYTHON_WRAPPER=OFF -DBUILD_TESTS=OFF -DVCPKG_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=Release -S .
-cmake --build ./build --config Release
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-* For Windows 32-bit, you need to use `-A Win32` and `-DVCPKG_TRIPLET=x86-windows`.
-* For MSVC Debug mode, you need to replace `Release` with `Debug` for both `CMAKE_BUILD_TYPE` variable and `--config` option.
+If you get an error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting a Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-4. Client libraries are available in the following places.
+### Source
 
-```
-${PULSAR_HOME}/pulsar-client-cpp/build/lib/Release/pulsar.lib
-${PULSAR_HOME}/pulsar-client-cpp/build/lib/Release/pulsar.dll
-```
+If you want to build the Pulsar C++ client from source code, read [these instructions](https://github.com/apache/pulsar/tree/master/pulsar-client-cpp#compilation).

Review Comment:
   See https://github.com/apache/pulsar/pull/17580#pullrequestreview-1105841168 and https://github.com/apache/pulsar/pull/17580#issuecomment-1245551732 for background.
   
   @Anonymitaet could you help with reviewing this wording?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r969597809


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,192 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
+</TabItem>
+</Tabs>
 
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+2. Install the package using the following command:
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+```bash
+apt install ./apache-pulsar-client*.deb
+```
 
-These libraries rely on some other libraries. If you want to get a 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.
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+### RPM
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
+1. Download any one of the RPM packages:
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
+</TabItem>
+</Tabs>
 
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get the error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
-
-```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
-```
-
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+### Source
 
-2. Install the package using the following command.
+1. Clone the Pulsar repository and switch to the working directory `pulsar-client-cpp`:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
+git clone https://github.com/apache/pulsar
+cd pulsar
+cd pulsar-client-cpp
 ```
 
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
+2. Install dependencies:
 
-To build the C++ library packages, you need to build the Java packages first.
+<Tabs>
+<TabItem value="Linux">
 
-```shell
-mvn install -DskipTests
-```
+```bash
+apt install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev libjsoncpp-dev
 
-#### RPM
+# libgtest-dev version is 1.18.0 or above

Review Comment:
   @merlimat Thanks for your information! I made this commit https://github.com/apache/pulsar/pull/17580/commits/2e9a946840194b6f46e39e1b75c0887c956cfe2d for excluding tests. Please take a look.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r967677703


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,192 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.

Review Comment:
   It seems outdated for build from source. Or at least I don't know what is this section for. Please confirm @BewareMyPower. 



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] BewareMyPower commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r969626509


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,173 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
+Install the latest tagged version with the library and headers:
 
-:::
-
-### Compilation
+```bash
+brew install libpulsar
+```
 
-#### System requirements
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-You need to install the following components before using the C++ client:
+### Deb
 
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
+1. Download any one of the Deb packages:
 
-1. Clone the Pulsar repository.
+<Tabs>
+<TabItem value="client">
 
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+wget @pulsar:deb:client@

Review Comment:
   Could you explain what does `@pulsar:deb:client@` mean? I see it doesn't change even in the preview page.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r971459471


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
+Install the latest tagged version with the library and headers:
 
-2. Install all 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
-```
-
-3. 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
-```
-
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+brew install libpulsar
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
+### Deb
 
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+1. Download any one of the Deb packages:
 
-These libraries rely on some other libraries. If you want to get a 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.
-
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
+wget @pulsar:deb:client@
 ```
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:deb:client-devel@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
-
-```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
-```
+</TabItem>
+</Tabs>
 
-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`. You can use this Pulsar library with the command below.
+2. Install the package using the following command:
 
 ```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
+apt install ./apache-pulsar-client*.deb
 ```
 
-The `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.
-
-### Install RPM
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. Download an RPM package from the links in the table. 
+### RPM
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
+1. Download any one of the RPM packages:
 
-2. Install the package using the following command.
+<Tabs>
+<TabItem value="client">
 
 ```bash
-rpm -ivh apache-pulsar-client*.rpm
+wget @pulsar:dist_rpm:client@
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-:::note
-
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
-
-:::
-
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
+</TabItem>
+<TabItem value="client-devel">
 
 ```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+</TabItem>
+</Tabs>
 
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
-```
-
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
-
-To build the C++ library packages, you need to build the Java packages first.
-
-```shell
-mvn install -DskipTests
-```
-
-#### RPM
-
-To build the RPM inside a Docker container, use the command below. The RPMs are in the `pulsar-client-cpp/pkg/rpm/RPMS/x86_64/` path.
-
-```shell
-pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
-```
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |

Review Comment:
   See https://github.com/apache/pulsar/pull/17580#discussion_r967677766.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] shibd commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
shibd commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r971465658


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
+Install the latest tagged version with the library and headers:
 
-2. Install all 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
-```
-
-3. 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
-```
-
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+brew install libpulsar
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
+### Deb
 
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+1. Download any one of the Deb packages:
 
-These libraries rely on some other libraries. If you want to get a 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.
-
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
+wget @pulsar:deb:client@
 ```
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:deb:client-devel@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
-
-```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
-```
+</TabItem>
+</Tabs>
 
-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`. You can use this Pulsar library with the command below.
+2. Install the package using the following command:
 
 ```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
+apt install ./apache-pulsar-client*.deb
 ```
 
-The `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.
-
-### Install RPM
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. Download an RPM package from the links in the table. 
+### RPM
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
+1. Download any one of the RPM packages:
 
-2. Install the package using the following command.
+<Tabs>
+<TabItem value="client">
 

Review Comment:
   This package can be explained here. Refer: https://github.com/apache/pulsar/pull/17580#discussion_r971456416
   
   ![image](https://user-images.githubusercontent.com/33416836/190299929-4f65c574-62a1-4c16-b0f7-f75f990dc6b2.png)
   



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Demogorgon314 commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
Demogorgon314 commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r971490356


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew

Review Comment:
   Should we add a link to `https://brew.sh/` so we can remind users to install brew in macOS?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] BewareMyPower commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r971515787


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
+Install the latest tagged version with the library and headers:
 
-2. Install all 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
-```
-
-3. 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
-```
-
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+brew install libpulsar
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
+### Deb
 
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+1. Download any one of the Deb packages:
 
-These libraries rely on some other libraries. If you want to get a 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.
-
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
+wget @pulsar:deb:client@
 ```
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:deb:client-devel@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
-
-```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
-```
+</TabItem>
+</Tabs>
 
-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`. You can use this Pulsar library with the command below.
+2. Install the package using the following command:
 
 ```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
+apt install ./apache-pulsar-client*.deb
 ```
 
-The `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.
-
-### Install RPM
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. Download an RPM package from the links in the table. 
+### RPM
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
+1. Download any one of the RPM packages:
 
-2. Install the package using the following command.
+<Tabs>
+<TabItem value="client">
 
 ```bash
-rpm -ivh apache-pulsar-client*.rpm
+wget @pulsar:dist_rpm:client@
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-:::note
-
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
-
-:::
-
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
+</TabItem>
+<TabItem value="client-devel">
 
 ```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+</TabItem>
+</Tabs>
 
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
-```
-
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
-
-To build the C++ library packages, you need to build the Java packages first.
-
-```shell
-mvn install -DskipTests
-```
-
-#### RPM
-
-To build the RPM inside a Docker container, use the command below. The RPMs are in the `pulsar-client-cpp/pkg/rpm/RPMS/x86_64/` path.
-
-```shell
-pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
-```
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |

Review Comment:
   But just as tison said, it's not a regression, we can explain it in another PR.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Demogorgon314 merged pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
Demogorgon314 merged PR #17580:
URL: https://github.com/apache/pulsar/pull/17580


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r967677766


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,192 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
+</TabItem>
+</Tabs>
 
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+2. Install the package using the following command:
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+```bash
+apt install ./apache-pulsar-client*.deb
+```
 
-These libraries rely on some other libraries. If you want to get a 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.
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+### RPM
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
+1. Download any one of the RPM packages:
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
+</TabItem>
+</Tabs>
 
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get the error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
-
-```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
-```
-
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+### Source
 
-2. Install the package using the following command.
+1. Clone the Pulsar repository and switch to the working directory `pulsar-client-cpp`:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
+git clone https://github.com/apache/pulsar
+cd pulsar
+cd pulsar-client-cpp
 ```
 
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.

Review Comment:
   We don't really want it to show in the user-facing documentation. It can be now hosted in `pulsar-client-cpp/README.md` or somewhere in the codebase and later part of developer guide.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r967855504


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,192 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
+</TabItem>
+</Tabs>
 
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+2. Install the package using the following command:
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+```bash
+apt install ./apache-pulsar-client*.deb
+```
 
-These libraries rely on some other libraries. If you want to get a 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.
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+### RPM
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
+1. Download any one of the RPM packages:
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
+</TabItem>
+</Tabs>
 
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get the error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
-
-```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
-```
-
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+### Source
 
-2. Install the package using the following command.
+1. Clone the Pulsar repository and switch to the working directory `pulsar-client-cpp`:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
+git clone https://github.com/apache/pulsar
+cd pulsar
+cd pulsar-client-cpp
 ```
 
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.

Review Comment:
   I think the latest version is now included at https://github.com/apache/pulsar/blob/master/wiki/release/release-process.md#31-build-rpm-and-deb-packages.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Anonymitaet commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r969049577


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,191 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
+</TabItem>
+</Tabs>
 
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+2. Install the package using the following command:
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+```bash
+apt install ./apache-pulsar-client*.deb
+```
 
-These libraries rely on some other libraries. If you want to get a 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.
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+### RPM
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
+1. Download any one of the RPM packages:
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
+</TabItem>
+</Tabs>
 
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get the error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting Pulsar client, you need to run `ldconfig` first.

Review Comment:
   ```suggestion
   If you get an error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting a Pulsar client, you need to run `ldconfig` first.
   ```



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] BewareMyPower commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r969635764


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,192 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
+</TabItem>
+</Tabs>
 
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+2. Install the package using the following command:
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+```bash
+apt install ./apache-pulsar-client*.deb
+```
 
-These libraries rely on some other libraries. If you want to get a 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.
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+### RPM
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
+1. Download any one of the RPM packages:
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
+</TabItem>
+</Tabs>
 
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get the error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
-
-```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
-```
-
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+### Source
 
-2. Install the package using the following command.
+1. Clone the Pulsar repository and switch to the working directory `pulsar-client-cpp`:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
+git clone https://github.com/apache/pulsar
+cd pulsar
+cd pulsar-client-cpp
 ```
 
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.

Review Comment:
   I agree.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] shibd commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
shibd commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r971456416


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
+Install the latest tagged version with the library and headers:
 
-2. Install all 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
-```
-
-3. 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
-```
-
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+brew install libpulsar
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
+### Deb
 
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+1. Download any one of the Deb packages:
 
-These libraries rely on some other libraries. If you want to get a 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.
-
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
+wget @pulsar:deb:client@
 ```
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:deb:client-devel@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
-
-```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
-```
+</TabItem>
+</Tabs>
 
-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`. You can use this Pulsar library with the command below.
+2. Install the package using the following command:
 
 ```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
+apt install ./apache-pulsar-client*.deb
 ```
 
-The `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.
-
-### Install RPM
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. Download an RPM package from the links in the table. 
+### RPM
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
+1. Download any one of the RPM packages:
 
-2. Install the package using the following command.
+<Tabs>
+<TabItem value="client">
 
 ```bash
-rpm -ivh apache-pulsar-client*.rpm
+wget @pulsar:dist_rpm:client@
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-:::note
-
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
-
-:::
-
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
+</TabItem>
+<TabItem value="client-devel">
 
 ```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+</TabItem>
+</Tabs>
 
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
-```
-
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
-
-To build the C++ library packages, you need to build the Java packages first.
-
-```shell
-mvn install -DskipTests
-```
-
-#### RPM
-
-To build the RPM inside a Docker container, use the command below. The RPMs are in the `pulsar-client-cpp/pkg/rpm/RPMS/x86_64/` path.
-
-```shell
-pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
-```
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |

Review Comment:
   Why remove this table? This table explains the differences between the individual packages.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] BewareMyPower commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r971514037


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,173 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
+Install the latest tagged version with the library and headers:
 
-:::
-
-### Compilation
+```bash
+brew install libpulsar
+```
 
-#### System requirements
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-You need to install the following components before using the C++ client:
+### Deb
 
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
+1. Download any one of the Deb packages:
 
-1. Clone the Pulsar repository.
+<Tabs>
+<TabItem value="client">
 
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+wget @pulsar:deb:client@

Review Comment:
   I think we'd better add it to the guide for document contributors. Though it's not a job of this PR.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] BewareMyPower commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r971514037


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,173 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
+Install the latest tagged version with the library and headers:
 
-:::
-
-### Compilation
+```bash
+brew install libpulsar
+```
 
-#### System requirements
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-You need to install the following components before using the C++ client:
+### Deb
 
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
+1. Download any one of the Deb packages:
 
-1. Clone the Pulsar repository.
+<Tabs>
+<TabItem value="client">
 
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+wget @pulsar:deb:client@

Review Comment:
   I think we'd better add it to the guide for document contributors.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#issuecomment-1248292710

   @BewareMyPower @Demogorgon314 It seems we reached a consensus here. Could you help with merging this PR?


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] shibd commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
shibd commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r971461087


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
+Install the latest tagged version with the library and headers:
 
-2. Install all 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
-```
-
-3. 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
-```
-
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+brew install libpulsar
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
+### Deb
 
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+1. Download any one of the Deb packages:
 
-These libraries rely on some other libraries. If you want to get a 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.
-
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
+wget @pulsar:deb:client@
 ```
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:deb:client-devel@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
-
-```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
-```
+</TabItem>
+</Tabs>
 
-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`. You can use this Pulsar library with the command below.
+2. Install the package using the following command:
 
 ```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
+apt install ./apache-pulsar-client*.deb
 ```
 
-The `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.
-
-### Install RPM
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. Download an RPM package from the links in the table. 
+### RPM
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
+1. Download any one of the RPM packages:
 
-2. Install the package using the following command.
+<Tabs>
+<TabItem value="client">
 

Review Comment:
   Can explain this package here.  Refer: https://github.com/apache/pulsar/pull/17580/files#r971456416



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] merlimat commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
merlimat commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r968781694


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,192 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
+</TabItem>
+</Tabs>
 
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+2. Install the package using the following command:
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+```bash
+apt install ./apache-pulsar-client*.deb
+```
 
-These libraries rely on some other libraries. If you want to get a 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.
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+### RPM
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
+1. Download any one of the RPM packages:
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
+</TabItem>
+</Tabs>
 
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get the error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
-
-```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
-```
-
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+### Source
 
-2. Install the package using the following command.
+1. Clone the Pulsar repository and switch to the working directory `pulsar-client-cpp`:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
+git clone https://github.com/apache/pulsar
+cd pulsar
+cd pulsar-client-cpp
 ```
 
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
+2. Install dependencies:
 
-To build the C++ library packages, you need to build the Java packages first.
+<Tabs>
+<TabItem value="Linux">
 
-```shell
-mvn install -DskipTests
-```
+```bash
+apt install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev libjsoncpp-dev
 
-#### RPM
+# libgtest-dev version is 1.18.0 or above

Review Comment:
   We can use `-DBUILD_TESTS=OFF` to disable that



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] PragmaTwice commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
PragmaTwice commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r967856949


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,192 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
+</TabItem>
+</Tabs>
 
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+2. Install the package using the following command:
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+```bash
+apt install ./apache-pulsar-client*.deb
+```
 
-These libraries rely on some other libraries. If you want to get a 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.
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+### RPM
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
+1. Download any one of the RPM packages:
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
+</TabItem>
+</Tabs>
 
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get the error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
-
-```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
-```
-
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+### Source
 
-2. Install the package using the following command.
+1. Clone the Pulsar repository and switch to the working directory `pulsar-client-cpp`:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
+git clone https://github.com/apache/pulsar
+cd pulsar
+cd pulsar-client-cpp
 ```
 
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
+2. Install dependencies:
 
-To build the C++ library packages, you need to build the Java packages first.
+<Tabs>
+<TabItem value="Linux">
 
-```shell
-mvn install -DskipTests
-```
+```bash
+apt install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev libjsoncpp-dev
 
-#### RPM
+# libgtest-dev version is 1.18.0 or above

Review Comment:
   Do users of this c++ client need gtest? Or only developers of the c++ client itself need it?



##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,192 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
+</TabItem>
+</Tabs>
 
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+2. Install the package using the following command:
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+```bash
+apt install ./apache-pulsar-client*.deb
+```
 
-These libraries rely on some other libraries. If you want to get a 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.
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+### RPM
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
+1. Download any one of the RPM packages:
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
+</TabItem>
+</Tabs>
 
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get the error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
-
-```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
-```
-
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+### Source
 
-2. Install the package using the following command.
+1. Clone the Pulsar repository and switch to the working directory `pulsar-client-cpp`:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
+git clone https://github.com/apache/pulsar
+cd pulsar
+cd pulsar-client-cpp
 ```
 
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
+2. Install dependencies:
 
-To build the C++ library packages, you need to build the Java packages first.
+<Tabs>
+<TabItem value="Linux">
 
-```shell
-mvn install -DskipTests
-```
+```bash
+apt install cmake libssl-dev libcurl4-openssl-dev liblog4cxx-dev libprotobuf-dev protobuf-compiler libboost-all-dev google-mock libgtest-dev libjsoncpp-dev
 
-#### RPM
+# libgtest-dev version is 1.18.0 or above

Review Comment:
   Do users of this c++ client need gtest? Or only developers of the c++ client need it?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r967677766


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,192 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+### Brew
 
-## Linux
+Install the latest tagged version with the library and headers:
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+brew install libpulsar
 ```
 
-2. Install all necessary dependencies.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-```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
-```
-
-3. Compile and install [Google Test](https://github.com/google/googletest).
+### Deb
 
-```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/
+1. Download any one of the Deb packages:
 
-# less than 1.18.0
-cd /usr/src/gtest
-sudo cmake .
-sudo make
-sudo cp libgtest.a /usr/lib
+<Tabs>
+<TabItem value="client">
 
-cd /usr/src/gmock
-sudo cmake .
-sudo make
-sudo cp libgmock.a /usr/lib
+```bash
+wget @pulsar:deb:client@
 ```
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+</TabItem>
+<TabItem value="client-devel">
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
+</TabItem>
+</Tabs>
 
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+2. Install the package using the following command:
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+```bash
+apt install ./apache-pulsar-client*.deb
+```
 
-These libraries rely on some other libraries. If you want to get a 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.
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+### RPM
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
+1. Download any one of the RPM packages:
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
+</TabItem>
+</Tabs>
 
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get the error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
-
-```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
-```
-
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+### Source
 
-2. Install the package using the following command.
+1. Clone the Pulsar repository and switch to the working directory `pulsar-client-cpp`:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
+git clone https://github.com/apache/pulsar
+cd pulsar
+cd pulsar-client-cpp
 ```
 
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.

Review Comment:
   We don't really want it to be shown in the user-facing documentation. It can be now hosted in `pulsar-client-cpp/README.md` or somewhere in the codebase and later part of developer guide.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r970236122


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,173 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
+Install the latest tagged version with the library and headers:
 
-:::
-
-### Compilation
+```bash
+brew install libpulsar
+```
 
-#### System requirements
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-You need to install the following components before using the C++ client:
+### Deb
 
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
+1. Download any one of the Deb packages:
 
-1. Clone the Pulsar repository.
+<Tabs>
+<TabItem value="client">
 
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+wget @pulsar:deb:client@
 ```
 
-2. Install all necessary dependencies.
+</TabItem>
+<TabItem value="client-devel">
 
-```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
+```bash
+wget @pulsar:deb:client-devel@
 ```
 
-3. 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
-```
+</TabItem>
+</Tabs>
 
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
+2. Install the package using the following command:
 
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+apt install ./apache-pulsar-client*.deb
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
-
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
-
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-These libraries rely on some other libraries. If you want to get a 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.
+### RPM
 
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+1. Download any one of the RPM packages:
 
-```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
-```
-
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```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
+wget @pulsar:dist_rpm:client@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```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
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-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`. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-The `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.
-
-### Install RPM
-
-1. Download an RPM package from the links in the table. 
+</TabItem>
+</Tabs>
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
-
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
 rpm -ivh apache-pulsar-client*.rpm
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
-
-```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
+If you get an error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting a Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
-
-```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
-```
-
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+### Source
 
-2. Install the package using the following command.
+1. Clone the Pulsar repository and switch to the working directory `pulsar-client-cpp`:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
-```
-
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
-
-To build the C++ library packages, you need to build the Java packages first.
-
-```shell
-mvn install -DskipTests
+git clone https://github.com/apache/pulsar
+cd pulsar
+cd pulsar-client-cpp
 ```
 
-#### RPM
+2. Install dependencies:
 
-To build the RPM inside a Docker container, use the command below. The RPMs are in the `pulsar-client-cpp/pkg/rpm/RPMS/x86_64/` path.
+<Tabs>
+<TabItem value="Linux">

Review Comment:
   It's possible but I think the generate way is:
   
   ```
   # Debian
   ...
   # Centos
   ...
   ```
   
   Since we'd like to link the build from source section to the code repo. I omit this suggestion.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r969754656


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,173 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
+Install the latest tagged version with the library and headers:
 
-:::
-
-### Compilation
+```bash
+brew install libpulsar
+```
 
-#### System requirements
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-You need to install the following components before using the C++ client:
+### Deb
 
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
+1. Download any one of the Deb packages:
 
-1. Clone the Pulsar repository.
+<Tabs>
+<TabItem value="client">
 
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+wget @pulsar:deb:client@

Review Comment:
   And I agree that we should later refactor the website repo setting and provide better preview experience..



##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,173 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
+Install the latest tagged version with the library and headers:
 
-:::
-
-### Compilation
+```bash
+brew install libpulsar
+```
 
-#### System requirements
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-You need to install the following components before using the C++ client:
+### Deb
 
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
+1. Download any one of the Deb packages:
 
-1. Clone the Pulsar repository.
+<Tabs>
+<TabItem value="client">
 
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+wget @pulsar:deb:client@

Review Comment:
   And I agree that we should later refactor(simplify) the website repo setting and provide better preview experience..



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r969753646


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,173 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
+Install the latest tagged version with the library and headers:
 
-:::
-
-### Compilation
+```bash
+brew install libpulsar
+```
 
-#### System requirements
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-You need to install the following components before using the C++ client:
+### Deb
 
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
+1. Download any one of the Deb packages:
 
-1. Clone the Pulsar repository.
+<Tabs>
+<TabItem value="client">
 
-```shell
-git clone https://github.com/apache/pulsar
+```bash
+wget @pulsar:deb:client@

Review Comment:
   It will be replaced with link like `https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=pulsar/pulsar-2.10.1/DEB/apache-pulsar-client.deb` according to the real version - since our document are versioned.
   
   The actual resolving and replacing logic is somewhere within https://github.com/apache/pulsar-site. I suggest @urfreespace or @tuteng can give some inputs here. I'm confident that this URL is the correct one.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on a diff in pull request #17580: [improve][doc] Simplify the Install section and promote a top-level "Installation" title

Posted by GitBox <gi...@apache.org>.
tisonkun commented on code in PR #17580:
URL: https://github.com/apache/pulsar/pull/17580#discussion_r970422766


##########
site2/docs/client-libraries-cpp.md:
##########
@@ -4,298 +4,103 @@ title: Pulsar C++ client
 sidebar_label: "C++"
 ---
 
-You can use Pulsar C++ client to create Pulsar producers and consumers in C++.
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
 
-All the methods in producer, consumer, and reader of a C++ client are thread-safe.
+You can use a Pulsar C++ client to create producers, consumers, and readers.
 
-## Supported platforms
+All the methods in producer, consumer, and reader of a C++ client are thread-safe. You can read the Doxygen-generated [API docs](/api/cpp) for the C++ client
 
-Pulsar C++ client is supported on **Linux**, **macOS** and **Windows** platforms.
+## Installation
 
-Doxygen-generated API docs for the C++ client are available [here](/api/cpp).
+Use one of the following methods to install a Pulsar C++ client.
 
-## Linux
+### Brew
 
-:::note
-
-You can choose one of the following installation methods based on your needs: Compilation, Install RPM or Install Debian.
-
-:::
-
-### Compilation
-
-#### System requirements
-
-You need to install the following components before using the C++ client:
-
-* [CMake](https://cmake.org/)
-* [Boost](http://www.boost.org/)
-* [Protocol Buffers](https://developers.google.com/protocol-buffers/) >= 3
-* [libcurl](https://curl.se/libcurl/)
-* [Google Test](https://github.com/google/googletest)
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
+Install the latest tagged version with the library and headers:
 
-2. Install all 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
-```
-
-3. 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
-```
-
-4. Compile the Pulsar client library for C++ inside the Pulsar repository.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
+```bash
+brew install libpulsar
 ```
 
-After you install the components successfully, the files `libpulsar.so` and `libpulsar.a` are in the `lib` folder of the repository. The tools `perfProducer` and `perfConsumer` are 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.
-
-After you download and install RPM or DEB, the `libpulsar.so`, `libpulsarnossl.so`, `libpulsar.a`, and `libpulsarwithdeps.a` libraries are in your `/usr/lib` directory.
+For more information, read [libpulsar formula's homepage](https://formulae.brew.sh/formula/libpulsar).
 
-By default, they are built-in code path `${PULSAR_HOME}/pulsar-client-cpp`. You can build with the command below.
+### Deb
 
- ```bash
- cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON && make pulsarShared pulsarSharedNossl pulsarStatic pulsarStaticWithDeps -j 3
- ```
+1. Download any one of the Deb packages:
 
-These libraries rely on some other libraries. If you want to get a 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.
-
-1. `libpulsar.so` is a shared library, containing statically linked `boost` and `openssl`. It also dynamically links all other necessary libraries. You can use this Pulsar library with the command below.
+<Tabs>
+<TabItem value="client">
 
 ```bash
- g++ --std=c++11  PulsarTest.cpp -o test /usr/lib/libpulsar.so -I/usr/local/ssl/include
+wget @pulsar:deb:client@
 ```
 
-2. `libpulsarnossl.so` is a shared library, similar to `libpulsar.so` except that the libraries `openssl` and `crypto` are dynamically linked. You can use this Pulsar library with the command below.
+</TabItem>
+<TabItem value="client-devel">
 
 ```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
+wget @pulsar:deb:client-devel@
 ```
 
-3. `libpulsar.a` is a static library. You need to load dependencies before using this library. You can use this Pulsar library with the command below.
-
-```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
-```
+</TabItem>
+</Tabs>
 
-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`. You can use this Pulsar library with the command below.
+2. Install the package using the following command:
 
 ```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
+apt install ./apache-pulsar-client*.deb
 ```
 
-The `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.
-
-### Install RPM
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
-1. Download an RPM package from the links in the table. 
+### RPM
 
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:dist_rpm:client@) | [asc](@pulsar:dist_rpm:client@.asc), [sha512](@pulsar:dist_rpm:client@.sha512) |
-| [client-debuginfo](@pulsar:dist_rpm:client-debuginfo@) | [asc](@pulsar:dist_rpm:client-debuginfo@.asc),  [sha512](@pulsar:dist_rpm:client-debuginfo@.sha512) |
-| [client-devel](@pulsar:dist_rpm:client-devel@) | [asc](@pulsar:dist_rpm:client-devel@.asc),  [sha512](@pulsar:dist_rpm:client-devel@.sha512) |
+1. Download any one of the RPM packages:
 
-2. Install the package using the following command.
+<Tabs>
+<TabItem value="client">
 
 ```bash
-rpm -ivh apache-pulsar-client*.rpm
+wget @pulsar:dist_rpm:client@
 ```
 
-After you install RPM successfully, Pulsar libraries are in the `/usr/lib` directory, for example:
+</TabItem>
+<TabItem value="client-debuginfo">
 
 ```bash
-lrwxrwxrwx 1 root root 18 Dec 30 22:21 libpulsar.so -> libpulsar.so.2.9.1
-lrwxrwxrwx 1 root root 23 Dec 30 22:21 libpulsarnossl.so -> libpulsarnossl.so.2.9.1
+wget @pulsar:dist_rpm:client-debuginfo@
 ```
 
-:::note
-
-If you get the error that `libpulsar.so: cannot open shared object file: No such file or directory` when starting Pulsar client, you may need to run `ldconfig` first.
-
-:::
-
-2. Install the GCC and g++ using the following command, otherwise errors would occur in installing Node.js.
+</TabItem>
+<TabItem value="client-devel">
 
 ```bash
-sudo yum -y install gcc automake autoconf libtool make
-sudo yum -y install gcc-c++
+wget @pulsar:dist_rpm:client-devel@
 ```
 
-### Install Debian
-
-1. Download a Debian package from the links in the table.
-
-| Link | Crypto files |
-|------|--------------|
-| [client](@pulsar:deb:client@) | [asc](@pulsar:dist_deb:client@.asc), [sha512](@pulsar:dist_deb:client@.sha512) |
-| [client-devel](@pulsar:deb:client-devel@) | [asc](@pulsar:dist_deb:client-devel@.asc),  [sha512](@pulsar:dist_deb:client-devel@.sha512) |
+</TabItem>
+</Tabs>
 
-2. Install the package using the following command.
+2. Install the package using the following command:
 
 ```bash
-apt install ./apache-pulsar-client*.deb
-```
-
-After you install DEB successfully, Pulsar libraries are in the `/usr/lib` directory.
-
-### Build
-
-If you want to build RPM and Debian packages from the latest master, follow the instructions below. You must run all the instructions at the root directory of your cloned Pulsar repository.
-
-There are recipes that build RPM and Debian packages containing a
-statically linked `libpulsar.so` / `libpulsarnossl.so` / `libpulsar.a` / `libpulsarwithdeps.a` with all required dependencies.
-
-To build the C++ library packages, you need to build the Java packages first.
-
-```shell
-mvn install -DskipTests
-```
-
-#### RPM
-
-To build the RPM inside a Docker container, use the command below. The RPMs are in the `pulsar-client-cpp/pkg/rpm/RPMS/x86_64/` path.
-
-```shell
-pulsar-client-cpp/pkg/rpm/docker-build-rpm.sh
-```
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |
-| pulsar-client-devel | Static library `libpulsar.a`, `libpulsarwithdeps.a`and C++ and C headers |
-| pulsar-client-debuginfo | Debug symbols for `libpulsar.so` |
-
-#### Debian
-
-To build Debian packages, enter the following command.
-
-```shell
-pulsar-client-cpp/pkg/deb/docker-build-deb.sh
-```
-
-Debian packages are created in the `pulsar-client-cpp/pkg/deb/BUILD/DEB/` path.
-
-| Package name | Content |
-|-----|-----|
-| pulsar-client | Shared library `libpulsar.so` and `libpulsarnossl.so` |
-| pulsar-client-dev | Static library `libpulsar.a`, `libpulsarwithdeps.a` and C++ and C headers |
-
-## MacOS
-
-### Compilation
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
-
-2. Install all necessary dependencies.
-
-```shell
-# OpenSSL installation
-brew install openssl
-export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include/
-export OPENSSL_ROOT_DIR=/usr/local/opt/openssl/
-
-# Protocol Buffers installation
-brew install protobuf boost boost-python log4cxx
-# If you are using python3, you need to install boost-python3 
-
-# Google Test installation
-git clone https://github.com/google/googletest.git
-cd googletest
-git checkout release-1.12.1
-cmake .
-make install
-```
-
-3. Compile the Pulsar client library in the repository that you cloned.
-
-```shell
-cd pulsar-client-cpp
-cmake .
-make
-```
-
-### Install `libpulsar`
-
-Pulsar releases are available in the [Homebrew](https://brew.sh/) core repository. You can install the C++ client library with the following command. The package is installed with the library and headers.
-
-```shell
-brew install libpulsar
-```
-
-## Windows (64-bit)
-
-### Compilation
-
-1. Clone the Pulsar repository.
-
-```shell
-git clone https://github.com/apache/pulsar
-```
-
-2. Install all necessary dependencies.
-
-```shell
-cd ${PULSAR_HOME}/pulsar-client-cpp
-vcpkg install --feature-flags=manifests --triplet x64-windows
+rpm -ivh apache-pulsar-client*.rpm
 ```
 
-3. Build C++ libraries.
-
-```shell
-cmake -B ./build -A x64 -DBUILD_PYTHON_WRAPPER=OFF -DBUILD_TESTS=OFF -DVCPKG_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=Release -S .
-cmake --build ./build --config Release
-```
+Now, you can see Pulsar C++ client libraries installed under the `/usr/lib` directory.
 
 :::note
 
-* For Windows 32-bit, you need to use `-A Win32` and `-DVCPKG_TRIPLET=x86-windows`.
-* For MSVC Debug mode, you need to replace `Release` with `Debug` for both `CMAKE_BUILD_TYPE` variable and `--config` option.
+If you get an error like "libpulsar.so: cannot open shared object file: No such file or directory" when starting a Pulsar client, you need to run `ldconfig` first.
 
 :::
 
-4. Client libraries are available in the following places.
+### Source
 
-```
-${PULSAR_HOME}/pulsar-client-cpp/build/lib/Release/pulsar.lib
-${PULSAR_HOME}/pulsar-client-cpp/build/lib/Release/pulsar.dll
-```
+If you want to build the Pulsar C++ client from source code, read [these instructions](https://github.com/apache/pulsar/tree/master/pulsar-client-cpp#compilation).

Review Comment:
   ```suggestion
   For how to build Pulsar C++ client on different platforms from source code, see [compliation](https://github.com/apache/pulsar/tree/master/pulsar-client-cpp#compilation).
   ```



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org