进销存代表企业资源规划,它是组织中用于集成信息流和简化业务流程的软件应用程序。进销存 软件开发可以将应用程序组合到一个网络中,该网络可从任何具有适当安全凭证和权限的计算机访问。进销存 允许公司自动化工作流程、监控库存水平和跟踪销售订单。
云进销存源码:c.csymzs.top
云进销存是当今市场上可用的免费/开源 进销存 软件之一。除了他们的云产品之外,还可以在本地使用 云进销存。但是,安装说明不是很清楚。在我得到成品使用之前,我个人必须多次尝试安装......我希望,这不是因为我太慢了。哈哈。所以这是我关于如何正确安装 云进销存 的详细说明。
准备
云进销存是使用 Frappe 框架在 Python 中开发的(将Frappe在本文中使用术语)。云进销存 和 Frappe 都来自同一家公司,拥有许多社区支持者。MariaDB 用于 DBMS,因此,在详细介绍之前,这是我在安装 云进销存 之前准备的软件列表:
Python:在 Frappe 之上实现 Frappe 和 云进销存 的编程语言。
MariaDB:DBMS,用于存储和管理数据。
Frappe:软件框架,基于 Python,用于构建 云进销存。
Bench:一个 CLI 程序,用于管理 Frappe 应用程序的多租户部署。
Node.js:JavaScript 引擎,Frappe 将其用于前端。
yarn : Node.js 的包管理器。
Git:版本控制系统,由bench CLI使用。
基础架构软件的安装和配置
Python
我使用Miniconda发行版。有关如何安装 Miniconda 的信息,请参阅此安装说明。安装后,创建环境 - 此 云进销存 安装专用:
$ conda create -n py39-erpnext python=3.9
$ conda activate py39-erpnext
$ python Python 3.9.6 (default, Jul 30 2021, 16:35:19)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
$
我们安装 云进销存 的所有步骤都将在这个 shell 中完成。如果要打开另一个 shell,请激活 conda 环境py39-云进销存,就像上面的命令一样。
数据库
安装,然后更改其配置(通常您必须编辑my.cnf,在大多数 Linux 发行版中,您可以在) 中找到此文件:/etc/mysql/my.cnf
...
collation-server = utf8mb4_unicode_ci
innodb_file_format = Barracuda
...
按说明运行服务器进程。
注意:为了简单起见,我使用root作为 root 的密码。
测试您的服务器是否安装成功:
$ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 90
Server version: 10.5.12-MariaDB-1 Debian 11
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
$
Frappe
您可以在网页阅读有关 Frappe 的信息。同时,这将与 云进销存 一起安装,稍后使用bench。
Bench
虽然有很多安装bench的说明,但最简单的就是:
$ pip install bench
...
...
$ pip list | grep bench
frappe-bench 5.5.0
$ bench --help WARN: Command not being executed in bench directory
Usage: [OPTIONS] COMMAND [ARGS]...
Options:
--version
--help Show this message and exit.
Commands:
backup Backup single site
backup-all-sites Backup all sites in current bench
clear-command-cache Clears Frappe Framework cached commands
config Change bench configuration
disable-production Disables production environment for the
retry-upgrade Retry a failed upgrade
set-mariadb-host Set MariaDB host for bench
set-nginx-port Set NGINX port for site
set-redis-cache-host Set Redis cache host for bench
set-redis-queue-host Set Redis queue host for bench
set-redis-socketio-host Set Redis socketio host for bench
set-ssl-certificate Set SSL certificate path for site
set-ssl-key Set SSL certificate private key path for site
set-url-root Set URL root for site
setup Setup command group for enabling setting up a...
src Prints bench source folder path, which can be...
start Start Frappe development processes
switch-to-branch Switch all apps to specified branch, or specify...
switch-to-develop Switch frappe and erpnext to develop branch
update Performs an update operation on current bench.
$
Node.js
Yarn
安装 Node.js 后,您应该拥有node和npm. 使用以下命令安装 Yarn:
$ npm install -g yarn
Git
通常所有的 Linux 发行版都默认安装了 Git。万一您的 Linux 机器没有 Git,或者您使用 MacOS 或 Windows,请参阅Git 的安装说明。
初始化bench目录
我们的应用程序将驻留在一个bench 目录中,因此我们需要先对其进行初始化:
此时,我们已经有了一个名为我的云进销存的bench 目录。
注意:术语bench/Bench通常表示两件事:目录和CLI。从现在开始,我们将bench/Bench 目录称为bench/Bench并将bench/Bench CLI称为bench/Bench CLI。
在这个工作台中,我们将创建我们的站点,然后获取应用程序 (云进销存) 并将我们的 云进销存 应用程序安装到我们的站点中。
创建新站点
先设置主机:
$ bench init --frappe-branch version-13 myERPNext
使用此命令创建一个新站点 ( 我的云进销存 ):
$ bench init --frappe-branch version-13 myERPNext
$ /home/bpdp/software/python-dev-tools/miniconda39/envs/py39-erpnext/bin/virtualenv -q env -p python3
Getting frappe
$ git clone --branch version-13 --depth 1 --origin upstream
Kloning ke 'frappe'...
remote: Enumerating objects: 2914, done.
remote: Counting objects: 100% (2914/2914), done.
remote: Compressing objects: 100% (2746/2746), done.
remote: Total 2914 (delta 404), reused 1006 (delta 96), pack-reused 0
Menerima objek: 100% (2914/2914), 16.04 MiB | 1.16 MiB/s, done.
Menguraikan delta: 100% (404/404), done.
Installing frappe
$ myERPNext/env/bin/python -m pip install -q -U -e myERPNext/apps/frappe
WARNING: You are using pip version 21.2.2; however, version 21.2.3 is available.
You should consider upgrading via the '/home/bpdp/kerjaan/erpnext/myERPNext/env/bin/python -m pip install --upgrade pip' command.
$ yarn install
yarn install v1.22.11
warning ../../../../../../package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.16.0".
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
$ yarn run snyk-protect
yarn run v1.22.11
warning ../../../../../../package.json: No license field
$ snyk protect
Successfully applied Snyk patches
Done in 11.34s.
Done in 239.98s.
Updating node packages...
Installing node dependencies for frappe
$ yarn install
yarn install v1.22.11
warning ../../../../../../package.json: No license field
[1/4] Resolving packages...
success Already up-to-date.
$ yarn run snyk-protect
yarn run v1.22.11
warning ../../../../../../package.json: No license field
$ snyk protect
Successfully applied Snyk patches
Done in 9.18s.
Done in 9.87s.
$ bench build
An Error occurred while downloading assets...
✔ Application Assets Linked
yarn run v1.22.11
warning ../../../../../../package.json: No license field
$ FRAPPE_ENV=production node rollup/build.js
Production mode
✔ Built js/moment-bundle.min.js
✔ Built js/libs.min.js
Building frappe assets...
✔ Built js/checkout.min.js
✔ Built js/dialog.min.js
✔ Built js/web_form.min.js
✔ Built js/user_profile_controller.min.js
✔ Built js/list.min.js
✔ Built js/chat.js
✔ Built js/bootstrap-4-web.min.js
✔ Built js/frappe-recorder.min.js
✔ Built js/barcode_scanner.min.js
✔ Built js/frappe-web.min.js
✔ Built css/report.min.css
✔ Built css-rtl/report.min.css
✔ Built css/frappe-chat-web.css
✔ Built css/web_form.css
✔ Built css-rtl/frappe-chat-web.css
✔ Built css-rtl/web_form.css
✔ Built js/data_import_tools.min.js
✔ Built js/report.min.js
✔ Built css/printview.css
✔ Built css/email.css
✔ Built css/login.css
✔ Built css/frappe-web-b4.css
✔ Built js/desk.min.js
✔ Built js/control.min.js
✔ Built css/desk.min.css
✔ Built css-rtl/frappe-web-b4.css
✔ Built css-rtl/email.css
✔ Built css-rtl/login.css
✔ Built css-rtl/printview.css
✔ Built css-rtl/desk.min.css
✔ Built js/form.min.js
✨ Done in 47.395s
Done in 48.40s.
SUCCESS: Bench myERPNext initialized
$
如果我们不使用--db-name,那么bench CLI将使用随机生成的名称。我们需要回答管理员密码。记下密码,我们稍后会用到。
获取 云进销存 应用程序
使用这个命令:
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
$ ping myerpnext
PING myerpnext (127.0.1.1) 56(84) bytes of data.
64 bytes from dellvuan (127.0.1.1): icmp_seq=1 ttl=64 time=0.052 ms
64 bytes from dellvuan (127.0.1.1): icmp_seq=2 ttl=64 time=0.031 ms
^C
--- myerpnext ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1021ms
rtt min/avg/max/mdev = 0.031/0.041/0.052/0.010 ms
$
将 云进销存 安装到站点中
一旦我们得到 云进销存,我们就可以将它安装到我们的站点中:
$ bench new-site --db-name myerpnextdb myerpnext
MySQL root password:
Installing frappe...
Updating DocTypes for frappe : [========================================] 100%
Updating country info : [========================================] 100%
Set Administrator password:
Re-enter Administrator password:
$
为生产环境设置 Frappe
我们使用bench CLI为生产环境设置 Frappe,尤其是针对特定用户。在这里,我的用户名是bpdp,所以我们将为用户bpdp进行设置。要使用bench CLI设置生产环境,我们需要使用sudo,因为该命令会更改一些系统设置。sudo用于miniconda分发有点棘手,因为通常sudo无法找到命令,miniconda因为miniconda是为用户安装的。因此我们需要使用完整路径:
至此,我们的安装已经成功完成。接下来,我们将运行我们的 云进销存 应用程序并进行一些初始设置。
运行云进销存
要运行云进销存,请使用下面的bench CLI;
初始设置
使用浏览器,访问页面,出现登录界面:
$ bench start
...
...
...
...
16:31:26 web.1 | * Running on (Press CTRL+C to quit)
...
...
16:31:56 watch.1 | Rebuilding bank-reconciliation-tool.min.js
16:31:56 watch.1 | Rebuilding erpnext.css
16:31:56 watch.1 | Rebuilding marketplace.css
16:31:56 watch.1 | Rebuilding erpnext-web.css
$
使用上面创建的密码和管理员用户。