Difference between revisions of "User:Frahm"

From Univention Wiki

Jump to: navigation, search
Line 2: Line 2:
 
{{Review-Status}}
 
{{Review-Status}}
 
{{Version|UCS=3.0}}
 
{{Version|UCS=3.0}}
=eJabberd in UCS=
+
= Nitrobit in UCS =
Needed softwarepackages: erlang-base, ejabberd, erlang-nox
+
This article describes the set up and configuration of the nitrobit-update-server. Nitrobit is at the moment only available as a Debian package it can be downloaded from http://www.nitrobit.de/download_nus.html also a MySQL server is needed.
  
This article describes the set up of an eJabberd server and the binding to UCS. Because the scope of functions is quite large, we will respond the following themes in this article:
+
== Installation ==
 +
At first, the ''unmaintained'' repository have to be activated.
 +
<syntaxhighlight lang=bash>
 +
ucr set repository/online/unmaintained=yes
 +
</syntaxhighlight>
 +
After this, the package can be installed
 +
<syntaxhighlight lang=bash>
 +
dpkg -i nitrobit-update-server_x.x.x_x.deb
 +
</syntaxhighlight>
 +
Maybe there are some missing dependences that have to be installed
 +
<syntaxhighlight lang=bash>
 +
apt-get install -f
 +
</syntaxhighlight>
 +
Now ''mod_rewrite'' and the nitrobit update server website has to be enabled
 +
<syntaxhighlight lang=bash>
 +
/usr/sbin/a2enmod rewrite
 +
/usr/sbin/a2enmod nitrobit-update-server
 +
</syntaxhighlight>
 +
Before the web based installation dialog installs Nitrobit correctly, a MySQL user have to be created. Type in your shell
 +
<syntaxhighlight lang=bash>
 +
mysql
 +
</syntaxhighlight>
 +
now the mysql prompt should be showed on your shell
 +
<syntaxhighlight lang=sql>
 +
mysql>
 +
</syntaxhighlight>
 +
The following step have to typed in the mysql interface
 +
<syntaxhighlight lang=sql>
 +
GRANT ALL PRIVILEGES ON *.* TO 'User'@'localhost'  IDENTIFIED BY 'Password' WITH GRANT OPTION;
 +
</syntaxhighlight>
 +
The values of ''User'' and ''Password'' have to be replaced.
  
* LDAP authentification
+
Exit the mysql interface via
* SSl/Plaintext (Port 5223)
+
<syntaxhighlight lang=sql>
* vCard (from the LDAP)
+
quit;
 
+
</syntaxhighlight>
The needed Softwarepackages can be installed directly via UCS, or downloaded as a Debian sourcecodepackage, translated on the UCS system and with the usual UCS commands installed.
+
Now that the pre-installation steps are done, the server can be started.
 
+
<syntaxhighlight lang=bash>
eJabberd is a Jabber server whichs is written in the programing language ''Erlang'' which has through various modules a quite large scope of functions.
+
/etc/init.d/nitrobit-update-server start
 
+
</syntaxhighlight>
The eJabberd is configuarable with the file ''/etc/ejabberd/ejabberd.cfg''. In the following the main parameters will be respond. FQDN, DOMAINNAME and LDAPBASE have to be customized.
+
To finish the setup of Nitrobit, you must enter the web-based interface on
The vaule of NAME is the output from two UCR variables, which were seperated bei comma.
 
<pre>
 
ucr get hostname
 
ucr get domainname
 
</pre>
 
e.g. master.example.org, the output from ''ucr get domainname'' is also the value for DOMAINNAME.
 
The value of LDAPBASE is the output from
 
<pre>
 
ucr get ldap/base
 
</pre>
 
 
 
=== General settings ===
 
<pre>
 
...
 
%% mapping the administrator account of the Jabber server to a normal administrator
 
{acl, admin, {user, "administrator", "FQDN"}].
 
...
 
%% The domainname of the Jabber server
 
{hosts, ["DOMAINNAME"]}.
 
</pre>
 
 
 
=== Authentification (LDAP) ===
 
 
 
<pre>
 
...
 
% Commenting out!
 
%{auth_method, internal}
 
 
 
%% Authentication using LDAP
 
{auth_method, ldap}.
 
%% List of LDAP servers:
 
{ldap_servers, ["FQDN"]}.
 
%% Port connect to LDAP server:
 
{ldap_port, 7389}.
 
%% LDAP manager:
 
{ldap_rootdn, "uid=Administrator,cn=users,LDAPBASE"}.
 
%%
 
%% Password to LDAP manager:
 
{ldap_password, "PASSWORT"}.
 
%%
 
%% Search base of LDAP directory:
 
{ldap_base, "cn=users,LDAPBASE"}.
 
</pre>
 
 
 
=== vCard (LDAP) ===
 
Other points to note here that only the values ​​in ''{ldap_rootdn,'' ''{ldap_password'' and LDAPBASE have to be changed. The remainder values ​​must remain as standard!
 
<pre>
 
%% Used modules:
 
{modules,
 
[
 
  %% To bind the vCard to the LDAP server
 
  %% More fields can be added
 
  {mod_vcard_ldap, [
 
    {ldap_servers, ["FQDN"]},
 
    {ldap_rootdn, ""}, % Here must be inserted a value. Preferably the administrator!
 
    {ldap_password, ""}, % Password from the administrator
 
    {ldap_base, "cn=user,LDAPBASE},
 
    {ldap_uidattr, "uid"},
 
    {ldap_filter, ""},
 
    {ldap_vcard_map, [
 
      {"NICKNAME", "%u", []},
 
      {"FN", "%s", ["cn"]},
 
      {"EMAIL", "%s", ["mailPrimaryAdress"]},
 
      {"DESC", "%s", ["description"]}
 
    ]},
 
    {ldap_search_fields, [
 
      {"User", "%u"},
 
      {"Name", "givenName⅛"},
 
      {"Family Name", "sn"},
 
      {"Email", "mail"}
 
    ]},
 
 
 
    {ldap_search_reported, [
 
      {"Full Name", "FN"},
 
      {"Nickname", "NICKNAME"},
 
      {"Description", "DESC"}
 
    ]}
 
  ]},   
 
  ...
 
  %% The mod_vcard module should be commented out
 
  %{mod_vcard, []},
 
  ...
 
]}.
 
</pre>
 
 
 
Another hint to the configurationfile from the eJabberd. Unfortunaley the syntax is quite complicated and the error messages with incorrect syntax are not very meaningful. So you should pay attention to every point and comma.
 
 
<pre>
 
<pre>
{aaa, bbb, [
+
https://server-name/nitrobit-update-server
  {auth_method, anonymous}, % here should be a comma
 
  {allow_multiple_connections, false}, % here should be a comma
 
  {anonymous_protocol, sasl_anon} % here must be no comma
 
  ]
 
}. % here should be a point
 
 
</pre>
 
</pre>
 
+
over this interface the server is also configurable.
 
 
=== Ports / Firewall ===
 
After this we have to check if the eJabberd servers is running correct.
 
<pre>
 
ejabberdctl status
 
</pre>
 
The right output should look like the following:
 
<pre>
 
The node ejabberd@example is stared with status: started
 
ejabberd 2.1.5 is running in that node
 
</pre>
 
If the Jabber server is running correct, some ports in the firewall have to be activated. The ports ''5222'' and ''5269'' are needed. In the following we check if the ports are already opened and opens them if they're still closed.
 
Checking if the ports open:
 
<pre>
 
netstat -plna | grep 5222
 
netstat -plna | grep 5269
 
</pre>
 
Opening ports in the firewall
 
<pre>
 
ucr set security/packetfilter/ejabberd/tcp/5222/all=ACCEPT
 
ucr set security/packetfilter/ejabberd/tcp/5269/all=ACCEPT
 
</pre>
 
After opening the ports, the firewall have to be restarted:
 
<pre>
 
/etc/init.d/univention-firewall restart
 
</pre>
 
 
 
=== Registration of new users ===
 
To login in a Jabber client it is not necessary to register a new user. The users will be created in the UMC as a normal user. The login information to connect to the Jabber server via a client are the same that are needed to login into a normal user account. If you want to connect to the eJabberd from a foreign host, you have to enter the IP adresse instead of the domainname in your client settings.
 
 
 
After this the server should run correctly and should be ready for chatting.
 

Revision as of 14:38, 14 November 2012

Note: Cool Solutions are articles documenting additional functionality based on Univention products. Not all of the shown steps in the article are covered by Univention Support. For questions about your support coverage contact your contact person at Univention before you want to implement one of the shown steps.

Also regard the legal notes at Terms of Service.
Note: This article is not yet reviewed.
Produktlogo UCS Version 3.0

Nitrobit in UCS

This article describes the set up and configuration of the nitrobit-update-server. Nitrobit is at the moment only available as a Debian package it can be downloaded from http://www.nitrobit.de/download_nus.html also a MySQL server is needed.

Installation

At first, the unmaintained repository have to be activated.

ucr set repository/online/unmaintained=yes

After this, the package can be installed

dpkg -i nitrobit-update-server_x.x.x_x.deb

Maybe there are some missing dependences that have to be installed

apt-get install -f

Now mod_rewrite and the nitrobit update server website has to be enabled

/usr/sbin/a2enmod rewrite
/usr/sbin/a2enmod nitrobit-update-server

Before the web based installation dialog installs Nitrobit correctly, a MySQL user have to be created. Type in your shell

mysql

now the mysql prompt should be showed on your shell

mysql>

The following step have to typed in the mysql interface

GRANT ALL PRIVILEGES ON *.* TO 'User'@'localhost'  IDENTIFIED BY 'Password' WITH GRANT OPTION;

The values of User and Password have to be replaced.

Exit the mysql interface via

quit;

Now that the pre-installation steps are done, the server can be started.

/etc/init.d/nitrobit-update-server start

To finish the setup of Nitrobit, you must enter the web-based interface on

https://server-name/nitrobit-update-server

over this interface the server is also configurable.

Personal tools