For the purposes of running a private XMPP communication platform, we can safely stick with PostgreSQL 9.2 which is stable and comes in CentOS 7 by default.
# as root
$>yuminstall-ypostgresqlpostgresql-serverpostgresql-develpostgresql-libs
# After PostgreSQL packages are installed, enable PostgreSQL to start after each reboot.
$>systemctlenablepostgresql.service
# Initialize directory structure and postgres system database.
$>postgresql-setupinitdb
# And start the service.
$>systemctlstartpostgresql.service
Postgres installation is now up and running, lets proceed with setting up the specific database and the dedicated user for OpenFire, together with authentication method and administration password.
For full administration access, switch to postgres user.
supostgres
# as postgres
$>createdbopenfire
$>createuser-Popenfire
# The '-P' parameter ensures that the shell will explicitly ask for user's password and you will need to type it in. Enter the password twiceR3m0T3wP5
$>psql-Upostgres-dpostgres-c"ALTER USER postgres WITH PASSWORD 'R3m0T3wP5';"
Postgres user is secured with the new password. Lets put authentication methods in practice and force every application or shell login to prompt for these passwords.
# as postgres
$>vim/var/lib/pgsql/data/pg_hba.conf
# Scroll down to the bottom of the file and replace all peer and ident strings with md5 string.# The configuration should look like this:# TYPE DATABASE USER CIDR-ADDRESS METHOD# "local" is for Unix domain socket connections onlylocalallallmd5
# IPv4 local connections:hostallall127.0.0.1/32md5
# IPv6 local connections:hostallall::1/128md5
Go back from postgres shell (Ctrl+D) and restart postgresql service as root.
# as root
$>systemctlrestartpostgresql.service
Download and install Openfire from Ignite Realtime¶
Since OpenFire RPM package is not included in any major RHEL / CentOS / Fedora distribution repositories, it must be downloaded directly from Ignite Realtime website.
# as root
$>wgethttp://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-3.10.0-1.i386.rpm-Oopenfire-3.10.0-1.i386.rpm
# This package come in 32bit version only, so in case we run this installation on x86_64 system, we need to make sure to install corresponding 32bit libraries as well.
$>yuminstall-y/root/openfire-3.9.3-1.i386.rpm
$>yuminstall-yglibc.i686
Enable the openfire service and start it
# as root
$>chkconfigopenfireon
$>systemctlstartopenfire.service
# We need to open the firewall ports in order to expose the gui to the outside
$>firewall-cmd--permanent--zone=public--add-port=9090/tcp
$>firewall-cmd--permanent--zone=public--add-port=9091/tcp
$>firewall-cmd--reload
Choose the Standard Database Connection in the next section
Provide the Database connection parameters for the PostgreSQL DB in the standard connection section.
The password for the user openfire is the same provided in the PostgreSQL DB setup (see above).
Note
Be sure the openfire database and user have been correctly created on PostgreSQL and the passwords provided (see above for instructions).
If there are no connection issues, choose Default value on the users profile settings section.
Create the Administrator account in the next section.
The password *must* match the one specified in the remoteProcess.properties file
R3m0T3wP5
The initial setup is now complete. Log into the system using the newly created admin account.
Move to the ServerCertificates section of the ServerSettings tab panel.
Warning
This passage is not needed anymnore on Openfire 4.0+. At least the management of the certificates is a bit different. Please refer to the specific Openfire documentation for more information.
Make sure that the self-signed certificates have been correctly generated and click on here in order to restart the server
Warning
This passage is not needed anymnore on Openfire 4.0+. At least the management of the certificates is a bit different. Please refer to the specific Openfire documentation for more information.
The same section now shows the server certificates and won’t ask for another restart unless the certificates are generated again.
Update the SecuritySettings in order to allow the server accepting self-signed certificates on secured connections.
Warning
This passage is not needed anymnore on Openfire 4.0+. At least the management of the certificates is a bit different. Please refer to the specific Openfire documentation for more information.
Create the default channel as shown in the next figure.
Create the management channel as shown in the next figure. Pay attention to the RoomOptions and specify the password for the channel
R3m0T3wP5
Double check that the channels have been correctly created and they appear in the GroupChatRooms.
Restart GeoServer
# as root
$>systemctlrestartgeoserver
After the GeoServer has successfully restarted, double check that it is connected to the server using the admin credentials.
It is *very* important that the user is shown as Authenticated.
Check also that the user is registered to the XMPP channels created above.
By default the TCP Ports where the XMPP Server is listening for incoming connection are closed to the outside. Therefore it is necessary to enable the Firewall rules at least for the Openfire default secured port 5223 unless it has been changed by the user during the server setup.
In order to do that issue the following commands:
# as root# We need to open the firewall ports in order to expose the gui to the outside
$>firewall-cmd--permanent--zone=public--add-port=5222/tcp
$>firewall-cmd--permanent--zone=public--add-port=5223/tcp
$>firewall-cmd--reload
The next steps describe how to setup the system in order to expose a Shared Network Folder which will be used to store the outcomes of the remote processing.
The following procedures are not mandatory and the final deployment on the production system may be configured to use different protocols and frameworks to expose shared file-systems.
The setup and initial configuration of the NFS packages can be done by following the next procedure:
# as root
$>yum-yinstallnfs-utils
$>vi/etc/idmapd.conf
# The following should be set to the local NFSv4 domain name# The default is the host's DNS domain name.Domain=geoserver.org
Note
The domain specified above maybe different depending on the final system deployment and the production environment setup.
Creating and exposing a shared folder is possible by following the next steps:
as root
Create the physical folder structure to be exposed via the Network Filesystem