How To Install ERPNext ERP System on Ubuntu 20.04/18.04
source link: https://computingforgeeks.com/how-to-install-erpnext-erp-system-on-ubuntu/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
ERPNext is a simple yet free and open source ERP system written using Frappe framework – a full-stack web app framework in Python & JavaScript. In this guide, we will cover How to Install ERPNext ERP System on Ubuntu 20.04/18.04 Linux . ERPNext is a feature-rich enterprise ready ERP system which has good features like:
- Accounting Management
- Inventory Management
- Manufacturing Management
- Customer Relationship Management system
- Sales Management
- Purchase Management
- Project Management
- Huma Resource Management System and more.
ERPNext ERP system is fit for both small and medium enterprises. It comes with a well-baked web interface with all functionalities of an ERP system.
For Debian, use: Install ERPNext ERP System on Debian
Most ERPs can run slowly after installation. For example, you are waiting a long time for the report results, or it takes too much time to process data when loading. It is often the case, but you can quickly solve it by tuning the server or optimizing the database.
ERPNext Setup Pre-requisites:
- Updated Ubuntu 18.04 Bionic Beaver Linux
- A user with sudo privileges
- Python 2.7 [Python3.5+ also supported, but not recommended for production]
- MariaDB Database Server
- Nodejs, Nginx, yarn, redis, wkhtmltopdf
Install ERPNext on Ubuntu 20.04/18.04
Let’s start ERPNext installation by making sure our system is updated:
sudo apt update
sudo apt -y upgrade
It is recommended to reboot your system whenever you do upgrade:
sudo reboot
Step 1: Install Python Tools & wkhtmltopdf
Start the installation process by ensuring all Python build packages required to build and setup ERPNext are installed:
--- Ubuntu 20.04 ---
sudo apt -y install vim libffi-dev python3-pip python3-dev python3-testresources libssl-dev wkhtmltopdf
--- Ubuntu 18.04 ---
sudo apt -y install vim libffi-dev python-pip python-dev libssl-dev wkhtmltopdf
Step 2: Install Redis and Node.js
To install Redis and Node.js on Ubuntu 20.04/18.04, run the commands:
sudo curl --silent --location https://deb.nodesource.com/setup_10.x | sudo bash -
sudo apt -y install gcc g++ make nodejs redis-server
sudo npm install -g yarn
Step 3: Install Nginx web server and MariaDB Database server
Next step is to Nginx and MariaDB for serving ERPNext and storing database data respectively.
Install Nginx using:
sudo apt -y install nginx
For installation of MariaDB server on Ubuntu:
sudo apt install mariadb-server
Change authentication plugin.
$ sudo mysql -u root
USE mysql;
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
FLUSH PRIVILEGES;
EXIT;
Ensure you have the following settings for mysqld and mysql client as provided:
$ sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf [mysqld] character-set-client-handshake = FALSE character-set-server = utf8mb4 collation_server = utf8mb4_unicode_ci [mysql] default-character-set = utf8mb4
After the installation of MariaDB database server, you should create a database for erpnext user.
sudo systemctl restart mariadb
Step 4: Install Bench and ERPNext
A bench is a tool used to install and manage ERPNext on your Ubuntu system. We will create a user that will run the ERPNext system, then configure the system.
sudo useradd -m -s /bin/bash erpnext
sudo passwd erpnext
sudo usermod -aG sudo erpnext
Update your PATH.
$ sudo su - erpnext
$ tee -a ~/.bashrc<<EOF
PATH=\$PATH:~/.local/bin/
EOF
$ source ~/.bashrc
Create a directory for ERPNext setup and give erpnext
user read and write permissions to the directory:
sudo mkdir /srv/bench
sudo chown -R erpnext /srv/bench
Next switch to erpnext user and install the application:
sudo su - erpnext
cd /srv/bench
Clone Bench code from github using git
$ git clone https://github.com/frappe/bench bench-repo Cloning into 'bench-repo'... remote: Counting objects: 5832, done. remote: Compressing objects: 100% (43/43), done. remote: Total 5832 (delta 20), reused 20 (delta 6), pack-reused 5783 Receiving objects: 100% (5832/5832), 29.61 MiB | 17.62 MiB/s, done. Resolving deltas: 100% (3720/3720), done.
Now install bench using pip command:
--- Ubuntu 20.04 ---
pip3 install -e bench-repo
--- Ubuntu 18.04 ---
pip install -e bench-repo
The next step is to initialize the bench directory with frappe framework installed:
cd /srv/bench
bench init erpnext
A sample output is:
.......
Production mode
✔ Built js/moment-bundle.min.js
✔ Built js/libs.min.js
Building frappe assets...
✔ Built js/checkout.min.js
✔ Built js/dialog.min.js
✔ Built js/social.min.js
✔ Built js/web_form.min.js
✔ Built js/list.min.js
✔ Built js/chat.js
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade caniuse-lite browserslist`
✔ Built css/tailwind.css
✔ Built js/desk.min.js
✔ Built css/frappe-rtl.css
✔ Built css/printview.css
✔ Built js/barcode_scanner.min.js
✔ Built js/bootstrap-4-web.min.js
✔ Built js/frappe-recorder.min.js
✔ Built css/list.min.css
✔ Built css/report.min.css
✔ Built frappe/css/email.css
✔ Built js/frappe-web.min.js
✔ Built css/frappe-chat-web.css
✔ Built css/form.min.css
✔ Built js/control.min.js
✔ Built js/form.min.js
✔ Built css/web_form.css
✔ Built css/desk.min.css
✔ Built css/frappe-web-b4.css
✔ Built js/data_import_tools.min.js
✔ Built js/report.min.js
✨ Done in 100.386s
Done in 101.55s.
INFO:bench.utils:setting up backups
SUCCESS: Bench erpnext initialized
Create a new Frappe site.
$ cd erpnext $ bench new-site erp.computingforgeeks.com MySQL root password: Installing frappe... Updating DocTypes for frappe : [========================================] Updating country info : [========================================] Set Administrator password: <input-admin-pass> Re-enter Administrator password: <confirm-admin-pass> *** Scheduler is disabled ***
The above command will ask you to provide the MySQL root password and set a new password for the administrator account for the web interface. Wait for the new Frappe site to be created, then
Step 5: Starting ERPNext application and access UI
Once the application is deployed, you can start it using the command:
$ bench start
When the program is running, you should get:
12:49:02 redis_queue.1 | 30491:M 18 Jul 12:49:02.630 * Ready to accept connections
12:49:03 socketio.1 | listening on *: 9000
12:49:08 web.1 | * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
12:49:09 web.1 | * Restarting with inotify reloader
12:49:09 watch.1 | yarn run v1.7.0
12:49:09 watch.1 | $ node rollup/watch.js
12:49:09 web.1 | * Debugger is active!
12:49:09 web.1 | * Debugger PIN: 849-623-753
12:49:10 watch.1 |
12:49:10 watch.1 | Rollup Watcher Started
12:49:10 watch.1 |
From the output, you can confirm the service is running on http://0.0.0.0:8000/. To access the web interface, open the server IP address and port http://ip-address:8000.
Step 6: Configure Nginx and Supervisord
Install supervisor:
sudo apt -y install supervisor
Run production configuration script:
$ sudo bench setup production erpnext supervisor.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y Port configuration list: Site erp.computingforgeeks.com assigned port: 80 nginx.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y INFO:bench.utils:sudo /usr/bin/supervisorctl reread No config updates to processes INFO:bench.utils:sudo /usr/bin/supervisorctl update nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful INFO:bench.utils:sudo systemctl reload nginx
Generated Nginx file is placed under: /etc/nginx/conf.d/erpnext.conf and supervisor config file is /etc/supervisor/conf.d/erpnext.conf.
Open your application domain configured to login- //erp.computingforgeeks.com
You should get a page to login. Use the username Administrator and the password you provided during setup.
Select the language of your choice and click “Next“. Next select country, it will fill currency automatically.
Add the first user with email and password and click “Complete Setup” button.
When done, you should get to ERPNext web dashboard.
Similar guides:
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK