ChatLuckの更新

ChatLuck (Linux+PostgreSQL) のChatLuck V6.6R2.0への更新についての説明です。

ここではChatLuck V6.6R2.0への更新について説明します。

ご注意

・ここではPostgreSQL 16の稼働ポートが"5432"であることを前提に説明します。ご利用になる環境によって稼働ポートを適宜変更してください。

1. 各プロセスの停止

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

[root@xxxxxx ~]# systemctl stop chatluckws chatluck-rserver を停止中:          [ OK ] [root@xxxxxx ~]#

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

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

[root@xxxxxx ~]# pkill -9 -f chatBatScheduler [root@xxxxxx ~]#

 

2. パッケージの展開

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

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

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

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

[root@xxxxxx tmp]# tar zxf /home/guest/chatluckupdate_6.6.2.0_pg16_linux_x64.tar.gz [root@xxxxxx tmp]#

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

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

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

2-4. データベース更新スクリプトのディレクトリのオーナーをpostgresユーザーに変更します。

[root@xxxxxx tmp]# chown -R postgres:postgres cgi-bin/chatlk/sqlupd [root@xxxxxx tmp]#

 

3. SQLの適用

3-1. postgresユーザーにスイッチ後、以下の手順にてSQLの適用を実施してください。

[root@xxxxxx tmp]# su - postgres [postgres@xxxxxx ~]$ cd /tmp/cgi-bin/chatlk/sqlupd/chatlkdb [postgres@xxxxxx chatlkdb]$ ./install.sh chatlk localhost chatlkdb 5432 V6.6 R2.0 に更新しています... 更新が完了しました。 [postgres@xxxxxx chatlkdb]$

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

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

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

[postgres@xxxxxx chatlkdb]$ exit [root@xxxxxx tmp]#

 

4.パッケージの上書き

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

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

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

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

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

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

 

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

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

[root@xxxxxx tmp]# systemctl start chatluckws [root@xxxxxx tmp]# cat /var/www/cgi-bin/chatlk/rserver/log/rserver.log | grep address [2024-12-01T09:00:00.000+09:00] Start the server with the address "[::]:3000"

"rserver.log"に"Start the server with the address "[::]:3000""のように表示されていれば、リアルタイムサーバーの起動は完了です。

 

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

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