How to Install ERPNext on Ubuntu 18.04
We explain to you how to Install ERPNext on Ubuntu 18.04 manually. Specially for those who have facing issue while Install ERPNext on Ubuntu using script. But in this article, explain to you how to install ERPNext on Ubuntu 18.04 manually.
Install ERPNext on Ubuntu 18.04
Before we start installing, we have to know about what is ERPNext? ERPNext is a free and open-source integrated web-based ERP software developed by Frappe. ERPNext is used by manufacturers, distributors and services companies. In ERPNext offer large number of Apps like accounting, sales, CRM, purchasing, and many more. So let’s start how to install ERPNext on Ubuntu 18.04 manually.
Steps for Install ERPNext on Ubuntu 18.04
Step 1 Update and Upgrade APT
Update APT list of available packages and their versions. And use
upgrade command to actually installs newer versions of the packages.
sudo apt-get update && sudo apt-get upgrade
Step 2 Install Python
First of all, you have to install Python 2.7 for ERPNext. Moreover, you can also verify Python version.
sudo apt -y install python-minimal
$ python -V Python 2.7.15rc1
Step 3 Install Dependencies
You have to install the following dependencies.
sudo apt -y install git build-essential python-setuptools python-dev libffi-dev libssl-dev
Step 4 Install Python
You need to execute the following command to install
pip package manager.
wget https://bootstrap.pypa.io/get-pip.py sudo python get-pip.py
Execute the following command to verify that you have the latest version of
sudo pip install --upgrade pip setuptools
ansible module using
pip. Ansible pip module automates manage Python libraries and configuration.
sudo pip install ansible
Step 5 Install curl and yarn
First, you have to install
sudo apt -y install curl
Later you have to configure the
yarn package repository.
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
Next, execute the following command to install
sudo apt -y update && sudo apt -y install yarn
Step 6 Install MariaDB
You have to run the following command to install MariaDB.
sudo apt -y install mariadb-server libmysqlclient-dev
When creating ERPNext database, you need to enable barracuda storage engine. So you need first to configure MariaDB configuration
sudo nano /etc/mysql/my.cnf
Add the following lines at the end of
[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 = utf8mb4
Next, you have to restart MariaDB and enable it to auto start MariaDB at boot time.
sudo systemctl restart mariadb sudo systemctl enable mariadb
mysql_secure_installation tool to configure additional security options.
This tool will ask if you want to set a new password for the MySQL root user and few security related questions.
Set root password? [Y/n] y New password: Re-enter new password: Password updated successfully!
Security questions, answer
- Remove anonymous users?
- Disallow root login remotely?
- Remove test database and access to it?
- Reload privilege tables now?
Step 7 Install Nginx, Node.js and Redis
You have to add the Node source Node.js 8.x repository.
sudo curl --silent --location https://deb.nodesource.com/setup_8.x | sudo bash -
To install Nginx, Node.js and Redis on Ubuntu, run the commands below.
sudo apt -y install nginx nodejs redis-server
After installing, start and enable Nginx service to always start up with the boots.
sudo systemctl start nginx sudo systemctl enable nginx
Start and enable Redis service to always start up with the boots.
sudo systemctl start redis-server sudo systemctl enable redis-server
Step 8 Install wkhtmltopdf and fonts
Execute the following command to install
wkhtmltopdf, fonts and other required dependencies.
sudo apt -y install libxrender1 libxext6 xfonts-75dpi xfonts-base
Download the compressed file of wkhtmltopdf and extract to
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz sudo tar -xf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz -C /opt
Next, you have to create a soft link to access and execute wkhtmltopdf and wkhtmltoimage globally as a command.
sudo ln -s /opt/wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf sudo ln -s /opt/wkhtmltox/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
Even more, you can check version of wkhtmltopdf.
$ wkhtmltopdf -V wkhtmltopdf 0.12.4 (with patched qt)
Step 9 Install and Create Virtual Environment
A virtual environment is a tool that helps to keep separate dependencies by different projects to creating isolated python virtual environments for them. A virtual environment is the essential tools that most of the Python developers use.
First of all, in your home directory create new folder. Go to that folder.
mkdir erpnext cd erpnext/
Run below command to install virtual environment.
sudo apt install virtualenv
Furthermore, you need to create virtual environment on “erpnext” directory using the following command.
Even more, you have to activate virtual environment using below command.
Step 10 Install Bench
Bench is a command line utility to install, manage multiple sites and manage the ERPNext application on a Unix-based system.
git clone https://github.com/frappe/bench bench-repo sudo pip install -e bench-repo
Step 11 Create a new bench
init command will create a bench directory with frappe framework installed.
bench init --frappe-branch master --frappe-path https://github.com/frappe/frappe.git frappe-bench
Now you have to go
Step 12 Get ERPNext Apps
get-app command gets remote frappe apps from a remote git repository and installs them.
bench get-app --branch master erpnext https://github.com/frappe/erpnext.git
Step 13 Create new site
Frappe sites run frappe apps. So you have to create at least one site. Using the following command to create a new site.
bench new-site testsite
Step 14 Install Apps (Install ERPNext on Ubuntu 18.04)
Use the bench
install-app command to install an app on your site.
bench --site testsite install-app erpnext
Step 15 Start bench
Use the bench start command to start using the bench.
Finally, go to your web browser open your server IP address with 8000 port number
http://0.0.0.0:8000 and you will see the ERPNext login screen. Here you have to log in with username “administrator” and password as per you set when you created the new site.
Final Thoughts (Install ERPNext on Ubuntu 18.04)
This article walked you through the install ERPNext on Ubuntu 18.04 manually with install all prerequisites install step by step guide you. However, you can go thru this article to install ERPNext using the installation script.
If you like our article, please consider buying a coffee for us.
Thanks for your support!
Buy me a coffee!