Openfire安裝方式(以Ubuntu為例)
1. 前置作業
- Open Port
sudo ufw allow 5222(XMPP Client & TLS)
sudo ufw allow 5223(Old SSL)
sudo ufw allow 9090(Admin Console)
sudo ufw allow 9091(Admin Console Security Tunnel)
- 安裝Java Runtime(如果採用deb方式安裝)
https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get
$sudo apt-get update
$java -version
#可以選擇安裝JRE或JDK
$sudo apt-get install default-jre
or
$sudo apt-get install default-jdk
#也可以選擇安裝Oracle JDK
$sudo apt-get install python-software-properties
$sudo add-apt-repository ppa:webupd8team/java
$sudo apt-get update
$sudo apt-get install oracle-java7-installer
#設定要那一個JRE為Default
$sudo update-alternatives --config java
#設定JAVA_HOME環境變數
$sudo nano /etc/environment
#加入此行
JAVA_HOME="YOUR_PATH"
$source /etc/environment
$echo $JAVA_HOME
2. tar檔
https://www.linode.com/docs/applications/messaging/instant-messaging-services-with-openfire-on-ubuntu-12-04-lts-precise-pangolin
- 將openfire.tar放到/opt底下, 並解壓
$ tar xvf openfire.tar
- Link service
ln -s /opt/openfire/bin/openfire /etc/init.d/
- Start Service
service openfire stop
service openfire start
- 進入Admin Console設定
http://x.x.x.x:9090
default Account/Password: admin/admin
3. deb檔(此方法反而較為複雜, 並且最好有root權限)
- 將openfire.deb放到/opt底下
- 執行安裝, 請一定要安裝JRE, 並且一定要設定JAVA_HOME.
$dpkg --force-all -i openfire.deb
安裝完後安裝檔會散在以下地方
# /etc/init.d/openfire - service script會建立
# /etc/openfire/ - xml設定檔及security資料夾放置位置
# /etc/default/openfire - openfire執行檔
# /var/lib/openfire - plugins及embeded db放置位置
# /var/log/openfire - Log directory
# /usr/share/openfire - Link File及lib與resources資料夾
- Start Service
service openfire stop
service openfire start
- 進入Admin Console設定
http://x.x.x.x:9090
default Account/Password: admin/admin
- 如何移除
$dpkg -r openfire
沒有留言:
張貼留言