4
5

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 5 years have passed since last update.

Rocket.Chat のインストール

Last updated at Posted at 2018-05-18

CentOS 7系にインストールしたメモ

手順

インストール

  1. epelリポジトリの追加

    # yum -y install epel-release && yum -y update
    
  2. mongodbリポジトリの追加

    # vi /etc/yum.repos.d/mongodb-org-3.6.repo
    
    mongodb-org-3.6.repo
    [mongodb-org-3.6]
    name=MongoDB Repository
    baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/x86_64/
    gpgcheck=1
    enabled=1
    gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc
    
  3. 必要なパッケージをインストールする

    # yum install -y curl GraphicsMagick mongodb-org-server mongodb-org gcc-c++
    
  4. node.jsのインストール

    node.js 8.9.3 が推奨とのことなので、tarファイルからビルド

    # curl -LkvOf https://nodejs.org/download/release/v8.9.3/node-v8.9.3-linux-x64.tar.gz
    # tar --strip-components 1 -xzvf node-v8.9.3-linux-x64.tar.gz -C /usr
    
  5. npmパッケージのインストール

    # npm install -g inherits n
    
  6. Rocket.Chatのダウンロード

    # cd /opt
    # curl -L https://releases.rocket.chat/latest/download -o rocket.chat.tar.gz
    
  7. ファイルを展開する

    # tar zxvf rocket.chat.tar.gz
    # mv bundle Rocket.Chat
    
  8. npmインストールを実行する

    # cd Rocket.Chat/programs/server
    # npm install
    # cd ../..
    
  9. .bash_profileに設定を加える

    # vi ~/.bash_profile
    
    .bash_profile
    export PORT=3000
    export ROOT_URL=http://<IPアドレスもしくはホスト名>:3000/
    export MONGO_URL=mongodb://localhost:27017/rocketchat
    
  10. mongoDBを起動する

    # systemctl start mongod
    
  11. Rocket.Chatを起動する

    # node main.js
    

サービスの自動起動設定

  1. サービスファイルを登録する

    # vi /usr/lib/systemd/system/rocketchat.service
    
    rocketchat.service
    [Unit]
    Description=The Rocket.Chat server
    After=network.target remote-fs.target nss-lookup.target nginx.target mongod.target
    
    [Service]
    ExecStart=/bin/node /opt/Rocket.Chat/main.js
    StandardOutput=syslog
    StandardError=syslog
    SyslogIdentifier=rocketchat
    User=root
    Environment=MONGO_URL=mongodb://localhost:27017/rocketchat ROOT_URL=http://<IPアドレスもしくはホスト名>:3000/ PORT=3000
    
    [Install]
    WantedBy=multi-user.target
    
  2. サービスの自動起動を設定する

    # systemctl enable rocketchat.service
    
  3. Rocket.Chatをsystemdで起動する

    # systemctl start rocketchat.service
    

管理者ユーザの登録

  1. 「新しいアカウントを登録」をクリック
    RocketChatログイン画面.png

  2. 以下の情報で登録

    項目名 設定値
    名前 <任意の名前>
    メール <任意のメールアドレス>
    パスワード <任意のパスワード>
  3. 「新しいアカウントを登録」をクリック

  4. ユーザ名を設定し、「ユーザ名を使用」をクリック

  5. ログイン成功
    RocketChatログイン後の画面.png

参考

4
5
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
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?