Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
erp:tryton:installation_ubuntu [2020/01/04 22:18] marclebrun [Installation de Tryton] |
— (Version actuelle) | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== Installer Tryton sous Ubuntu 18.04 ====== | ||
- | :!: **Cette page n'est pas complète, il manque l'installation du client web** :!: | ||
- | |||
- | Sources: | ||
- | * [[https://docs.tryton.org/projects/server/en/latest/|Documentation de Tryton]] | ||
- | * [[https://blog.lordvan.com/blog/tryton-setup-config/]] | ||
- | * [[https://www.devplus.fr/installation-de-tryton-serveur-5-2-avec-sao-sur-ubuntu-19-04/168]] | ||
- | |||
- | ===== Préparation de Python ===== | ||
- | |||
- | **Python 2** est en fin de vie ; **Python 3** est installé par défaut sous Ubuntu 18.04. | ||
- | |||
- | Depuis la version 5.0 de Tryton, ce dernier n'est compatible qu'avec Python 3, | ||
- | comme confirmé par Cédric Krier dans cette discussion : | ||
- | [[https://discuss.tryton.org/t/python2-expires-in-2020-what-about-tryton/2069]] | ||
- | |||
- | * Installer le module **setuptools** : | ||
- | |||
- | <code bash> | ||
- | sudo apt install python3-setuptools | ||
- | </code> | ||
- | |||
- | ===== 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** : | ||
- | |||
- | <code bash> | ||
- | sudo su - postgres | ||
- | createuser --interactive --pwprompt | ||
- | </code> | ||
- | |||
- | * 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** | ||
- | |||
- | <code bash> | ||
- | createdb -O tryton tryton1 | ||
- | </code> | ||
- | |||
- | ===== Installation de Tryton ===== | ||
- | |||
- | * Aller sur [[https://downloads.tryton.org/current/]] | ||
- | * Télécharger la dernière version **serveur** au format **tar.gz** | ||
- | * Nom du fichier : **trytond-X.Y.Z.tar.gz** | ||
- | |||
- | <code bash> | ||
- | wget http://downloads.tryton.org/5.4/trytond-5.4.2.tar.gz | ||
- | </code> | ||
- | |||
- | * Décompresser le fichier | ||
- | |||
- | <code bash> | ||
- | tar xvf trytond-5.4.2.tar.gz | ||
- | </code> | ||
- | |||
- | * Lancer l'installation | ||
- | |||
- | <code bash> | ||
- | cd trytond-5.4.2/ | ||
- | sudo python3 setup.py install | ||
- | </code> | ||
- | |||
- | ===== Configuration ===== | ||
- | |||
- | Créer un fichier **/etc/trytond.conf** : | ||
- | |||
- | <code bash> | ||
- | sudo mkdir /etc/tryton | ||
- | sudo vi /etc/tryton/trytond.conf | ||
- | </code> | ||
- | |||
- | <code ini /etc/tryton/trytond.conf> | ||
- | [web] | ||
- | listen = *:8000 | ||
- | root = /var/tryton-sao/ | ||
- | |||
- | [database] | ||
- | uri = postgresql://tryton:mypassword@localhost:5432/ | ||
- | path = /var/lib/tryton | ||
- | list = True | ||
- | |||
- | [ssl] | ||
- | |||
- | [jsonrpc] | ||
- | listen = *:8000 | ||
- | |||
- | [xmlrpc] | ||
- | |||
- | [webdav] | ||
- | listen = *:8080 | ||
- | |||
- | [session] | ||
- | timeout = 3600 | ||
- | </code> | ||
- | |||
- | ===== Générer les tables, les modules, l'administrateur ===== | ||
- | |||
- | <code bash> | ||
- | sudo trytond-admin -c /etc/tryton/trytond.conf -d tryton1 --all | ||
- | </code> | ||
- | |||
- | ^ -c FILE | spécifier le fichier de configuration | | ||
- | ^ -d DATABASE | spécifier la base de données | | ||
- | ^ --all | mise à jour de tous les modules installés | | ||
- | |||
- | Entrer les infos concernant l'administrateur : | ||
- | * Adresse email | ||
- | * Mot de passe | ||
- | * Confirmation du mot de passe | ||
- | |||
- | |||
- | ===== Lancement du serveur ===== | ||
- | |||
- | <code bash> | ||
- | sudo trytond -c /etc/tryton/trytond.conf -d tryton1 | ||
- | </code> | ||
- | |||
- | ^ -c FILE | spécifier le fichier de configuration | | ||
- | ^ -d DATABASE | spécifier la base de données | | ||
- | |||
- | ===== Installation du client web ===== | ||
- | |||
- | Le client web s'appelle **sao**. | ||
- | |||
- | <code bash> | ||
- | cd /var | ||
- | sudo wget https://downloads.tryton.org/5.4/tryton-sao-5.4.0.tgz | ||
- | sudo tar zvxf tryton-sao-5.4.0.tgz | ||
- | sudo mv package/ tryton-sao | ||
- | </code> | ||
- | |||
- | //... (à suivre) ...// |