Ubuntu-24.04-LTS 安装 ERPNext15

 

Ubuntu 24.04 LTS 中的 Frappe-ERPNext 版本 15

在 Ubuntu 24.04 LTS 中安装 Frappe/ERPNext 版本 15 的完整指南

转自:https://github.com/D-codE-Hub/-Frappe-ERPNext-Version-15--in-Ubuntu-24.04-LTS

请参阅此文了解默认 Python 3.11 设置

先决条件

  Python 3.11+                                  (python 3.12 is inbuilt in 24.04 LTS)
  Node.js 18+
  
  Redis 5                                       (caching and real time updates)
  MariaDB 10.3.x / Postgres 9.5.x               (to run database driven apps)
  yarn 1.12+                                    (js dependency manager)
  pip 20+                                       (py dependency manager)
  wkhtmltopdf (version 0.12.5 with patched qt)  (for pdf generation)
  cron                                          (bench's scheduled jobs: automated certificate renewal, scheduled backups)
  NGINX                                         (proxying multitenant sites in production)

笔记:

ubuntu 24.04默认python版本是python3.12

ubuntu 24.04默认mariadb版本是10.11

步骤 1 安装 git

sudo apt-get install git

步骤2 安装python-dev

sudo apt-get install python3-dev

步骤 3 安装 setuptools 和 pip(Python 的包管理器)。

sudo apt-get install python3-setuptools python3-pip

步骤 4 安装virtualenv

sudo apt install python3.12-venv

步骤 5 安装 MariaDB

sudo apt-get install software-properties-common
sudo apt install mariadb-server
sudo systemctl status mariadb
sudo mysql_secure_installation


  In order to log into MariaDB to secure it, we'll need the current
  password for the root user. If you've just installed MariaDB, and
  haven't set the root password yet, you should just press enter here.

  Enter current password for root (enter for none): # PRESS ENTER
  OK, successfully used password, moving on...
  
  
  Switch to unix_socket authentication [Y/n] Y
  Enabled successfully!
  Reloading privilege tables..
   ... Success!

  Change the root password? [Y/n] Y
  New password: 
  Re-enter new password: 
  Password updated successfully!
  Reloading privilege tables..
   ... Success!

  Remove anonymous users? [Y/n] Y
   ... Success!

   Disallow root login remotely? [Y/n] Y
   ... Success!

   Remove test database and access to it? [Y/n] Y
   - Dropping test database...
   ... Success!
   - Removing privileges on test database...
   ... Success!

   Reload privilege tables now? [Y/n] Y
   ... Success!

STEP 6 MySQL数据库开发文件

sudo apt-get install libmysqlclient-dev

步骤7 编辑mariadb配置(unicode字符编码)

sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf

将其添加到 50-server.cnf 文件

[server]
user = mysql
pid-file = /run/mysqld/mysqld.pid
socket = /run/mysqld/mysqld.sock
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
bind-address = 127.0.0.1
query_cache_size = 16M
log_error = /var/log/mysql/error.log

[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

现在按(Ctrl-X)退出

sudo service mysql restart

步骤8 安装Redis

sudo apt-get install redis-server

步骤 9 安装 Node.js 18.X 包

sudo apt install curl 
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile
nvm install 18

步骤 10 安装 Yarn

sudo apt-get install npm

sudo npm install -g yarn

步骤 11 安装 wkhtmltopdf

sudo apt-get install xvfb libfontconfig wkhtmltopdf

步骤 12 安装 frappe-bench

sudo -H pip3 install frappe-bench --break-system-packages

bench --version

步骤 13 初始化 frappe 工作台并安装 frappe 最新版本

bench init frappe-bench --frappe-branch version-15

cd frappe-bench/
bench start

步骤 14 在 frappe bench 中创建一个站点

笔记

警告:MariaDB 版本 ['10.11', '7'] 高于 10.8,尚未使用 Frappe Framework 进行测试。

bench new-site dcode.com

bench --site dcode.com add-to-hosts

打开网址http://dcode.com:8000登录

步骤 15 在 Bench & Site 中安装 ERPNext 最新版本

bench get-app erpnext --branch version-15
###OR
bench get-app https://github.com/frappe/erpnext --branch version-15

bench --site dcode.com install-app erpnext

bench start



评论

此博客中的热门博文

2025年 eSIM方案选择和对比: 9eSIM、XeSIM 和 eSTK 优缺点对比

2025年 纳指100 QQQ和标普500 VOO 指数基金稳健投资策略