How Can We Help?
< Retour
Vous êtes ici :
Print

Introduction

Installation d’ERPNext sur Ubuntu Server 16.04 LTS

Installation

Mise à jour du système

Mise à jour des dépots

sudo apt-get update

Mise à jour des paquets installés

sudo apt-get upgrade

Installation de GIT

sudo apt-get install git

Remarque : pas besoin déjà installé

Vérification

git --version
git version 2.7.4

Installation de Python (2.7)

sudo apt-get install python-dev

Installation de Pip pour Python

apt-cache search python-pip
sudo apt-get install python-pip

Installation de MariaDB

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.ubuntu-tw.org/mirror/mariadb/repo/10.3/ubuntu xenial main'

sudo apt-get update
sudo apt-get install mariadb-server-10.3

Password MariaDB SU : ***

Installation de « libmysqlclient-dev »

sudo apt-get install libmysqlclient-dev

Configuration de MariaDB

sudo nano /etc/mysql/my.cnf
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4
sudo service mysql restart

Installation de Redis

sudo apt-get install redis-server

Installation de Node.js

sudo apt-get install curl

Remarque : Pas besoin, déjà installé ?

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

sudo apt-get install -y nodejs

Installation de Yarn

sudo npm install -g yarn

Installation de Bench avec python-pip

git clone https://github.com/frappe/bench
pip install --user -e bench-repo

Vérification

bench --version
4.1.0

Initialisation

bench init frappe-bench

cd frappe-bench

Si erreur procfile

bench setup procfile

Création du site

bench new-site erpnext-prod.local

Note
Supprimer un site

bench drop-site erpnext-prod.local

Saisir le password root de MariaDB
***

Ajouter une apps

bench get-app erpnext https://github.com/frappe/erpnext

Installer une apps dans le site

bench --site erpnext-prod.local install-app erpnext

Note
Supprimer une app

sudo bench --site erpnext-server.corp.com uninstall-app erpnext

Démarrage

bench start

Se connecter

Avec un navigateur connecter vous sur l’ip avec le port 8000
192.168.x.x:8000
administrator
***

DEBUG

Location des log

/var/log/redis/redis-server.log

Erreur lors de la config web


Erreur 1 overcommit_memory

1335:M 06 Oct 22:51:47.326 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.

Modification

sudo nano /etc/sysctl.conf
...
# Add at the bottom of file
vm.overcommit_memory = 1
net.core.somaxconn=1024

Rechargement

sudo sysctl -p

Erreur 2 Transparent Huge Pages (THP)

1335:M 06 Oct 22:51:47.326 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command ‘echo never > /sys/kernel/mm/transparent_hugepage/enabled’ as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.

Modification

sudo nano /etc/rc.local
...
if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
...
exit 0

Erreur 3 number of open files 1024

09:33:15 redis_socketio.1 | 14141:M 08 Oct 09:33:15.342 * Increased maximum number of open files to 10032 (it was originally set to 1024).

Modification

sudo nano /etc/systemd/system/redis.service
[Service]
...
User=redis
Group=redis
# should be fine as long as you add it under [Service] block
LimitNOFILE=65536
...

Redemarrage

sudo systemctl daemon-reload

sudo systemctl restart redis.service

Verification
cat /run/redis/redis-server.pid
14238
cat /proc/PID/limits <= ???

Erreur 4 Address already in use

09:33:15 redis_socketio.1 | 14141:M 08 Oct 09:33:15.351 # Creating Server TCP listening socket 127.0.0.1:12000: bind: Address already in use

Modification

Soon

Sources et Remerciements

  • https://erpnext.org/get-started
  • https://github.com/frappe/bench
  • https://github.com/frappe/frappe/wiki/The-Hitchhiker’s-Guide-to-Installing-Frapp%C3%A9-on-Linux-OS
  • JC
Table of Contents