How to Install ERPNext on Fedora Server Latest?
ERPNext is an open-source ERP software that offers financial accounting, inventory management, CRM, HR, project management, and e-commerce functionalities. In this tutorial, we will guide you step-by-step on how to install ERPNext on Fedora Server Latest.
Prerequisites
Before installing ERPNext, make sure your server meets the following requirements:
- Fedora Server Latest version is installed and updated.
- Your server has at least 2GB of RAM.
- Your server has 10GB of available disk space.
- Python 3.5 or later version is installed.
Step 1 – Install Required Packages
To install ERPNext, we need to install the following packages:
sudo dnf install -y git mariadb mariadb-server nginx redis
Step 2 – Configure MariaDB and Create a Database
After installing the packages, we need to configure MariaDB and create a database for ERPNext. Follow the below steps:
- Start the MariaDB service:
sudo systemctl start mariadb
- Set the MariaDB root user password:
sudo mysql_secure_installation
- Login to MariaDB as the root user:
sudo mysql -u root -p
- Create a database for ERPNext:
CREATE DATABASE erpnext;
- Create a new user for ERPNext:
CREATE USER 'erpnext'@'localhost' IDENTIFIED BY 'password';
- Grant all privileges to the erpnext user:
GRANT ALL PRIVILEGES ON erpnext.* TO 'erpnext'@'localhost';
- Flush the privileges:
FLUSH PRIVILEGES;
- Exit from the MariaDB:
EXIT;
Step 3 – Install and Configure Redis
We need to install Redis to use it as a cache and message broker. Follow the below steps to install and configure Redis:
- Start the Redis service:
sudo systemctl start redis
- Enable the Redis service to start at boot time:
sudo systemctl enable redis
- Open the
/etc/redis.conffile:
sudo nano /etc/redis.conf
Uncomment the
supervised systemdoption by removing the#in front of it.Restart the Redis service:
sudo systemctl restart redis
Step 4 – Install and Configure Bench
Bench is a command-line tool used to install and manage ERPNext. Follow the below steps to install and configure Bench:
- Install Bench using pip3:
sudo dnf install -y python3-pip
sudo pip3 install frappe-bench
- Create a new directory for the ERPNext installation:
sudo mkdir /opt/erpnext
sudo chown -R youruser:youruser /opt/erpnext
- Change the directory to the erpnext directory:
cd /opt/erpnext
- Create a new bench using the following command:
bench init erpnext
- Change the directory to the newly created erpnext directory:
cd erpnext
- Run the following command to install ERPNext:
bench install-app erpnext
Step 5 – Configure Nginx
Nginx is a web server and reverse proxy used to serve ERPNext. Follow the below steps to configure Nginx:
- Open the
/etc/nginx/nginx.conffile with nano:
sudo nano /etc/nginx/nginx.conf
- Delete everything in the
nginx.conffile and paste the following configuration:
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
include /etc/nginx/conf.d/*.conf;
}
- Create a new Nginx configuration file:
sudo nano /etc/nginx/conf.d/erpnext.conf
- Copy and paste the below configuration:
upstream erpnext {
server 127.0.0.1:8000;
}
server {
listen 80;
server_name erpnext.example.com; # Replace with your domain or IP address
access_log /var/log/nginx/erpnext.access.log;
location / {
proxy_pass http://erpnext;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /socket.io {
proxy_pass http://erpnext;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}
- Test the Nginx configuration:
sudo nginx -t
- Restart the Nginx service
sudo systemctl restart nginx
Step 6 – Start ERPNext
- Change the directory to the ERPNext directory:
cd /opt/erpnext/erpnext
- Start the ERPNext application:
bench start
Open your web browser and go to
http://erpnext.example.com. Replaceerpnext.example.comwith your domain name or IP address.Login to the ERPNext using the following credentials:
Username: Administrator
Password: admin
Congratulations! You have successfully installed ERPNext on Fedora Server Latest.