2023-11-14  10,702 views 评论

ERPNEXT 15版安装指南-操作步骤

ERPNEXT安装步骤(Ubuntu 22.04系统)

ERPNEXT安装步骤

1)如果当前登录的是root用户,就请新建一个用于安装erpnext的sudo用户,
替换[frappe-user]为自己的用户名,以下用户名purplestone。
adduser [frappe-user]
usermod -aG sudo purplestone

2)更新系统并重启系统。
apt update && apt upgrade -y && shutdown -r now

3)	使用安装erpnext所建好的sudo用户,下载node.js
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash –

4)	安装操作系统所需的各种依赖包

sudo apt install -y python3.10-dev python3-setuptools python3-pip 
python3-distutils python3.10-venv software-properties-common 
mariadb-server mariadb-client redis-server nodejs xvfb 
libfontconfig libmysqlclient-dev nginx git ansible

5)	将Python的pip源改成国内源,方便后面安装frappe时提高速度和成功率。

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

pip config set install.trusted-host mirrors.aliyun.com

6)	开始配置MariaDB,用nano编辑my.cnf文件。

sudo nano /etc/mysql/my.cnf (ctrl + X返回命令行,保存my.cnf)

   [mysqld]
   character-set-client-handshake = FALSE 
   character-set-server = utf8mb4 
   collation-server = utf8mb4_unicode_ci 
   
   [mysql]
   default-character-set = utf8mb4

7)	sudo service mysql restart(重启mysql)

8)	开始mysql的安全配置

   sudo mysql_secure_installation
第一个输入数据库密码对话框出来的时候,直接敲回车代表没有密码,剩下的按照下面选择:

   # 注:运行结果用 ··· 代替
   Enter current password for root (enter for none):  # 输入root(mysql)的密码,初次安装默认没有,直接回车 
    ... 
   Switch to unix_socket authentication [Y/n] n # 是否切换到unix套接字身份验证[Y/n]
    ... 
   Change the root password? [Y/n] y #是否设置root用户密码
   New password: # 新密码
   Re-enter new password:  # 再次输入密码
    ... 
   Remove anonymous users? [Y/n] y # 是否删除匿名用户,建议删除
    ... 
   Disallow root login remotely? [Y/n] n # 是否禁止root远程登录,建议不开启
    ... 
   Remove test database and access to it? [Y/n] n # 是否删除test数据库,可以保留
   ...
   Reload privilege tables now? [Y/n] y # 是否重新加载权限表,也可以直接回车
Thanks for using MariaDB! # 看到这句话证明设置成功
9)	安装yarn
sudo npm install -g yarn
#yarn config get registry查看源, 如果官方源请设置为以下国内源
 
yarn config set registry https://registry.npmmirror.com/ --global  && \
 
npm set registry https://registry.npmmirror.com/ && \
 
10)	查看版本,对照一下,这一步不做也行.

node -v && npm -v && python3 -V && pip3 -V && yarn -v   

11)	安装bench,(即erpnext系统的命令行管理工具)
sudo -H pip3 install frappe-bench 

12)	bench命令安装frappe框架。frappe-bench是安装frappe框架目录名称。
bench init --frappe-branch version-15 frappe-bench --frappe-path=https://gitee.com/mirrors/frappe –verbose

13)	安装的系统用户分配执行权限, 替换[frappe-user]为第1步创建的安装用户
chmod -R o+rx /home/purplestone

14)	进入bench目录
cd frappe-bench

15)	新建站点,下面是以erpnext作为站点名称,安装时会提示输入数据库root账号
的密码、新站点数据库及erp系统管理员账号administator 密码,其中数据库root账号
密码须与上述数据库安装时密码一致。
bench new-site erpnext 

16)	设置系统为生产环境,purplestone为第1步创建的安装用户。 
sudo bench setup production purplestone  

17)	下载erpnext及其依赖的APP并安装到bench
bench get-app --branch version-15 https://gitee.com/qinyanwan/payments
bench get-app --branch version-15 erpnext https://gitee.com/mirrors/erpnext
bench get-app --branch version-15 https://gitee.com/qinyanwan/hrms

18)	安装app, ERP系统名erpnext(与新建站点名称一致),其他常用系统、人事等模块。
bench use erpnext
bench –-site erpnext install-app payments
bench --site erpnext install-app erpnext
bench --site erpnext install-app hrms

19)	解决决可能存在PDF打印中文显示乱码所需要的工具
下载:
wget https://gitee.com/qinyanwan/erpnext/releases/download/v13.29.0/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
安装:
sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb
如果安装提示有缺少依赖的错误,执行命令更新文件:
sudo apt -f install
20)安装汉化及开箱即用app(可选)
bench getapp erpnext_chinese https://gitee.com/yuzelin/erpnext_chinese
bench get-app --branch version-15 erpnext https://gitee.com/yuzelin/erpnext_oob
bench --site {sitename} install-app erpnext_chinese
bench --site {sitename} install-app erpnext_oob



 

ERPNext安装完毕。通过浏览器输入主机IP或者默认127.0.0.1访问系统。

图形用户界面, 网站 描述已自动生成

如安装失败多执行几次。

 

原创文章或网络摘录,转载请注明: 转载自守候的时光

本文链接地址: ERPNEXT 15版安装指南-操作步骤

打赏

给我留言

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: