Blog Jurišić

To content | To menu | To search

Tag - postgresql

Entries feed

Friday, March 31 2017

How to install Openfire server on Debian 8 Jessie

Openfire is a real time collaboration (RTC) server licensed under the Open Source Apache License. It uses the only widely adopted open protocol for instant messaging, XMPP (also called Jabber). Openfire is incredibly easy to setup and administer, but offers rock-solid security and performance.

If you looking for an alternative to public IM and VOIP services Openfire is great solution.


Settings about host before installation

Before installation of Openfire, I set settings as in my example:

  • System name: 
  • Domain name:
  • System IP:

LDAP settings (if don't have LDAP server check How to Install and configure a Basic LDAP Server on an Debian 8 Jessie):

  • Base DN: dc=test,dc=com
  • Bind user: cn=nextcloud,ou=groups,dc=test,dc=com
  • Server IP:


Install Java

Openfire need Java for running, I personal using Java 8 from my repository , first install java:

apt-get install oracle-java8-jre


Download and install Openfire package

First need to download Debian package, and install package

wget --no-check-certificate
dpkg -i openfire_4.1.3_all.deb


Setup for Openfire

Now open web browser to start setup of Openfire ( - replace IP with Your address of host )

Select language and press "Continue"

Input network settings:

  • XMPP Domain Name:
  • Server Host Name (FQDN):
  • Admin Console Port:9090
  • Secure Admin Console Port: 9091

If wish can set "Property Encryption Key" for Encryption password in configuration files of Openfire, in this example I don't use that. Admin Console Port using 9090 and Secure Admin Console Port 9091 but in some case good idea to change this ports in non-standard.

Next click on "Continue"

If don't have lots of users select "Embedded Database" and click on "Continue"

Select "Directory Server (LDAP) and click on "Continue"

Connection Settings:

  • Server Type: OpenLDAP
  • Host:
  • Port: 389
  • Base DN: dc=test,dc=com
  • Administration DN: cn=admin,dc=test,dc=com
  • Password: <Your password>

Click on "Test Settings" and if all ok, You will see message "Status: Success!"

Close message and click on "Save & Continue"

Click on "Save & Continue"


I my example I don't wont to mapping all group from LDAP. My choice is only group "cn=nextcloud,ou=groups,dc=test,dc=com".

Group Mapping:

  • Group Field: cn
  • Member Field: memberUid
  • Description Field: description
  • Posix Mode: Yes
  • Group Filter: (&(|(objectclass=posixGroup))(|(cn=nextcloud)))

Click on "Save & Continue"

Now choose one or more users from your LDAP to be adminstratos, in my case I select user1 and press "Add", then click on "Continue"

Now Your Openfire server is ready for using.

Recommendation read :

Desktop clients :

Android clients:



Tuesday, February 28 2017

How to install PostgreSQL 9.6 server on Debian 8 Jessie

PostgreSQL is a fully featured object-relational database management system. It supports a large part of the SQL standard and is designed to be extensible by users in many aspects. Some of the features are: ACID transactions, foreign keys, views, sequences, subqueries, triggers, user-defined types and functions, outer joins, multiversion concurrency control. Graphical user interfaces and bindings for many programming languages are available as well.

It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness.


If wont to use PostgreSQL 9.6 need to add repository (Debian current have PostgreSQL 9.4 in repository).

Add PostgreSQL Repository

Add the PostgreSQL repository in the /etc/apt/sources.d/postgresql.list

echo 'deb jessie-pgdg main' >> /etc/apt/sources.list.d/postgresql.list

Install release key of PostgreSQL repository:

wget --no-check-certificate -q -O- | apt-key add -

And run apt-get update to download the list of packages.

apt-get update


Install PostgreSQL and setup new user & database

Install PostgreSQL with:

apt-get install postgresql-9.6

The PostgreSQL package will install all required dependencies.

Choose "Y" to start the installation, wait fo finnish and PostgreSQL is ready for using.


Create a PostgreSQL database, user and set permissions

The next step is to create a PostgreSQL database, add user and set permissions.

Login to PostgreSQL on the commandline by running this command:

su - postgres

Enter the following commands to create a database: 

CREATE USER myuser WITH PASSWORD 'StorngPasswordHere';

We have created a PostgreSQL database above, enter the details of that database now:

  • Username:            myuser
  • Password:            StorngPasswordHere
  • Database name: mybase

Change username,password and database to Your needs.


Test new PostgreSQL database

Now run simple test:

psql -h localhost -U myuser -W -d mybase

If You success connect - bingo !!!!  Enjoy in PostgreSQL