Zum Inhalt springen
EBF Logo

EBF product documentation

Find help using and administering EBF applications

EBF Files

  • Changelog
  • 01. Getting Started
  • 02. Architecture and Workflow
  • 03. Requirements
  • 04. Installation
  • 05. Database Setup and Configuration
  • 06. Configuration
  • 07. Administration

04. Installation

Table of Contents
  • Installation Option 1 (ISO)
  • Installation Option 2 (Docker)
    • Configuring Docker
  • Installation Option 3 (JAR)
    • On CentOS
    • On Windows

EBF Files offers three installation options which will be described in detail below.

Installation Option 1 (ISO)

This section describes how to install an EBF appliance as a virtual system based on an EBF ISO image.

  1. First, a virtual machine shell must be set up according to the specifications. Please note, that the VM must be configured for CentOS 7 x64 Linux operating system.
  2. The EBF ISO image is then assigned to the created VM shell as startup medium.
  3. Start the VM based on the ISO.
  4. When booting on a Linux VM shell the following installation menu appears:
  5. Select the desired installation language and click „Continue“ to display the „Installation Summary“ menu:
  6. Optional settings include date, time (New York EST is default) and keyboard language. When using a German keyboard select German language layout to avoid confusion:
  7. Under „Installation Summary > System > Installation Destination“ select the local volume on which the software is to be installed. It is sufficient to click on the local main volume or drive. Confirm with the „Done“ button:
  8. The installed packages are selected according to the desired EBF product(s). Navigate to „Installation Overview > Software > Software Selection”:
  9. Select the Files Server package. The installation begins after clicking on „Done“. In the following screen, click on “Start Installation” to initiate the installation:
  10. When installing the password for the user Root must be known and configured.
  11. After installation rebooting the system is required.
  12. Then log in as Root in the bash terminal of the system (using previously created Root password).
  13. Finally the ISO image can be removed/ejected as installation media for this virtual machine.

Depending on the network configuration, check the following:

  • connectivity of the machine to access it via SSH
  • if the machine is available externally
  • if packages are up-to-date

When in doubt, contact your network administrator. When further configuration is required, settings are stored in the following files:

/etc/resolv.conf
/etc/sysconfig/network-scripts/ifcfg-ensxxx

Installation Option 2 (Docker)

Before Docker installation can start, a Docker-capable operating system must be installed. This is described in the following sections using Linux CentOS 7 as an example. First the operating system is updated then installation of the Docker Daemon is initiated:

System Update

$ yum update

Docker Base Installation

$ curl -fsSL https://get.docker.com/ | sh

Docker Base Start

$ systemctl start docker

Docker Compose is then installed:

$ curl -L "https://github.com/docker/compose/releases/download/1.25.3/
  docker-compose-$$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose
$ docker-compose --version

Configuring Docker

A separate MySQL database is used as an example. This requires that a docker swarm is created combining the docker images of EBF Files server and MySQL server.

Create a Docker Swarm:

$ docker swarm init

Create Docker Secrets:

$ echo "MySQLRootPWD" | docker secret create mysql-root-pw -
$ echo "MySQLFilesPWD" | docker secret create mysql-files-pw -

These secrets are provided by Docker and are read at runtime from both MySQL and the app containers. Afterwards check the secrets were created:

$ docker secret ls

The docker-compose.yml file can be created to combine EBF Files server and MySQL server. Create a new file:

$ touch docker-compose.yml

Edit the created file and add the following content:

$ vi docker-compose.yml

version: '3.6'
services:
  db:
    image: mysql:8
    environment:
      - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mysql-root-pw
      - MYSQL_DABASE=files
      - MYSQL_USER=files
      - MYSQL_PASSWORD_FILE=/run/secrets/mysql-files-pw      
    networks:
      - dockernet
    secrets:
      - mysql-root-pw
      - mysql-files-pw
    app:
      image: ebfdev/files.server:latest
      depends_on:
        - db
      ports:
        - 80:8080
      environment:
        - SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT=org.hibernate.dialect.MySQL8Dialect
        - SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.cj.jdbc.Driver
        - SPRING_DATASOURCE_URL=jdbc:mysql://db:3306/files?autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true
        - SPRING_DATASOURCE_USERNAME=files
        - SPRING_DATASOURCE_PASSWORD_FILE=/run/secrets/mysql-files-pw
      networks:
        - dockernet
      secrets:
        - mysql-files-pw
      restart: on-failure:3
  networks:
    dockernet:
  secrets:
   mysql-root-pw:
    external: true
   mysql-files-pw:
    external: true

With the following command:

$ cat docker-compose.yml

preview the added content:

Now provide the stack for the local Docker Swarm with the following command:

$ docker start deploy -c docker-compose.yml files-server-stack

After a minute or two the server is ready for operation, the EBF Files admin frontend can be reached with the server IP via port 80:

Installation Option 3 (JAR)

On CentOS

There are three components the service requires: Java Runtime (Open JDK), database (here MariaDB) and the application as JAR file.

First the EBF Files JAR file must be stored on the server. To move the file to the target machine, simply use the scp command in the console:

$ scp files-current.jar benutzername@host-IP:/root/deinOrdner

The host computer must have a Java Runtime. Use Open JDK version 14 or newer to install:

$ yum install java-14-openjdk-devel

Java is now installed and linked from /usr/bin/java.

Next install and configure the database. This database can also be external depending on the requirements. Download MariaDB to the host computer:

$ yum install -y mariadb-server

Now activate MariaDB, start and add a user and database. Activate the database service as follows:

$ systemctl enable mariadb
$ systemctl start mariadb
$ mariadb-secure-installation

In this last step enter the MariaDB root password and other optional settings. Now access to MariaDB is granted:

$ mysql -u root -p

Enter the MariaDB root password, press Enter if the password is blank. From the MariaDB shell create a EBF Files user („files“) with password („files_pwd“) and a database „files_db“:

CREATE USER 'files'@'localhost' IDENTIFIED BY 'files_pwd';

GRANT ALL PRIVILEGES ON * . * TO 'files'@'localhost';

FLUSH PRIVILEGES;

CREATE DATABASE files_db;

USE files_db;

EXIT;

The database should now be configured for use.

Change the parameters to match LDAP and database configurations. In our case, we have created a local database and need to create a new file to store the created database password. The parameter SPRING_DATASOURCE_PASSWORD_FILE refers to a text file.

Create a new file in the opt folder:

$ touch /opt/mysql-files-pw

Edit this file:

$ vi /opt/mysql-files-pw

Enter the password there. Define the environment variables directly in the terminal:

$ export COM_EBF_LDAP_LDAPTYPE=ActiveDirectory
$ export COM_EBF_LDAP_SERVER=10.4.7.7
$ export COM_EBF_LDAP_PORT=389
$ export COM_EBF_LDAP_VIASSL=true
$ export COM_EBF_LDAP_BASEDN=dc=files,dc=acme,dc=com
$ export COM_EBF_LDAP_USERNAME=cn=admin,dc=files,dc=acme,dc=com
$ export COM_EBF_LDAP_PASSWORD=files
$ export SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT= org.hibernate.dialect.MySQL8Dialect 
$ export SPRING_DATASOURCE_DRIVER-CLASS-NAME= com.mysql.cj.jdbc.Driver
$ export SPRING_DATASOURCE_URL=jdbc:mysql://db:3306/files_db
$ export SPRING_DATASOURCE_USERNAME=files
$ export SPRING_DATASOURCE_PASSWORD_FILE=/opt/mysql-files-pw

For a complete overview of all properties please take a look in the Configuration chapter in this documentation.

Finally install the EBF Files server:

$ java -jar files-current.jar

On Windows

The Files Server installation for Windows Server requires a compatible version of Java version. The database can be either external or a local instance of Microsoft SQL Server. In the case of a local instance, Microsoft SQL Server 2016 or 2019 is recommended. A database called “files_db” and a login user “files” with ‘diskadmin’, ‘sysadmin’ and ‘securityadmin’ privileges is required.

Install a compatible Java version (14 or newer) and add its ‘bin’ folder as part of the PATH environment variables. For example: right-click on This PC > Properties > Advanced System Settings > Environment variables > ‘System Variables’, search for Path and double-click. Click ‘New’ and add the path to java ‘bin’:

C:\Program Files\Java\jdk-15.0.1\bin

Once saved, Java commands are executable in a CMD console.

Open a CMD console window as administrator and download the current Files Server Jar file into a new folder, for example, in the C: root:

C:\files-server>

Define the environment variables in a batch .bat file:

C:\files-server>copy NUL files-config.bat

Edit the batch file with a text editor and enter environment variables with the ‘set’ command for every parameter:

set spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
set spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect
set spring.datasource.url=jdbc:sqlserver://acme.com;databaseName=files_db
set spring.datasource.username=files
set spring.datasource.password=password


set com.ebf.ldapType=ActiveDirectory
set com.ebf.enableCascadedMembershipLookup=true
set com.ebf.server=10.10.10.10
set com.ebf.port=389
set com.ebf.viaSSL=false
set com.ebf.baseDN=dc=files,dc=acme,dc=com
## IMPORTANT: ldap user need to be an admin that can managae all needed groups.
set com.ebf.username=cn=admin,dc=files,dc=acme,dc=com
set com.ebf.password=ldap-password

set com.ebf.tokenTTL=31536000

set spring.data.rest.return-body-on-create=true
set spring.data.rest.return-body-on-update=true

set spring.jackson.serialization.write_dates_as_timestamps=false
set spring.jackson.default-property-inclusion=non_null
set spring.jackson.serialization.INDENT_OUTPUT=true
set spring.jackson.mapper.default-view-inclusion=true
set spring.jpa.open-in-view=true
set spring.servlet.multipart.max-file-size=100MB
set spring.servlet.multipart.max-request-size=100MB

set server.max-http-header-size=1048576

set logging.level.root=INFO

set spring.datasource.testWhileIdle=true
set spring.datasource.validationQuery=SELECT 1
set spring.jpa.hibernate.ddl-auto=update

set spring.output.ansi.enabled=ALWAYS

set server.port=9090
set info.app.api.version=3

To enable and save logs into file enter:

set enableFileLogging=true

To enable SSL enter those variables:

set server.ssl.enabled=true
set server.ssl.key-store=file: (key file path)
set server.ssl.key-store-type=
set server.ssl.key-alias=
set server.ssl.key-store-password=

For a complete overview of all properties please take a look in the Configuration chapter in this documentation.

Save the batch file and execute it:

C:\files-server>files-config.bat

Now run the Files Server:

C:\files-server>java -jar files-current.jar

Was this article useful?
Still stuck? How can we help?

How can we help?

Updated on 30. März 2022
03. Requirements05. Database Setup and Configuration
Table of Contents
  • Installation Option 1 (ISO)
  • Installation Option 2 (Docker)
    • Configuring Docker
  • Installation Option 3 (JAR)
    • On CentOS
    • On Windows
Subscribe for EBF Newsletter
©2020 EBF-EDV Beratung Föllmer GmbH, All Rights Reserved
Imprint Terms and Conditions Privacy Statement Contact
Facebook-square
Twitter-square
Linkedin
Xing-square
Instagram
EBF Status Check