ERPNext 13 Debian 10 / ubuntu 20 簡易安裝

ERPNext 13 Debian 10 / ubuntu 20 簡易安裝

安裝步驟及說明(以下步驟在華為雲耀伺服器1vCPUs | 2GB debian 10 64位 驗證成功,總耗時40分鐘左右)

考慮ubuntu基於debian,命令基本相同,本安裝指南理論上也適用ubuntu.

1. 用root登錄系統,開始安裝

更新、升級作業系統:

apt-get update
apt-get upgrade

2. 安裝sudo,創建安裝帳號並分配root許可權,ubuntu 自帶sudo,不用單獨安裝

修改[user]為你自定義的用戶,依據提示輸入並確認用戶密碼

apt-get install sudo
adduser [USER]
usermod -aG sudo [USER]

3. 安裝一鍵安裝文本中操作系統級依賴庫

apt install git libffi-dev python3-minimal build-essential python3-distutils python3-setuptools python3-pip python3-testresources libssl-dev wkhtmltopdf redis

4. 修改redis 配置

nano /etc/redis/redis.conf

(搜索 127.0.0.1 ::1這一行,去掉後面的::1, ctrl + o再回車保存,ctrl + x退回命令行)

5. 重啟系統

reboot

6. 用上述第2步新創建的系統安裝賬號登錄

export LC_ALL=C.UTF-8

7. 下載安裝文稿

wget https://raw.githubusercontent.com/frappe/bench/develop/install.py

8. 執行一鍵安裝腳本,修改 [USER] 為上述安裝帳號,修改[資料庫密碼],[系統管理員密碼],以及frappe13(安裝後生成的新目錄), 視網络下載速度,此步驟耗時較長,如果命令執行過程出錯后,可重複執行。

sudo python3 install.py --verbose --production --user [USER] --mariadb-version 10.5 --frappe-branch version-13 --erpnext-branch version-13 --mysql-root-password [数据库密码] --admin-password [系统管理员密码] --bench-name frappe13 --erpnext-repo-url https://gitee.com/qinyanwan/erpnext --frappe-repo-url https://gitee.com/qinyanwan/frappe

命令行參數說明如下,更多參數請查看 install.py 檔中的parse_commandline_args函數

        --production            指定安装脚本install.py安装当前的稳定版,如果需要安装开发版可以使用--develop参数;
    --user                  安装目录的拥有者用户,后续用此用户账号管理系统维护和升级
    --bench-name            安装目录名
    --mysql-root-password   数据库管理员密码
    --admin-password  自动创建的管理员账号密码
    --verbose   显示详细安装过程
    --overwrite  首次出错后,重复执行命令时覆盖之前生成的目录,一般不用此参数,出错后重复执行命令会利用之前已下载或安装过的部分
    --version 指定安装的系统版本,默认安装当前的稳定版 13,version参数可以安装指定版本,比如version-13-beta
    --site  站点名
        --erpnext-repo-url     erpnext代码源,改为国内码云源可解决github下载速度慢问题
        --frappe-repo-url      frappe代码源

等一段時間後系統返回 「Successfully Installed」即安裝成功

9. 切換到bench目錄後啟動後台任務(可選步驟)

cd frappe13
bench enable-scheduler

10. 切換回官方代碼庫,從官方代碼庫升級(可選步驟)

bench remote-reset-url frappe
bench remote-reset-url erpnext
bench update

附註:安裝本人的ebclocal漢化APP及登錄使用

1. 獲取漢化APP和安裝到網站(可選步驟)

bench get-app --branch master yuzelin/ebclocal
bench install-app ebclocal

2. 用瀏覽器(推薦 Chrome或Firefox)輸入IP或功能變數名稱,使用使用者名administrator,登錄系統

常見問題

  1. 列印單據或報表轉PDF時,中文顯示亂碼

原因是沒有相關中文字體,

解決方法:執行以下命令安裝

sudo apt-get install ttf-wqy-zenhei -y

2. 從github代碼託管倉庫下載連接超時 "msg": "Failed to connect to GitHub: Where the world builds software at port 443: [Errno 110] Connection timed out",

解決方法:重新執行命令。

參考了官方論壇貼 [Tutorial] Install v13 Production on Debian 10 VPS - Using "Easy Install" script - Now includes setting up SSL certificate! ,略有修正並增加了國內代碼庫源以解決常見的網络超時問題。

What do you think?

Written by marketer

ERPNext v13 Ubuntu 20.04 安裝教程

因為強大的庫存管理系統,我選擇了旺店通!