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:

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:

  1. Start the MariaDB service:
sudo systemctl start mariadb
  1. Set the MariaDB root user password:
sudo mysql_secure_installation
  1. Login to MariaDB as the root user:
sudo mysql -u root -p
  1. Create a database for ERPNext:
CREATE DATABASE erpnext;
  1. Create a new user for ERPNext:
CREATE USER 'erpnext'@'localhost' IDENTIFIED BY 'password';
  1. Grant all privileges to the erpnext user:
GRANT ALL PRIVILEGES ON erpnext.* TO 'erpnext'@'localhost';
  1. Flush the privileges:
FLUSH PRIVILEGES;
  1. 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:

  1. Start the Redis service:
sudo systemctl start redis
  1. Enable the Redis service to start at boot time:
sudo systemctl enable redis
  1. Open the /etc/redis.conf file:
sudo nano /etc/redis.conf
  1. Uncomment the supervised systemd option by removing the # in front of it.

  2. 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:

  1. Install Bench using pip3:
sudo dnf install -y python3-pip
sudo pip3 install frappe-bench
  1. Create a new directory for the ERPNext installation:
sudo mkdir /opt/erpnext
sudo chown -R youruser:youruser /opt/erpnext
  1. Change the directory to the erpnext directory:
cd /opt/erpnext
  1. Create a new bench using the following command:
bench init erpnext
  1. Change the directory to the newly created erpnext directory:
cd erpnext
  1. 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:

  1. Open the /etc/nginx/nginx.conf file with nano:
sudo nano /etc/nginx/nginx.conf
  1. Delete everything in the nginx.conf file 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;
}
  1. Create a new Nginx configuration file:
sudo nano /etc/nginx/conf.d/erpnext.conf
  1. 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";
    }
}
  1. Test the Nginx configuration:
sudo nginx -t
  1. Restart the Nginx service
sudo systemctl restart nginx

Step 6 – Start ERPNext

  1. Change the directory to the ERPNext directory:
cd /opt/erpnext/erpnext
  1. Start the ERPNext application:
bench start
  1. Open your web browser and go to http://erpnext.example.com. Replace erpnext.example.com with your domain name or IP address.

  2. Login to the ERPNext using the following credentials:

Username: Administrator
Password: admin

Congratulations! You have successfully installed ERPNext on Fedora Server Latest.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!