ERPNext
ERPNext and Frappe are powerful open-source frameworks for business management and custom application development. Frappe 15 is the foundation for ERPNext 15, providing a robust backend to manage your business operations effectively. If you're using Ubuntu 22.04, this guide will walk you through the complete installation of Frappe 15 and ERPNext 15.
Let's examine the detailed step-by-step process for getting Frappe and ERPNext up and running on your Ubuntu server.
To organize the setup process, first create a dedicated folder where all your files and configurations will reside.
mkdir frappe-erpnext-setup
cd frappe-erpnext-setup
This will help keep all your files neatly organized as you install Frappe and ERPNext.
The next step is to install Python and set up a virtual environment, ensuring that you have an isolated environment for the Frappe and ERPNext installation.
sudo apt install python3-dev python3-venv
This installs python3-venv
to manage isolated Python environments and python3-dev
to compile necessary packages.
Now create a virtual environment using Python:
python3 -m venv myenv
This command creates a new folder called myenv
containing a fresh Python environment, separate from your system Python installation.
Activate the environment by running:
source myenv/bin/activate
After activation, your terminal prompt will change to indicate that you're now inside the myenv
virtual environment. Everything installed here will be contained within this environment.
Before proceeding, ensure your system is up-to-date by updating and upgrading all installed packages.
sudo apt-get update -y
sudo apt-get upgrade -y
This will make sure that all software on your machine is current, which helps avoid compatibility issues later on.
Git is required to clone repositories, including Frappe and ERPNext source code.
sudo apt-get install git
Git will allow you to clone the Frappe and ERPNext code repositories directly from GitHub.
Install additional Python and development packages needed for ERPNext.
sudo apt-get install python3-dev python3.10-dev python3-setuptools python3-pip python3-distutils
These packages ensure that Python dependencies are correctly built during the setup.
This package helps in managing software repositories and adding PPAs (Personal Package Archives).
sudo apt-get install software-properties-common
MariaDB is the database used by Frappe/ERPNext. Install it by running:
sudo apt install mariadb-server mariadb-client
MariaDB is a fork of MySQL and is used to manage all database operations in ERPNext.
Redis is required for background job management in Frappe.
sudo apt-get install redis-server
Redis will handle caching and message brokering for real-time communication within Frappe.
You will also need some additional system packages, such as wkhtmltopdf
(for PDF generation) and MySQL development libraries.
sudo apt-get install xvfb libfontconfig wkhtmltopdf
sudo apt-get install libmysqlclient-dev
These packages are essential for various functionalities, including generating PDFs and connecting to MariaDB.
Now configure the MariaDB server by securing the installation and adjusting settings.
Run the MySQL secure installation script:
sudo mysql_secure_installation
You will be prompted with several options. Follow these answers:
Open the MySQL configuration file and adjust settings for character encoding:
sudo nano /etc/mysql/my.cnf
Add the following block of code to ensure proper character handling:
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
Save and close the file (Ctrl + X
, then Y
, then Enter
).
Apply the configuration changes by restarting the MySQL service:
sudo service mysql restart
Now install curl
and Node.js
, which are needed to run JavaScript dependencies for Frappe.
sudo apt install curl
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
nvm install 18
Next, install NPM and Yarn (a package manager used for managing front-end dependencies):
sudo apt-get install npm
sudo npm install -g yarn
Frappe Bench is a command-line tool that helps manage Frappe/ERPNext applications.
sudo pip3 install frappe-bench
Now initialize Frappe Bench in the current directory, specifying the branch for Frappe 15:
bench init --frappe-branch version-15 frappe-bench
This will take some time, as it downloads and installs all the dependencies required for Frappe 15.
Navigate to the newly created frappe-bench
directory:
cd frappe-bench
Now create a new Frappe site where ERPNext will be installed:
bench new-site localhost
This command will set up a fresh Frappe site. You will be prompted to set the MySQL root password and administrator password for the site.
Once the site is created, install ERPNext and other necessary apps:
bench get-app --branch version-15 erpnext
bench --site localhost install-app erpnext
You can also install additional apps, such as HRMS:
bench get-app --branch version-15 hrms
bench --site localhost install-app hrms
For apps hosted on GitHub or GitLab, you can install them by specifying the repository URL:
bench --site localhost <GitHub or GitLab link>
Finally, start the Frappe development server:
bench start
Visit http://localhost:8000
in your browser to access your Frappe and ERPNext installation. Use the admin credentials you set during site creation to log in.
Implementing Frappe and ERPNext can significantly enhance your business operations by providing an integrated platform for managing various aspects of your organization. With the flexibility to customize and extend functionalities, you can tailor the system to align perfectly with your business processes. Regular maintenance, updates, and community engagement will ensure that your ERP system remains robust, secure, and efficient.
Thank you for following this step-by-step guide. We hope it has been helpful in setting up your ERPNext environment. Should you encounter any challenges or have further questions, don't hesitate to reach out to the vibrant Frappe and ERPNext communities or consult the official documentation for more detailed information.
Happy managing!