Yang, Tong 6182f91ba8 MRS component operation guide_normal 2.0.38.SP20 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2022-12-09 14:55:21 +00:00

21 lines
2.8 KiB
HTML

<a name="mrs_01_2095"></a><a name="mrs_01_2095"></a>
<h1 class="topictitle1">Using a ZooKeeper Client</h1>
<div id="body1595905684800"><div class="section" id="mrs_01_2095__sd9673bb5e910487b86af5d272ea0ee98"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_2095__a683ae23d443540178833e6fe62bf096d">Use a ZooKeeper client in an O&amp;M scenario or service scenario. </p>
</div>
<div class="section" id="mrs_01_2095__s1a80bfe4d3c544c6968c16c8c4119857"><h4 class="sectiontitle">Prerequisites</h4><p id="mrs_01_2095__p11320152713457">You have installed the client. For example, the installation directory is <strong id="mrs_01_2095__b25581144210">/opt/</strong><strong id="mrs_01_2095__b105581149217"></strong><strong id="mrs_01_2095__b555818141227">client</strong>. The client directory in the following operations is only an example. Change it based on the actual installation directory onsite.</p>
</div>
<div class="section" id="mrs_01_2095__sb969c89387d141e38ff856a78534a09a"><h4 class="sectiontitle">Procedure</h4><ol id="mrs_01_2095__oce3559a22ff247f29e3373adbfa425bc"><li id="mrs_01_2095__lf2e987413a454bcc9c9e4c544da889a0"><span>Log in to the node where the client is installed as the client installation user.</span></li><li id="mrs_01_2095__lc377607eedfc4cf89be8ce2c2c511eb0"><span>Run the following command to go to the client installation directory:</span><p><p id="mrs_01_2095__a9bb53c7cbfd14550a1bca8ad7829552d"><strong id="mrs_01_2095__a5dc5c2779c71418abdee1fc239cee148">cd /opt/client</strong></p>
</p></li><li id="mrs_01_2095__ldb2e0ff5e435424aa28231b010860ea7"><span>Run the following command to configure environment variables:</span><p><p id="mrs_01_2095__ab36ede4eb7b941c381a78d0830cefe62"><strong id="mrs_01_2095__a50c9b4b15f32467ba0b879e997ae3e3f">source bigdata_env</strong></p>
</p></li><li id="mrs_01_2095__lb7b78631190d431bb9124e538d99239d"><span>Run the following command to authenticate the user: (skip this step in common mode):</span><p><p id="mrs_01_2095__adc496f5342874ca0ae16cf18f0af9175"><strong id="mrs_01_2095__a9867041d3ed84cd087d23e40270cf27f">kinit</strong> <em id="mrs_01_2095__ae42b9f989f274680ab12e38925b3bbff">Component service user</em></p>
</p></li><li id="mrs_01_2095__lbd4b27972df14c2db36aeeaf07cd3ff4"><span>Run the following command to log in to the client tool:</span><p><p id="mrs_01_2095__afa3e561ebefc46b497d56e49438813cd"><strong id="mrs_01_2095__b172532693441457">zkCli.sh -server</strong> <em id="mrs_01_2095__i180684387141457">service IP address of the node where the ZooKeeper role instance locates</em><strong id="mrs_01_2095__b182216675041457">:</strong><em id="mrs_01_2095__i205843126941457">client port</em></p>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_2092.html">Using ZooKeeper</a></div>
</div>
</div>