How to install IN AMAZON EC2 and DNS in OVH

746 views
Skip to first unread message

Gineta

unread,
Mar 14, 2011, 8:10:58 PM3/14/11
to onesocialweb
This Guide is already test and is a update of any other wiki. The
instructions can work in any other servers is not amazon

1.- Login in your AWS console and Install any AMI with UBuntu 10.04 or
any Debian version

2.- Install Openfire
Ensure java6 is installed
sudo apt-get install sun-java6-jdk
Download openfire
wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3.6.4_all.deb
Install Openfire
sudo dpkg -i openfire_3.6.4_all.deb
Ensure that the relavent ports are open (9090 HTTP, 9091 HTTPS,
5222-5223 TCP/IP)
5269 is used for federated server to server messages
Configure on port 9090 from a web browser
Ensure that the port is able to accept connections from 0.0.0.0/0
Note: For added security, it is suggested not to open the admin port
(9090, 9091).
Restart Openfire
sudo service openfire restart
Login to the Admin Control Panel
You should be now able to login to the admin control panel on port
9090
If you can’t login to the Admin Control Panel, there seems to be a
known error where the admin account created during the setup process
doesn’t work. You can fix this by following the instructions in
http://www.igniterealtime.org/community/message/179404#179404 – please
note that the config files live in /usr/share/openfire/conf/
Install One Social Web
Download from ( http://onesocialweb.org/developers-downloads.html ) –
you will need to unpack the tar.gz or tgz file you downloaded before
you can upload it to the server.
- Open the openfire admin panel (http://localhost:9090)
- Go to the Plugins page
- Upload the osw-openfire-plugin.jar file
- If you check the info log (Server Manager → Logs → Info) you should
see the message
“OneSocialWeb plugin has been loaded”

NOW Here THE INSTALLATION is Difference
in OVH or in your domain provider MAKE THE SUBDOMAIN YOU GO TO USE
EXAMPLE CHATING.MYDOMAIN.COM
For that you need to create a CNAME record example:
chating.mydomain.com CNAME mydomain.com

Now we need to create the mapping_xmpp
First we delete any record show mapping_xmpp
and we ADD a new CNAME record like that:

mapping_xmpp-server._tcp.mydomain.com CNAME chating.mydomain.com


Enable HTTP binding in your Openfire server:
Login to the admin console
Go to Server Settings → HTTP Binding
Check the Enabled box
Write down the port number, it should be 7070
Unpack the web client in a folder accessible to your web server:
$ cd /var/www
$ wget http://cloud.github.com/downloads/onesocialweb/osw-web/osw-web-0.6.0a.tgz
$ tar -zxvf osw-web-0.6.0a.tgz
$ mv osw-web-0.6.0a onesocialweb
Edit the index.html file and update your preferences. Here are the
preferences that matches the example in this tutorial:
var preferences = {

// It is easy to change the styling of this client, just point this
variable to another
// theme folder
theme_folder: "themes/osw/",

// What name to use when presenting this service to the user
service_name: "OneSocialWeb",

// The XMPP server to which this client can connect over BOSH.
Carefull that most browsers
// won't allow connecting to a host which is not the same as the one
serving these pages
bosh_host: "example.com",

// Absolute path to the BOSH endpoint
bosh_path: "/bosh",

// What the XMPP domain is
xmpp_domain: "example.com",

// Absolute path to the file servlet
upload_endpoint: "/file",
file_retrieval_endpoint: "http://example.com/file",

// If true, we may do a bit more of logging
developer_mode: "false"

};

Using the Apache web server
Add a new site to your Apache configuration and setup the proxy
redirect to your Openfire BOSH server. You can simply create a new
file (onesocialweb) in /etc/apache2/sites-available/ using the
following content as a basis and modifying pathes and server names to
match your configuration.
Warning: Do not mess-up with your Proxy configuration. If you mis
configure your server, it could act as a proxy for any clients on the
internet towards any other site. In case of doubts, check the
mod_proxy documentation
A good practice is to always have * ProxyRequests* directive to Off.

FROM HERE THE INSTALLATION IS NOT THE SEAM OF THE WIKI

<VirtualHost *:80>
DocumentRoot /var/www/onesocialweb

ServerAdmin webm...@example.com
ServerName www.example.com

<Directory /var/www/onesocialweb>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

ErrorLog /var/log/apache2/onesocialweb_error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/onesocialweb_access.log combined
ServerSignature On

<Proxy *>
Order Allow,Deny
Allow from all
</Proxy>
</VirtualHost>

if we see We not configure the Proxy inside of VirtualHost
We go to make the configuration inside of proxy.conf With that we get
less complications
For not bidding to all the domains we change 127.0.0.1 for the domain
name we like to use
proxy.conf is in /etc/apache2/mods-enabled
if you not see proxy.conf make at root:
sudo a2enmod proxy
sudo a2enmod proxy_http

we open the file proxy.conf and we make like is here

<IfModule mod_proxy.c>
<Proxy *>
#AddDefaultCharset off
Order allow,deny
Allow from all
#Allow from 127.0.0.1
</Proxy>
ProxyRequests Off
ProxyTimeout 900
ProxyPass /bosh http://mydomain.com:7070/http-bind/
ProxyPassReverse /bosh http://mydomain.com:7070/http-bind/
ProxyPass /file http://mydomain.com:9090/plugins/osw-openfire-plugin/file/
ProxyPassReverse /file http://mydomain.com:9090/plugins/osw-openfire-plugin/file/
ProxyPass http-bind/ http://mydomain.com:7070/http-bind/
ProxyPassReverse /http-bind http://mydomain.com:7070/http-bind/
</IfModule>

------------------------------AFTER THAT-------

sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2ensite onesocialweb
sudo /etc/init.d/apache2 restart




Reply all
Reply to author
Forward
0 new messages