====== Installer Tryton sous Ubuntu 18.04 (alternative) ======
:!: **Cette page n'est pas complète, l'installation ne fonctionne pas.** :!:
Source:
* [[https://www.devplus.fr/installation-de-tryton-serveur-5-2-avec-sao-sur-ubuntu-19-04/168]]
===== Mettre à jour le système =====
sudo apt-get update
sudo apt-get upgrade
===== Tester la présence de Python 3 =====
python3 --version
===== Installation de PIP et des dépendances =====
sudo apt install python-pip
sudo pip install -U pip
cd /tmp/
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo apt install curl
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo apt install python3-distutils libpq-dev
===== Installation de Tryton =====
sudo apt install python3-dev
sudo pip install trytond
sudo pip install tryton
===== Installation de Postgresql =====
Se référer à [[postgresql:installation_postgresql_10_ubuntu_1804]]
Créer un utilisateur **tryton** et une base de données **tryton1** :
sudo su - postgres
createuser --interactive --pwprompt
* Enter name of role to add: **tryton**
* Enter password of new role: **(un mot de passe)**
* Enter it again: **(un mot de passe)**
* Shall the new role be a superuser? (y/n) **n**
* Shall the new role be allowed to create databasees? (y/n) **n**
* Shall the new role be allowed to create more new roles? (y/n) **n**
Créer la base de données :
createdb -O tryton tryton1
Revenir à l'utilisateur normal :
exit
===== Création du fichier de configuration =====
cd /etc
sudo mkdir tryton
cd tryton
sudo vi tryton.conf
Contenu :
[database]
uri = postgresql://tryton:password@localhost/
[web]
listen = *:8000
===== Initialisation de la base de données =====
trytond-admin -c /etc/tryton/tryton.conf -d test-tryton –all