开发者

Openfire and Windows Azure

Has anyone installed OpenFire on Windows Azure before? Is it easy to create another instance with the Ope开发者_运维知识库nFire in it?

Thanks!


Yes, I've installed openFire on both EC2 (Linux) and Azure. It is a painless as you could imagine.

  • get a VM
  • install java
  • install openfire
  • install openfire db to SQL azure (connection string syntax below)
  • jdbc:jtds:sqlserver://SQLAzInstance.database.windows.net:1433/OpenFireSqlDBName;ssl=require
  • be sure to allow proper ports through the endpoints tab of the virtual machine in the new azure management portal
  • TCP 5222/5223 (std/SSL client connectivity)
  • TCP 5269 (server-to-server)
  • TCP 9090 (default openfire web ui port, you could change this)


Log into your Windows Azure account.

Create a Machine running Ubuntu 14 LTS

Then go to your SSH client (for Mac and Linux users, you can use the terminal by typing

ssh username@servername e.g. ssh joel@chatserver.cloudapp.net ) and for Windows users, you can install PuTTy SSH client which comes with BitVise.

log in as an admin by typing

sudo su

then update the sever by typing

apt-get update

then check for any new releases by typing

apt-get upgrade

Then check if java is installed (it is usually not installed anyway) by typing

java -version

if it is not installed, install it by typing

apt-get install default-jre

accept it to install by typing y to mean yes

wait for it to install

then install openfire by first downloading it. You use the wget command to download it directly to your server as below. (at the time of writing, openfire 3.9.3 is the latest version)

wget -O openfire.deb http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3.9.3_all.deb

Then after it has finished downloading, install it by typing

dpkg --install openfire.deb

Before you go to the browser, go to your Windows Azure dashboard

Click on the Virtual Machine you have created

Then click on Endpoints

Add the following end points, they are all of TCP type

Public Port 5222, Private Port 5223 and this is for SSL connectivity

Public Port 5269 and Private port 5269 and this is for server to server connectivity

Public Port 9090 and private port 9090 and this is for openfire web UI

After all this, you are good to go,

Go to your browser and type in your server url and at the end put 9090 e.g.

chatserver.cloudapp.net:9090

Hope that helped and happy chatting!!


To user default port such as 80 and 443 (replace 5222 and 5223 with 80 and 443 ) use following commands to redirect traffic on linux machine.

iptables -A INPUT -i eth0 -p tcp --dport 5222 -j ACCEPT
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 5222
iptables -A INPUT -i eth0 -p tcp --dport 5223 -j ACCEPT
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 5223
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜