This guide provides a detailed walkthrough for installing software on a Ubuntu Linux server.
The following instructions are tailored for a bare-metal server setup, specifically for a server named "sbe.example.com."
(For cloud installations, the 'cloud' folder contains configuration examples for Docker, Nua, SlaoOS.)
A user "sbe" with sudoer
rights.
sudo useradd -m -s /bin/bash -G sudo sbe
sudo su - sbe
List of packages to install with apt
:
default-jre
libreoffice-java-common
build-essential
python-dev
libpq-dev
libxslt1-dev
libjpeg-dev
libffi-dev
libsqlite3-dev
libbz2-dev
postgresql
redis
poppler-utils
imagemagick
libreoffice
clamav
nodejs
npm
honcho
curl
Optional (if using Nginx and Letsencrypt like service):
nginx
certbot
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.12 python3.12-dev python3.12-venv
sudo curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12
python3.12 -m venv venv
. venv/bin/activate
git clone --depth 1 --branch main https://github.com/abilian/abilian-sbe-monorepo.git
cd abilian-sbe-monorepo
pip install -U pip setuptools poetry
pip install .
sudo -u postgres psql
create database sbe;
create user sbe with encrypted password 'sbe';
grant all privileges on database sbe to sbe;
sudo systemctl start clamav-freshclam
sudo systemctl start clamav-daemon
sudo systemctl start redis
mkdir -p "${HOME}"/Maildir/{cur,new,tmp}
chmod 0700 "${HOME}"/Maildir/{cur,new,tmp}
This should be created by Flask at first start, however in the abilian-sbe-monorepo
directory:
mkdir -p ./src/instance
From abilian-sbe-monorepo
directory:
npm install --verbose
Check that lessc
is now available (or edit the related Flask
config variable for the actual path):
./node_modules/.bin/lessc --version
Expected result: lessc 4.2.0 (Less Compiler) [JavaScript]
If using Nginx, check you have configured nginx
with relevant SSL keys. See example file sbe.example.com
in this directory.
Note: The example nginx
configuration contains a permanent redirect for some static web resources. This can be adapted to the actual site configuration for static files. The other parts of the setup are otherwise pretty standard.
location ~ ^/static/min/abilian/web/resources/(.*) {
return 301 /static/abilian/$1 ;
}
See 'dot_env' file in this directory. Of course FLASK_*
variables can be declared using other Flask configuration methods.
This commands are required only once:
flask assets build
flask initdb
flask createuser --role admin --name admin [email protected] some_password
Create a local Procfile
containing those lines (adapt the gunicorn
configuration)
worker: flask worker
scheduler: flask scheduler
web: gunicorn extranet.wsgi:app -b :8000 --workers 4 --log-file -
And finally start the application using honcho
:
honcho -f Procfile start