ChatLuck V2.0R1.1へのアップデート

ChatLuck (Linux+PostgreSQL) のChatLuck V2.0R1.1へのアップデートについての説明です。

ご注意
アップデート作業を行う前に、必ずデータのバックアップを行ってください。
(データのバックアップ方法は以下をご覧ください。)
https://www.chatluck.com/download/doc/install/ja_JP/com/pg_backup_l.html

 

本手順では、以下のインストールを行います。

・本体/スマートフォン版モジュール
・データベースの更新(※ChatLuck V1.2R1.0から更新する場合のみ)
・Node.js(※Node.jsを「v4.3.1」から「v6.9.5」へバージョンアップします)

1.各プロセスの停止

1-1. suコマンドにて、rootユーザーにスイッチしてください。

[guest@xxxxxx ~]$ su -

Password:

1-2. 以下のコマンドを実行し、リアルタイムサーバーを停止します。

[root@xxxxxx ~]# service chatluck stop

chatluck-rserver を停止中:          [ OK ]

"chatluck-rserver を停止中: [ OK ]"のように表示されれば停止されています。

1-3. 以下のコマンドを実行し、Redisサーバーを停止します。

[root@xxxxxx ~]# service redis stop

Stopping ...

Redis stopped

"Redis stopped"のように表示されれば停止されています。

1-4. 以下のコマンドを実行し、スケジューラーを停止します。

[root@xxxxxx ~]# pkill -9 chatBatScheduler

 

2.パッケージの展開

ここでは、ダウンロードしたファイルをFTPにて、"guest"ユーザーのホームディレクトリに転送済みとし、/tmpディレクトリを作業用ディレクトリとして使用する前提で説明します。
引き続き、"root"ユーザーで作業を行います。

2-1. /tmpディレクトリに、前回インストール時のファイルが残っている場合は削除します。

[root@xxxxxx ~]# cd /tmp

[root@xxxxxx tmp]# rm -rf cgi-bin htdocs

 

2-2. 次に、/tmpディレクトリにパッケージを展開します。

[root@xxxxxx tmp]# tar zxvf /home/guest/chatluck-xxxxxx-V20R11pg93lRE6.tar.gz

展開が完了すると、tmpディレクトリ下に「cgi-bin」、「htdocs」ディレクトリが作成されます。

2-3.展開された「cgi-bin」、「htdocs」ディレクトリのオーナーをApacheのサービス実行ユーザーに変更します。

[root@xxxxxx tmp]# chown -R apache:apache cgi-bin htdocs

 

3.古いファイルの削除

引き続き、"root"ユーザーで作業を行います。

3-1. ChatLuck本体のインストール先から、不要なファイルを削除します。

[root@xxxxxx tmp]# pushd /var/www/cgi-bin/chatlk/rserver/node_modules

[root@xxxxxx node_modules]# rm -rf apn pg socket.io socket.io-redis sticky-session sticky-socket-cluster

[root@xxxxxx node_modules]# popd

 

4.SQLの適用

4-1.展開されたディレクトリ内に「sqlupd」がある場合は、postgresユーザーにスイッチ後、以下の手順にてSQLの適用を実施してください。

※V2.0R1.0からの更新では、「sqlupd」ディレクトリはありません。

[root@xxxxxx tmp]# su - postgres

[postgres@xxxxxx ~]$ cd /tmp/cgi-bin/chatlk/sqlupd

[postgres@xxxxxx sqlupd]$ ./install.sh chatlk localhost chatlkdb

コマンドパラメータは以下の通りとなります。
./install.sh chatlk localhost chatlkdb
       ①    ②    ③

chatlk・・・PostgreSQL上のChatLuck用のロール名
localhost・・・PostgreSQL DBサーバーが動作しているサーバーのホスト名
chatlkdb・・・ChatLuckのDB名

4-2.コマンドが正常に終了したら、exitコマンドにて、rootユーザーに戻してください。

[postgres@xxxxxx sqlupd]$ exit

[root@xxxxxx ~]# cd /tmp

 

5.パッケージの上書き

5-1.展開されたディレクトリ内に静的コンテンツを、WebサーバーのドキュメントルートにあるChatLuckのイメージディレクトリに上書きコピーします。

[root@xxxxxx tmp]# cp -rp htdocs/chatres /var/www/html/.

[root@xxxxxx tmp]# cp -rp htdocs/chatsares /var/www/html/.

5-2.展開された「chatlk」「chatlksa」ディレクトリ内のファイルとディレクトリを、ChatLuck本体のインストール先に上書きコピーします。

[root@xxxxxx tmp]# cp -rp cgi-bin/chatlk /var/www/cgi-bin/.

[root@xxxxxx tmp]# cp -rp cgi-bin/chatlksa /var/www/cgi-bin/.

 

5-3.不要ファイルの削除を行います。

[root@xxxxxx tmp]# rm -rf cgi-bin htdocs

 

6.リアルタイムサーバーの起動

6-1.Node.jsの更新を行います。

Node.jsの更新方法は、以下をご覧ください。
https://www.chatluck.com/download/doc/install/ja_JP/Linux/linuxpg_node.html

※ChatLuck V2.0にてご利用できるNode.jsのバージョンは「v6.9.5」となります。以下のパッケージをダウンロードしてご利用ください。
https://www.chatluck.com/download/binary/linuxpg93/node-v6.9.5-linux-x64.tar.gz

 

6-2. 以下のコマンドを実行し、Redisサーバーを起動します。

[root@xxxxxx ~]# service redis start

Starting Redis server...

"Starting Redis server..."のように表示されれば起動しています。

6-3. 以下のコマンドを実行し、リアルタイムサーバーを起動します。

[root@xxxxxx ~]# service chatluck start

Starting chatluck-rserver:

"Starting chatluck-rserver:"のように表示されれば、リアルタイムサーバーの起動は完了です。

 

以上でChatLuck (Linux+PostgreSQL版) のアップデートは完了です。

 

記載の製品名および商品名は、各社の商標、または登録商標です。