Pre-Requisites

You should have already done these steps:

  1. Check Hardware provisioning

Note

This page describes in a human fashion the pre-requisites for Asqatasun. If you want code that automates stuff with no further explanation, leverage our bootstrap.sh from Asqatasun-Vagrant.

Supported OSes (yet)

  • Debian 11 bullseye
  • Ubuntu 18.04

Required packages - Debian 11

apt-get --no-install-recommends install \
    openjdk-8-jre          \
    libgtk-3-0             \
    libdbus-glib-1-2       \
    libx11-xcb1            \
    libxt6                 \
    haveged                \
    mysql-server

Note: MariaDB support is in progress (see issue #504), any help is warmly welcome!

Required packages - Ubuntu 18.04

apt-get --no-install-recommends install \
    openjdk-8-jre          \
    libgtk-3-0             \
    libdbus-glib-1-2       \
    haveged                \
    mysql-server

Note: MariaDB support is in progress (see issue #504), any help is warmly welcome!

Database

Create a database and the associated user:

unset HISTFILE    # Do not keep the following commands in history
DB_DATABASE='asqatasun'
DB_USER='asqatasunDatabaseUserLogin'
DB_PASSWORD='asqatasunDatabaseUserP4ssword'
DB_TOHOST='localhost'

mysql -u root -e "CREATE USER ${DB_USER}@${DB_TOHOST} IDENTIFIED BY \"${DB_PASSWORD}\";"
mysql -u root -e "CREATE DATABASE ${DB_DATABASE} CHARACTER SET utf8;"
mysql -u root -e "GRANT ALL PRIVILEGES ON ${DB_DATABASE}.* TO ${DB_USER}@${DB_TOHOST};"
mysql -u root -e "FLUSH PRIVILEGES;"

Database timezone

To use a named-timezone like Europe/Paris, we need first to fulfill Mysql tables, as per Mysql 5.7 doc: Timezone installation.

As root, populate Mysql tables:

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

From Mysql (as root user), define your named timezone:

SET GLOBAL time_zone = 'Europe/Paris';
SET time_zone = 'Europe/Paris';

You can verify with:

SELECT @@GLOBAL.time_zone, @@SESSION.time_zone;

Note: this acts only for the current session, if you restart Mysql the timezone will be lost. To set this configuration permanent, proceed to next paragraph.

Database server configuration

cat >/etc/mysql/mysql.conf.d/z_asqatasun.cnf <<EOF
[client]
default-character-set=utf8mb4

[mysql]
default-character-set=utf8mb4

[mysqld]
default_time_zone=Europe/Paris
collation-server=utf8mb4_general_ci
init-connect='SET NAMES utf8mb4'
character-set-server=utf8mb4
max_allowed_packet=64M
innodb_file_per_table
innodb_log_file_size=1G
innodb_buffer_pool_size=4G
# CAUTION we must respect the ratio:
# innodb_buffer_pool_size = 4 x innodb_log_file_size
EOF

Notes:

  • Replace Europe/Paris with the suitable timezone for you
  • Naming the file z_asqatasun.cnf (beginning with a “z”) is important as it must be loaded after mysqld.cnf.
  • Do not forget to restart Mysql server: systemctl restart mysql.service.

Firefox ESR

  • Firefox ESR
  • Gecko Driver
FIREFOX_VERSION="91.4.1esr"
GECKODRIVER_VERSION="v0.30.0"
FIREFOX_URL_PREFIX="https://download-installer.cdn.mozilla.net/pub/firefox/releases/"
GECKODRIVER_URL_PREFIX="https://github.com/mozilla/geckodriver/releases/download/"
FIREFOX_URL="${FIREFOX_URL_PREFIX}${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2"
GECKODRIVER_URL="${GECKODRIVER_URL_PREFIX}${GECKODRIVER_VERSION}/geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz"

cd /opt
sudo wget "${FIREFOX_URL}"
sudo wget "${GECKODRIVER_URL}"
sudo tar xf "firefox-${FIREFOX_VERSION}.tar.bz2"
sudo tar xf "geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz"

Please note that Firefox version does matter: if you use different version, we cannot guaranty anything.

Mail SMTP

Asqatasun works better with email (informing you when an audit is finished, or if gives an error). Here are the steps to install locally an SMTP server. You can also use online services such as MailJet or Mandrill and configure it into /etc/asqatasun/asqatasun.org

Install the following packages:

sudo apt-get install postfix mailutils
sudo dpkg-reconfigure postfix

Once the configuration is displayed, options to take are :

  • Configuration type: Satellite system
  • SMTP relay: leave it empty (this is the trick, don’t type anything here)

Next step

Congratulations, you survived the manual pre-requisites stage :)

You can go to Installation.