ERP Software · 12 min read · Oct 23, 2025
Como instalar o ERPNext no Debian 9
ERPNext é um software ERP gratuito e de código aberto escrito em Python sobre o framework Frappe e inclui Contabilidade, Inventário, Manufatura, CRM, Vendas, Compras, Gestão de Projetos, HRMS e muito mais. O ERPNext é um sistema ERP simples, poderoso e fácil de usar. Ele vem com uma bela interface web que pode ser usada para gerenciar as tarefas do dia a dia a partir de um local central.
Neste tutorial, aprenderemos como instalar o software ERPNext no servidor Debian 9.
Pré-requisitos
- Um servidor rodando Debian 9.
- Um usuário não-root com privilégios sudo.
Começando
Antes de começar, é recomendável atualizar seu repositório de pacotes para a versão mais recente. Você pode fazer isso executando o seguinte comando:
sudo apt-get update -y
sudo apt-get upgrade -yEm seguida, reinicie o sistema para aplicar todas as alterações.
Instalar Dependências
O ERPNext requer a versão 2.7 do Python para funcionar corretamente. Você pode instalar o Python e outros pacotes necessários executando o seguinte comando:
sudo apt-get install python-minimal git build-essential python-setuptools python-dev libffi-dev libssl-dev curl -yVocê também precisará instalar a ferramenta pip do Python para instalar as dependências do Python. Você pode fazer isso executando o seguinte comando:
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.pyEm seguida, instale o ansible usando o comando pip:
sudo pip install ansibleInstalar Node.js, Redis e Nginx
Por padrão, a versão mais recente do Node.js não está disponível no Debian 9. Portanto, você precisará adicionar o repositório Nodesource para o Node.js 8.x. Você pode fazer isso executando o seguinte comando:
sudo curl --silent --location https://deb.nodesource.com/setup_8.x | sudo bash -Em seguida, instale o Node.js, Nginx e Redis executando o seguinte comando:
sudo apt-get install nodejs redis-server nginx -yUma vez que todos os pacotes estejam instalados, inicie o serviço Nginx e Redis e habilite-os para iniciar na inicialização com o seguinte comando:
sudo systemctl start nginx
sudo systemctl enable nginx
sudo systemctl start redis-server
sudo systemctl enable redis-serverInstalar e Configurar MariaDB
Por padrão, a versão mais recente do MariaDB não está disponível no repositório Debian 9. Portanto, você precisará adicionar o repositório do MariaDB para isso.
Primeiro, baixe e adicione a chave de assinatura ao seu sistema com o seguinte comando:
sudo apt-get install software-properties-common dirmngr
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8Em seguida, adicione o repositório do MariaDB usando o seguinte comando:
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.utexas.edu/mariadb/repo/10.2/debian stretch main'Finalmente, instale o servidor MariaDB com o seguinte comando:
sudo apt-get update -y
sudo apt-get install mariadb-server libmysqlclient-dev -yEm seguida, você precisará adicionar o mecanismo de armazenamento Barracuda ao arquivo de configuração do MariaDB para a criação de bancos de dados do ERPNext. Você pode fazer isso editando o arquivo my.cnf:
sudo nano /etc/mysql/my.cnfadicione as seguintes linhas:
[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4Salve e feche o arquivo quando terminar, em seguida, inicie o serviço MariaDB e habilite-o para iniciar na inicialização com o seguinte comando:
sudo systemctl restart mysql
sudo systemctl enable mysqlEm seguida, proteja o MariaDB executando o script mysql_secure_installation:
sudo mysql_secure_installationEste script definirá a senha do root, removerá usuários anônimos, desabilitará o login remoto do root e removerá o banco de dados de teste e o acesso para proteger o MariaDB, conforme mostrado abaixo:
Set root password? [Y/n] y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] yInstalar Conversor de PDF
Você também precisará instalar o wkhtmltopdf para converter HTML em PDF usando o mecanismo de renderização QT Webkit. Primeiro, instale as dependências necessárias usando o seguinte comando:
sudo apt-get install libxext6 xfonts-75dpi xfonts-base libxrender1 -yEm seguida, baixe a versão mais recente do wkhtmltopdf usando o seguinte comando:
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xzEm seguida, extraia o arquivo baixado para o diretório /opt:
sudo tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz -C /optEm seguida, crie um link simbólico para wkhtmltopdf usando o seguinte comando:
sudo ln -s /opt/wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
sudo ln -s /opt/wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdfInstalar Bench
Em seguida, você precisará instalar o Bench para instalar e gerenciar o aplicativo ERPNext em seu sistema. O Bench também é usado para criar e gerenciar configurações do Nginx e do supervisor.
Antes de instalar o Bench, você precisará adicionar um usuário para o Bench.
Primeiro, crie um usuário Bench com o seguinte comando:
sudo adduser benchEm seguida, forneça permissões sudo ao usuário bench.
sudo usermod -aG sudo benchEm seguida, faça login com o usuário Bench e clone o repositório do Bench com o seguinte comando:
su - bench
git clone https://github.com/frappe/bench bench-repoFinalmente, instale o Bench usando o comando pip:
sudo pip install -e bench-repoInstalar ERPNext
Em seguida, inicialize um diretório bench com o framework frappe instalado.
bench init erpnextEm seguida, mude o diretório para o erpnext e crie um novo site Frappe com o seguinte comando:
cd erpnext
bench new-site test.example.comO comando acima pedirá para fornecer a senha do root do MySQL e solicitará que você defina uma nova senha para a conta de administrador. A senha do administrador será necessária para fazer login no painel de administração mais tarde.
Em seguida, baixe os arquivos de instalação do ERPNext do repositório Git com o seguinte comando:
bench get-app erpnext https://github.com/frappe/erpnextEm seguida, instale o ERPNext em seu site recém-criado.
bench --site test.example.com install-app erpnextFinalmente, inicie o aplicativo Bench com o seguinte comando:
bench startUma vez que o aplicativo tenha iniciado com sucesso, você deve ver a seguinte saída:
13:40:10 system | redis_socketio.1 started (pid=2618)
13:40:10 system | worker_long.1 started (pid=2625)
13:40:10 system | watch.1 started (pid=2619)
13:40:10 system | redis_queue.1 started (pid=2626)
13:40:10 redis_socketio.1 | 2630:M 24 Feb 13:40:10.939 * Increased maximum number of open files to 10032 (it was originally set to 1024).
13:40:10 system | web.1 started (pid=2629)
13:40:11 system | schedule.1 started (pid=2634)
13:40:10 redis_socketio.1 | _._
13:40:10 redis_socketio.1 | _.-``__ ''-._
13:40:10 redis_socketio.1 | _.-`` `. `_. ''-._ Redis 3.0.6 (00000000/0) 64 bit
13:40:10 redis_socketio.1 | .-`` .-```. ```\/ _.,_ ''-._
13:40:10 redis_socketio.1 | ( ' , .-` | `, ) Running in standalone mode
13:40:10 redis_socketio.1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 12000
13:40:10 redis_socketio.1 | | `-._ `._ / _.-' | PID: 2630
13:40:10 redis_socketio.1 | `-._ `-._ `-./ _.-' _.-'
13:40:10 redis_socketio.1 | |`-._`-._ `-.__.-' _.-'_.-'|
13:40:10 redis_socketio.1 | | `-._`-._ _.-'_.-' | http://redis.io
13:40:10 redis_socketio.1 | `-._ `-._`-.__.-'_.-' _.-'
13:40:10 redis_socketio.1 | |`-._`-._ `-.__.-' _.-'_.-'|
13:40:10 redis_socketio.1 | | `-._`-._ _.-'_.-' |
13:40:10 redis_socketio.1 | `-._ `-._`-.__.-'_.-' _.-'
13:40:10 redis_socketio.1 | `-._ `-.__.-' _.-'
13:40:10 redis_socketio.1 | `-._ _.-'
13:40:10 redis_socketio.1 | `-.__.-'
13:40:10 redis_socketio.1 |
13:40:11 system | worker_default.1 started (pid=2639)
13:40:10 redis_socketio.1 | 2630:M 24 Feb 13:40:10.973 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
13:40:10 redis_socketio.1 | 2630:M 24 Feb 13:40:10.974 # Server started, Redis version 3.0.6
13:40:10 redis_socketio.1 | 2630:M 24 Feb 13:40:10.974 # 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.
13:40:10 redis_socketio.1 | 2630:M 24 Feb 13:40:10.974 # 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.
13:40:10 redis_queue.1 | 2635:M 24 Feb 13:40:10.976 * Increased maximum number of open files to 10032 (it was originally set to 1024).
13:40:10 redis_queue.1 | _._
13:40:10 redis_queue.1 | _.-``__ ''-._
13:40:10 redis_queue.1 | _.-`` `. `_. ''-._ Redis 3.0.6 (00000000/0) 64 bit
13:40:10 redis_queue.1 | .-`` .-```. ```\/ _.,_ ''-._
13:40:10 redis_queue.1 | ( ' , .-` | `, ) Running in standalone mode
13:40:10 redis_queue.1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 11000
13:40:10 redis_queue.1 | | `-._ `._ / _.-' | PID: 2635
13:40:10 redis_queue.1 | `-._ `-._ `-./ _.-' _.-'
13:40:10 redis_queue.1 | |`-._`-._ `-.__.-' _.-'_.-'|
13:40:10 redis_queue.1 | | `-._`-._ _.-'_.-' | http://redis.io
13:40:10 redis_queue.1 | `-._ `-._`-.__.-'_.-' _.-'
13:40:10 redis_queue.1 | |`-._`-._ `-.__.-' _.-'_.-'|
13:40:10 redis_queue.1 | | `-._`-._ _.-'_.-' |
13:40:10 redis_queue.1 | `-._ `-._`-.__.-'_.-' _.-'
13:40:10 redis_queue.1 | `-._ `-.__.-' _.-'
13:40:10 redis_queue.1 | `-._ _.-'
13:40:10 redis_queue.1 | `-.__.-'
13:40:10 redis_queue.1 |
13:40:10 redis_queue.1 | 2635:M 24 Feb 13:40:10.998 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
13:40:10 redis_queue.1 | 2635:M 24 Feb 13:40:10.999 # Server started, Redis version 3.0.6
13:40:11 redis_queue.1 | 2635:M 24 Feb 13:40:11.000 # 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.
13:40:11 redis_socketio.1 | 2630:M 24 Feb 13:40:11.000 * The server is now ready to accept connections on port 12000
13:40:11 system | socketio.1 started (pid=2637)
13:40:11 redis_queue.1 | 2635:M 24 Feb 13:40:11.029 # 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.
13:40:11 redis_queue.1 | 2635:M 24 Feb 13:40:11.029 * The server is now ready to accept connections on port 11000
13:40:11 system | redis_cache.1 started (pid=2652)
13:40:11 system | worker_short.1 started (pid=2651)
13:40:11 redis_cache.1 | 2660:M 24 Feb 13:40:11.100 * Increased maximum number of open files to 10032 (it was originally set to 1024).
13:40:11 redis_cache.1 | _._
13:40:11 redis_cache.1 | _.-``__ ''-._
13:40:11 redis_cache.1 | _.-`` `. `_. ''-._ Redis 3.0.6 (00000000/0) 64 bit
13:40:11 redis_cache.1 | .-`` .-```. ```\/ _.,_ ''-._
13:40:11 redis_cache.1 | ( ' , .-` | `, ) Running in standalone mode
13:40:11 redis_cache.1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 13000
13:40:11 redis_cache.1 | | `-._ `._ / _.-' | PID: 2660
13:40:11 redis_cache.1 | `-._ `-._ `-./ _.-' _.-'
13:40:11 redis_cache.1 | |`-._`-._ `-.__.-' _.-'_.-'|
13:40:11 redis_cache.1 | | `-._`-._ _.-'_.-' | http://redis.io
13:40:11 redis_cache.1 | `-._ `-._`-.__.-'_.-' _.-'
13:40:11 redis_cache.1 | |`-._`-._ `-.__.-' _.-'_.-'|
13:40:11 redis_cache.1 | | `-._`-._ _.-'_.-' |
13:40:11 redis_cache.1 | `-._ `-._`-.__.-'_.-' _.-'
13:40:11 redis_cache.1 | `-._ `-.__.-' _.-'
13:40:11 redis_cache.1 | `-._ _.-'
13:40:11 redis_cache.1 | `-.__.-'
13:40:11 redis_cache.1 |
13:40:11 redis_cache.1 | 2660:M 24 Feb 13:40:11.115 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
13:40:11 redis_cache.1 | 2660:M 24 Feb 13:40:11.115 # Server started, Redis version 3.0.6
13:40:11 redis_cache.1 | 2660:M 24 Feb 13:40:11.115 # 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.
13:40:11 redis_cache.1 | 2660:M 24 Feb 13:40:11.116 # 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.
13:40:11 redis_cache.1 | 2660:M 24 Feb 13:40:11.116 * The server is now ready to accept connections on port 13000
13:40:16 socketio.1 | listening on *: 9000
13:40:34 worker_long.1 | 13:40:34 RQ worker u'rq:worker:Node1.2632.long' started, version 0.10.0
13:40:34 worker_long.1 | 13:40:34 * Listening on long...
13:40:34 worker_long.1 | 13:40:34 Cleaning registries for queue: long
13:40:34 worker_default.1 | 13:40:34 RQ worker u'rq:worker:Node1.2646.default' started, version 0.10.0
13:40:34 worker_default.1 | 13:40:34 * Listening on default...
13:40:34 worker_default.1 | 13:40:34 Cleaning registries for queue: default
13:40:34 worker_short.1 | 13:40:34 RQ worker u'rq:worker:Node1.2661.short' started, version 0.10.0
13:40:34 worker_short.1 | 13:40:34 *** Listening on short...
13:40:34 worker_short.1 | 13:40:34 Cleaning registries for queue: short
13:40:34 web.1 | * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
Acessar a Interface Web do ERPNext
O ERPNext agora está instalado e roda na porta 8000. É hora de acessar a Interface Web do ERPNext.
Abra seu navegador e digite a URL http://test.exaple.com:8000, você será redirecionado para a seguinte página:

Aqui, forneça suas credenciais da conta de Administrador e clique no botão Entrar, você deve ver a seguinte página:

Aqui, escolha o idioma inglês e clique no botão Próximo, você deve ver a seguinte página:

Aqui, escolha seu País, Fuso Horário e Moeda, em seguida, clique no botão Próximo, você deve ver a seguinte página:

Aqui, forneça seu Nome, Email e Senha, em seguida, clique no botão Próximo, você deve ver a seguinte página:

Aqui, selecione seu Domínio como desejar, em seguida, clique no botão Próximo, você deve ver a seguinte página:

Aqui, forneça o nome e a abreviação da sua Empresa, em seguida, clique no botão Próximo, você deve ver a seguinte página:

Aqui, forneça os detalhes da sua Organização e clique no botão Completar Configuração, você deve ver a seguinte página:


Aqui, defina uma meta que você gostaria de alcançar para sua Empresa, em seguida, clique no botão Criar, você deve ver a seguinte página:

Aqui, clique no botão Próximo para continuar, você deve ver a seguinte página:

Aqui, adicione os clientes que você gostaria de adicionar, em seguida, clique no botão Criar, você deve ver a seguinte página:

Aqui, clique no botão Próximo para continuar, você deve ver a seguinte página:

Aqui, adicione seus fornecedores que você gostaria de adicionar, em seguida, clique no botão Criar, você deve ver a seguinte página:

Aqui, clique no botão Próximo para continuar, você deve ver a seguinte página:

Aqui, adicione seus produtos e serviços que você gostaria de comprar ou vender, em seguida, clique no botão Criar, você deve ver a seguinte página:

Aqui, clique no botão Próximo para continuar, você deve ver a seguinte página:

Aqui, adicione usuários à sua organização, em seguida, clique no botão Criar, você deve ver a página do painel do ERPNext:

Conclusão
Parabéns! você instalou e configurou com sucesso o ERPNext no servidor Debian 9. Agora você pode usar facilmente o aplicativo para gerenciar sua empresa. Para mais informações, consulte a página de documentação oficial do ERPNext em Doc.
Receba novas postagens na sua caixa de entrada
Sem spam. Cancele a assinatura a qualquer momento.