1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Apache Zookeeper のインストール

Posted at

やってみたのでメモ

前提

CentOS7
Java インストール済み

手順

  1. tar ファイルをダウンロードする

    # curl -LkvOf https://downloads.apache.org/zookeeper/zookeeper-3.6.0/apache-zookeeper-3.6.0-bin.tar.gz
    
  2. tar ファイルを展開する

    # tar zxf apache-zookeeper-3.6.0-bin.tar.gz
    
  3. /opt配下に配置する

    # mv apache-zookeeper-3.6.0-bin /opt/zookeeper
    
  4. 実行用ユーザを作成する

    # useradd zookeeper
    
  5. 必要に応じてzoo.cfgファイルを作成して設定を変更する(IPアドレスなど)

  6. 所有者を変更する

    # chown -R zookeeper:zookeeper /opt/zookeeper
    
  7. サービスファイルを作成する

    # vi /etc/systemd/system/zookeeper.service
    
    [Unit]
    Description=Apache Zookeeper Service
    
    [Service]
    Type=forking
    User=zookeeper
    ExecStart=/opt/zookeeper/bin/zkServer.sh start
    ExecStop=/opt/zookeeper/bin/zkServer.sh stop
    
    [Install]
    WantedBy=multi-user.target
    
  8. 再読み込みする

    # systemctl daemon-reload
    
  9. 起動する

    # systemctl start zookeeper
    

参考

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?