[OpenFire] CentOS 上的安裝流程


在 CentOS 上安裝 OpenFire Server 流程

1.安裝 OpenFire Server 版程式

進入Openfire官網,下載最新版本的OpenFire,目前最新版本為4.2.3-1

官方下載:openfire-4.2.3-1.x86_64.rpm
本地下載:openfire-4.2.3-1.x86_64.rpm

[root@ip-192-168-0-11 tmp]# wget https://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-4.2.3-1.x86_64.rpm
--2018-10-04 01:49:35--  https://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-4.2.3-1.x86_64.rpm
Resolving www.igniterealtime.org... 52.58.216.59
Connecting to www.igniterealtime.org|52.58.216.59|:443... connected.
HTTP request sent, awaiting response... 302
Location: http://download.igniterealtime.org/openfire/openfire-4.2.3-1.x86_64.rpm [following]
--2018-10-04 01:49:36--  http://download.igniterealtime.org/openfire/openfire-4.2.3-1.x86_64.rpm
Resolving download.igniterealtime.org... 52.58.216.59
Connecting to download.igniterealtime.org|52.58.216.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/igniterealtime/Openfire/releases/download/v4.2.3/openfire-4.2.3-1.x86_64.rpm [following]
--2018-10-04 01:49:37--  https://github.com/igniterealtime/Openfire/releases/download/v4.2.3/openfire-4.2.3-1.x86_64.rpm
Resolving github.com... 192.30.255.113, 192.30.255.112
Connecting to github.com|192.30.255.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/18511687/1bd89d1a-2e8c-11e8-8519-efffef7273cc?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20181004%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181004T014937Z&X-Amz-Expires=300&X-Amz-Signature=e571f68b7e78991c49d9b04dec816923c201ba2116e9656c96ce055edf8b8b73&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dopenfire-4.2.3-1.x86_64.rpm&response-content-type=application%2Foctet-stream [following]
--2018-10-04 01:49:37--  https://github-production-release-asset-2e65be.s3.amazonaws.com/18511687/1bd89d1a-2e8c-11e8-8519-efffef7273cc?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20181004%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181004T014937Z&X-Amz-Expires=300&X-Amz-Signature=e571f68b7e78991c49d9b04dec816923c201ba2116e9656c96ce055edf8b8b73&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dopenfire-4.2.3-1.x86_64.rpm&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com... 52.216.101.147
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com|52.216.101.147|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 105731242 (101M) [application/octet-stream]
Saving to: âdownloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64.rpmâ
100%[=================================================>] 105,731,242 11.0M/s   in 2m 21s

2018-10-04 01:51:59 (735 KB/s) - âdownloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64.rpmâ

[root@ip-192-168-0-11 tmp]# yum install downloadServlet\?filename\=openfire%2Fopenfire-4.2.3-1.x86_64.rpm
Loaded plugins: presto, security
Setting up Install Process
Examining downloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64.rpm: openfire-4.2.3-1.x86_64
Marking downloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package openfire.x86_64 0:4.2.3-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================
 Package Arch   Version Repository                                                    Size
===========================================================================================
Installing:
 openfire
         x86_64 4.2.3-1 /downloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64 256 M

Transaction Summary
===========================================================================================
Install       1 Package(s)

Total size: 256 M
Installed size: 256 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : openfire-4.2.3-1.x86_64                                                 1/1
  Verifying  : openfire-4.2.3-1.x86_64                                                 1/1

Installed:
  openfire.x86_64 0:4.2.3-1

Complete!

2.安裝 glibc.x86_64

glibc是什麼:glibc是Gnu發佈的libc庫,是C語言的程序庫。glibc是linux系統中最底層的api,幾乎其它任何運行庫都會依賴於glibc。glibc除了封裝linux操作系統所提供的系統服務外,它本身也提供了許多其它一些必要功能服務的實現。由於glibc 囊括了幾乎所有的UNIX 通行的標準,可以想見其內容包羅萬有。而就像其他的UNIX 系統一樣,其內含的檔案群分散於系統的樹狀目錄結構中,像一個支架一般撐起整個作業系統。
[root@ip-192-168-0-11 tmp]# yum install glibc.x86_64
Loaded plugins: presto, security
Setting up Install Process
Package glibc-2.12-1.209.el6_9.2.x86_64 already installed and latest version
Nothing to do

 

3.啟動openfire服務

[root@ip-192-168-0-11 tmp]# chkconfig openfire on
[root@ip-192-168-0-11 tmp]# service openfire start
Shutting openfire:                                    [  OK  ]

CentOS 安裝完成


OpenFire Server 相關設定流程

在瀏覽器上輸入 http://192.168.0.11:9090 (你的主機IP 或 host)

1.請選擇您的慣用語言

2.請選擇您的資料庫設定方式,這麼選標準資料庫連接

 

3.設定資料庫的連線方式

在設定之前,您要先準備一組給OpenFire 的連線帳號

root@localhost [mysql]>CREATE USER 'xmpp'@'127.0.0.1' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

root@localhost [mysql]>GRANT ALL PRIVILEGES on *.* to 'xmpp'@'127.0.0.1';
Query OK, 0 rows affected (0.00 sec)

root@localhost [mysql]>FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.03 sec)

root@localhost [mysql]>create database openfire;
Query OK, 1 row affected (0.03 sec)

接下來的資料庫驅動選項設定,選擇:

MySQL

資料庫URL:改為如下

jdbc:mysql://[host-name]:3306/[database-name]?rewriteBatchedStatements=true
jdbc:mysql://127.0.0.1:3366/openfire?rewriteBatchedStatements=true

4.請選擇配置文件設定,預設默認設置

 

5.設定管理員帳號:請自行輸入

 

6.下一步後,就可以看到安裝完成的畫面