Skip to content

Installation instructions

kobbejager edited this page Jul 26, 2018 · 20 revisions

Introduction

These installation instructions are based on a fresh and fully updated install of Ubuntu Server 18.04 LTS and should work on any other Ubuntu 18.04 flavor and most likely identical on more recent versions of Ubuntu. Installation on other Linux distributions is evidently possible as well - my development platform is Arch Linux and has a running instance of Entropy. Although untested, it should be possible to run Entropy on every operating system, including Windows, as long as Apache 2.x and php 7.x are installed and configured. Webservers other than Apache2 should work too, as long as they support https and php.

Ubuntu Server has been chosen for this guide, because of its ease of configuration. Nevertheless, some experience with Linux and the command prompt is required in order to use this guide. Apache, php and the optional sendmail are packages with numerous possibilities; only those that are required for a basic usage for Entropy are covered in this guide. For more in-depth information, please consult this tutorial and the support pages of the respective projects.

This is a quick set-up guide for Entropy, based on a virgin test environment. Do not use this guide if you plan to install Entropy on a production server that runs other services within your organisation. More profound configuration might be necessary in order to run the services concurrently and more secure.

1. Apache2

To install and enable the Apache web server, run the following command from the command prompt:

# sudo apt install apache2

This installs and enables the Apache 2.4 webserver. To check if Apache is running correctly, you can direct a browser to the IP number of the Ubuntu server (use # ifconfig to find out the current IP number). The default page "Apache2 Ubuntu Default Page" should appear.

For safety reasons Entropy requires HTTPS for logging in and all administrative acts. The following commands activate the SSL module in Apache and HTTPS for the default website.

# sudo a2enmod ssl
# sudo a2ensite default-ssl

Restart Apache:

# sudo systemctl restart apache2

To check the HTTPS connection, direct a browser on another computer on the same netwerk to the newly configured web server. If the server has not been configured for DNS, you will need to point your browser to the IP address of the Entropy server, e.g. "https://192.168.0.5". To find this IP address, the following command on the server will give you one or more addresses.

# hostname -I 

You will receive an SSL warning as the SSL certificate of the server is a "self-signed" SSL certificate, this means that the browser does not trust this certificate by default and you have to accept the security warning first. After accepting the warning, you will see the apache default page again.

Remove the default landing page

# sudo rm /var/www/html/index.html

If your server is accessible from the internet, it is strongly advised to implement a trusted SSL certificate. Let's Encrypt offers free certificates. This tutorial is a good reference.

2. PHP 7.2

Install PHP and the PHP-apache module

# sudo apt install php libapache2-mod-php
# sudo systemctl restart apache2

3. E-mail (optional)

Entropy sends out e-mails for several reasons: alerts to the system administrator, 2-factor login codes to users (if enabled)... This step is optional - Entropy will work without - but recommended in order to be notified of errors or possible security threats. The installation of an SMTP server is outside the scope of this installation instructions. There are a number of guides on the internet that can be useful: e.g. [1], [2]

4. Entropy

Download the latest release of Entropy (which is Entropy 1.1 at the time of writing), extract the file and enter the directory:

# wget https://github.com/KIKIRPA/Entropy/archive/v1.1.tar.gz
# tar -xvzf v1.1.tar.gz
# cd Entropy-1.1

Alternatively, download the latest development version of Entropy from GitHub. BE AWARE THAT THE DEVELOPMENT VERSION CAN BE UNSTABLE AND BROKEN AT ANY TIME.

# git clone https://github.com/KIKIRPA/Entropy
# cd Entropy

Entropy has a basic setup script, that will aid you in installing, configuring and updating the software. It has been tested on different Linux distributions. By default, it will launch in an interactive mode and the default installation paths will be suitable for recent versions of Ubuntu. If you have another distribution, or your Ubuntu box already runs other web services, you might have to change the installation paths ("privpath" and "pubpath") and the group name of the apache server ("htgroup"). These can be set during the interactive mode, or can be preconfigured in a configuration file; an example of such a file tailored for Arch Linux is found in "conf.arch.example.json".

The following instructions will install Entropy in the default paths on Ubuntu 18.04:

# sudo php setup.php

The setup script will guide you through the installation and configuration. Default values for the questions are between square brackets; if enter is pressed without response, this default value will be used.

After this installation, Entropy should be fully functional.

Clone this wiki locally