在 Ubuntu 24.04 LTS 中的安装ERPNext 笔记 Step by Step

文章目录 | Table of Contents

  1. ERPnext 简介
  2. 先决条件
  3. 安装步骤
  4. 总结 & 引用

先决条件 | Prerequisites

系统环境要求

  • Ubuntu 24.04
  • A user with sudo privileges
  • Python 3.11+
  • pip 20+
  • MariaDB 10.3.x
  • Node.js 18
  • Yarn 1.12+

硬件要求

  • 2 Process 2 Core
  • 4GB ram
  • 40GB Storage
  • Intenet

安装步骤 | Installtion Steps

包升级和创建新用户

  1. Update and Upgrade Packages
    sudo apt-get update -y && sudo apt-get upgrade -y
  2. Create a New user
    sudo adduser **Your-user-name**
    #Fill in the information as prompted
    sudo usemod -aG sudo **Your-user-name**
    su **Your-user-name**
    #Enter your password
    cd ~ 

安装环境需要的包

  1. Install Git
    sudo apt-get install git -y
  2. Install Python Dependencies
    sudo apt-get install python3-dev -y
    sudo apt-get install python3-setuptools -y
    sudo apt-get install python3-pip -y
    sudo apt install python3.12-venv -y
  3. Install MariaDB and Configuration it
    sudo apt-get install software-properties-common -y
    sudo apt install mariadb-server -y
    sudo mysql_secure_installtion

    在执行mysql_secure_installtion 之后请按以下步骤设置

    • 设置root密码
    • 删除 anonymous users
    • 允许root 远程登录
    • 删除test database
    • Reload privilege tablesimage-20250208142432980.pngimage-20250208142527576.png

    编辑 MariaDB 配置文件

    sudo cp /etc/mysql/my.cnf /opt/my.cnf.back
    sudo nano /etc/mysql/my.cnf 
    #ctrl +x  y save
    sudo systemctl restart mariadb

    在my.cnf最末行添加如下内容

    [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
  4. Install Redis Server
    sudo apt-get install redis-server -y
  5. Install CURL, Node.js, NPM, and Yarn and wkhtmltopdf
    #CURL
    sudo apt install curl
    #Node js
    curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
    source ~/.profile
    nvm install 18
    #NPM
    sudo apt-get install npm -y
    #Yarn
    sudo npm install -g yarn -y
    #wkhtmltopdf
    sudo apt-get install xvfb libfontcofig wkhtmltopdf -y

Setting Up Frappe Bench

  1. Install Frappe Bench
    sudo -H pip3 install frappe-bench --break-system-packages
    sudo -H pip3 install ansible --break-system-packages
  2. Initialize Frappe Bench
    bench init frappe-bench --frappe-branch version-15
    ls 
    
    cd frappe-bench
    
    #change directory permissions
    chmod -R o+rx /home/**Your-erp-users**
  3. Create a New site
    bench new-site **site-name**
    #enter you database root password
    #setings Administrator password
  4. Install ERPnext APPS
    bench get-app payments
    bench get-app --branch version-15 erpnext
    bench --site **site-name** install-app erpnext
    
    
    bench use **site-name**

  5. 启用调度程序并禁用维护模式

    1. bench --site [site-name] enable-scheduler
      • 启用 ERPNext 站点的后台任务调度程序。
      • ERPNext 依赖调度程序执行定时任务(如生成报告、发送邮件、处理队列任务等)。
      • 如果不启用调度程序,某些功能可能无法正常工作。
    2. bench --site [site-name] set-maintenance-mode off
      • 将站点从维护模式切换到正常模式。
      • 在维护模式下,站点对普通用户不可用,只有管理员可以访问。
      • 关闭维护模式后,站点恢复正常运行,用户可以访问。
  6. 隐藏内容,VIP可见

    访问站点

    • 在生产模式下,ERPNext 通过 Nginx 提供服务,默认使用 HTTP(80 端口)或 HTTPS(443 端口)。
    • 你可以直接通过服务器的 IP 地址或域名访问站点,无需指定端口号(如 http://your-server-ip)。

    总结 和 引用 | Conclusion & References

    References:

    How to Install ERPNext Version 15 on Ubuntu 24.04: A Step-by-Step Guide -
    https://syncbricks.com/how-to-install-erpnext-version-15-on-ubuntu-24-04-a-step-by-step-guide/

    Youtube - https://www.youtube.com/watch?v=Q9D2wbrC6i8

    Chat GPT & DeepSeek

    原文永久链接

    https://www.itiohub.com/linux/erpnext_installtion.html

     

尊重他人劳动成果,转载请注明来源

当前文章作者名: 小四
当前文章标题: 在 Ubuntu 24.04 LTS 中的安装ERPNext 笔记 Step by Step
当前文章地址: https://www.pxecn.net/technology/213.html
THE END
分享
二维码
打赏
海报
在 Ubuntu 24.04 LTS 中的安装ERPNext 笔记 Step by Step
这篇文章记录了ERP next 在Ubuntu中安装的笔记
<<上一篇
下一篇>>