How to install ERPNext

ERPNext is an ERP tools web based  with lot of features (accounting, stock, project,…)

Before start the installation

Check your ip address

$ ifconfig

Make an update / upgrade

$ sudo apt-get update

$ sudo apt-get upgrade


Install the requirement for python

$ sudo apt-get install python-minimal

$ sudo apt-get install build-essential python-setuptools

Download the easy installation script

$ wget

Run the script

$ sudo python –production

How to run the site in HTTPS, with let’s encrypt certificate

Log as frappe user

$ sudo su root

$ sudo su – frappe

Go to folder sites

$ cd frappe-bench/sites

$ mv site1.local


$ nano

$ cd ..

$ bench config dns_multitenant on

$ sudo -H bench setup lets-encrypt

Error to solved

When you go to the help on ERPNext, you have this error:

To avoid this, you need to migrate the bench framework. With this command:

$ bench –site migrate


For more details:


Quick tutorial to Install, Run and Monitor Logstash in Elastic infrastructure

Logstash is an open source, server-side data processing pipeline that ingests data from a multitude of sources simultaneously, transforms it, and then sends it to your favorite “stash.”

For this tutorial, I use a Ubuntu server installation with default package and default installation of Elastic stack.


Download the logstash package, the last version is available here.

$ wget

Run  the dpkg command to install:

$ sudo dpkg -i  logstash-5.1.2.deb

Logstash config

Each .conf files in the /usr/share/logstash folder contains the scripting for each « flow ». Just add an other script file to create a new logstash instance.

The script example below, will analyse the network connection port based on syslog event.

So, go to the default logstash folder and create a new scripting file:

$ cd /usr/share/logstash
$ sudo nano logstash-simple.conf

Copy / paste this script:

input {
 tcp {
 port => 5000 # syslog port. can be changed
 type => syslog
 udp { #optional. required if syslog events are sent using UDP.
 port => 5000
 type => syslog
#Do not change the contents of filter codec
filter {
 if [type] == "syslog" {
 grok {
 match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:hostname} $
 date {
 match => [ "syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]

output {
 elasticsearch {
 hosts => [""] #change host as required
 user=> "elastic"
 password=> "changeme"

And save the file.

Edit the rsyslog.conf to activate the event:

$ sudo nano /etc/rsyslog.conf

And add this:

*.* @@
*.* @

START logstash

The command below start an new agent based on the config file:

$ cd /usr/share/logstash
$ sudo bin/logstash -f logstash-simple.conf


Now, I create a new config file for monitoring Logstash. The script reads log files and import the data into Elasticsearch. The final touch was it will be available on Kibana!

First, create a config file to specify the log and the Elasticsearch cluster:

input {
 file {
 path => "/var/log/logstash/logstash-plain.log"
 start_position => "beginning"
 type => "logs"
output {
 elasticsearch {
 hosts => ""
 user => "elastic"
 password => "changeme"
 index => "logstash-test-%{+YYYY.MM.dd}"

Copy it to the default conf.d folder of Logstash:

Now restart the service with the service command:

$ sudo service logstash restart

Finally, go to Kibana and create a new index pattern name « logstash-test-* »

All logs are now available via Elasticsearch and Kibana.

MONITOR with kibana

To see beautifull graphs about logstash, you need x-pack features.

install x-pack

run the command below to install x-pack for logstash:

$ sudo ./bin/logstash-plugin install x-pack
Configure x-pack

Modify the yml files and add parameter at the end of the file:

xpack.monitoring.enabled: "true"
 xpack.monitoring.elasticsearch.url: "http://localhost:9200"
 xpack.monitoring.elasticsearch.username: "elastic"
 xpack.monitoring.elasticsearch.password: "changeme"

Restart logstash and kibana with the service command,

A welcome dashboard is now available about your Logstash agent.

How to quickly install Elasticsearch on Ubuntu server

This guide contained a quick reference on how to install Elastic search on ubuntu server 16.04 via deb package.

Download the package via wget command (click here for the last version):

 $ wget

Then unpackage the deb file:

$ sudo dpkg -i elasticsearch-5.2.2.deb

The command to set as startup:

$ sudo update-rc.d elasticsearch defaults 95 10

 And the usefull startup command:

$ sudo -i service elasticsearch start
$ sudo -i service elasticsearch stop

Now start your browser to check if Elasticsearch running (default port is 9200) :

The Debian package places config files, logs, and the data directory in the appropriate locations for a Debian-based system:

Type Description Default Location Setting
home Elasticsearch home directory or $ES_HOME /usr/share/elasticsearch
bin Binary scripts including elasticsearch to start a node and elasticsearch-pluginto install plugins /usr/share/elasticsearch/bin
conf Configuration files including elasticsearch.yml /etc/elasticsearch path.conf
conf Environment variables including heap size, file descriptors. /etc/default/elasticsearch
data The location of the data files of each index / shard allocated on the node. Can hold multiple locations. /var/lib/elasticsearch
logs Log files location. /var/log/elasticsearch path.logs
plugins Plugin files location. Each plugin will be contained in a subdirectory. /usr/share/elasticsearch/plugins
repo Shared file system repository locations. Can hold multiple locations. A file system repository can be placed in to any subdirectory of any directory specified here. Not configured path.repo
script Location of script files. /etc/elasticsearch/scripts path.scripts