芸众商城系统部署教程 接口报错500 芸众商城队列安装启动教程

1.介绍

前段时间为朋友部署芸众商城 到芸众商城队列安装,再到队列启动都果断采坑无数。查阅了网络上的很多教程,要么残缺不全,要么收费高昂,至少都是500起步,还不会给你教程。在不断尝试中,最终顺利部署,完美安装部署了芸众商城,安装了芸众商城的队列,现整理该教程无偿供大家使用!!

2.服务器环境:

总体要求:web环境:nginx;PHP版本:PHP7.4;数据库版本:mysql 5.7或8.0 ;协议:https协议

具体要求:

1 . PHP扩展必须开启:bcmath, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, redis, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvsem, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib, redis, ongidb

2 . PHP扩展函数必须开启:proc_xxx,putenv, pcntl_signal, pcntl_fork, cntl_wai, cntl_alarm, cntl_signal_dispatch, stream_socket_server

3 . 数据库版本支持mysql 5.7、8.0(建议使用8.0,数据库存储引擎必须支持Innodb),确保curl(7.6x)和 openssl-1.1.1

4 . PHP其他注意事项:php必须配置ca根证书,否则对接微信、支付等等多个地方报错。保证PHP执行没有任何报错。具体检查方法为:SSH连接服务器,执行php命令,无报错即可。

5 . 使用宝塔面板或者手配环境均可。

6 . 其他:多站点使用商城队列必须把redis实例或slot(库)划分开。

3.芸众商城部署

第1 步:登录宝塔
第 2 步: 在左侧导航栏找到【软件商店】,然后再顶部找到【一键部署】,在列表中找到【芸众商城智慧商业系统】,点击【一键部署】,按提示操作即可完成部署!如下图:

芸众商城系统部署教程 接口报错500 芸众商城队列安装启动教程

第 3 步:填写自己的资料如下:

芸众商城系统部署教程 接口报错500 芸众商城队列安装启动教程

第 4 步:宝塔面板左侧点击网站,然后在网站列表找到刚才部署的网站,点击后面的【设置】,在设置对话框左侧点击【SSL】,部署SSL证书。(一定要https)
特别注意:这里建议使用阿里云、腾讯云SSL证书,芸众官方曾说明过,宝塔面板的 Let’s Encrypt 证书有可能引发未知错误。

芸众商城系统部署教程 接口报错500 芸众商城队列安装启动教程

第 6 步:

(有自己源码的就可以上传自己的源码了,没有的就当我没说…..来找我吧!)

打开浏览器,访问刚才保存的站点地址,也可以直接在浏览器访问您绑定的芸众商城域名,弹出安装界面,点击【同意协议并进入安装】,确定环境检查、函数检查都支持后,点击【下一步】,确定目录、文件权限检查都可写后,点击【下一步】,填写数据库名称、数据库用户名及密码(前面已经提醒大家保存了哦)、站点名称、管理员账号、管理员密码、手机号,其余信息默认。然后点击【下一步】,再点击【确认安装】,等待安装完成。

第 7 步:安装完成会自动跳转到登陆页面,输入您刚才设置的管理员账号密码进行登陆,登陆后按提示注册站点,然后会得到KEY和密钥,然后点击左侧的【系统升级】,升级芸众商城到最新版。

第 8 步:点击左侧导航栏的【平台管理】,添加一个平台,点击【管理】进入刚才添加的平台,点击左侧的概况后,能够看到右下角有系统运行状况,一般情况下,系统运行已经正常。如果出现红色图标,则需要重新安装队列,参考后面的教程。

5.芸众商城列队配置教程:

芸众商城系统部署教程 接口报错500 芸众商城队列安装启动教程

第一步:阿里云官网-服务器管理-安全组,放行端口9001,同时,宝塔后台安全,也对 9001端口放行第二步:宝塔面板,软件商店,安装插件“Supervisor管理器1.3”


第三步∶宝塔面板中,打开“Supervisor管理器1.3”,配置文件中去掉端口的屏蔽,如果不知道怎么改和配置,直接下载本文的附件。


第四步:你的芸众网站根目录\app\backend\modules\supervisord\services\Supervisor.php 修改为本文附件的内容,你可以下载后直接覆盖,如果你想细看,究竟修改过那里,你可以打开你自己的和这个修过的,进行对比。


第五步:用SSH连接你的服务器,这一步非常关键:执行命令: supervisorctl reload


说明一下: supervisorctl reload意思是:重载配置,supervisorctl意思是查看进程,supervisorctl stop意思是停止

芸众商城系统部署教程 接口报错500 芸众商城队列安装启动教程

第六步:回到你的网站后台,系统—队列服务,看看是不是已经启动,服务器设置中,设置为127.0.0.1 前面不加 http,

刷新后,可能又会变成带 http的,不管他了,原因不详,只要正常就行,注意了“开启多列队分类”不要开启,不要开启。如果,发现还是没有启动成功,重复上面 第五步!

; Sample supervisor config file.
;
; For more information on the config file, please see:
; http://supervisord.org/configuration.html
;
; Notes:
;  - Shell expansion ("~" or "$HOME") is not supported.  Environment
;    variables can be expanded using this syntax: "%(ENV_HOME)s".
;  - Quotes around values are not supported, except in the case of
;    the environment= options as shown below.
;  - Comments must have a leading space: "a=b ;comment" not "a=b;comment".
;  - Command will be truncated if it looks like a config file comment, e.g.
;    "command=bash -c 'foo ; bar'" will truncate to "command=bash -c 'foo ".
;
; Warning:
;  Paths throughout this example file use /tmp because it is available on most
;  systems.  You will likely need to change these to locations more appropriate
;  for your system.  Some systems periodically delete older files in /tmp.
;  Notably, if the socket file defined in the [unix_http_server] section below
;  is deleted, supervisorctl will be unable to connect to supervisord.
 
[unix_http_server]
file=/var/run/supervisor.sock
;chmod=0700                 ; socket file mode (default 0700)
;chown=nobody:nogroup       ; socket file uid:gid owner
;username=user              ; default is no username (open server)
;password=123               ; default is no password (open server)
 
; Security Warning:
;  The inet HTTP server is not enabled by default.  The inet HTTP server is
;  enabled by uncommenting the [inet_http_server] section below.  The inet
;  HTTP server is intended for use within a trusted environment only.  It
;  should only be bound to localhost or only accessible from within an
;  isolated, trusted network.  The inet HTTP server does not support any
;  form of encryption.  The inet HTTP server does not use authentication
;  by default (see the username= and password= options to add authentication).
;  Never expose the inet HTTP server to the public internet.
 
[inet_http_server]         ; inet (TCP) server disabled by default
port=127.0.0.1:9001        ; ip_address:port specifier, *:port for all iface
;username=user              ; default is no username (open server)
;password=123               ; default is no password (open server)
 
[supervisord]
logfile=/var/log/supervisor.log
logfile_maxbytes=50MB        ; max main logfile bytes b4 rotation; default 50MB
logfile_backups=10           ; # of main logfile backups; 0 means none, default 10
loglevel=info                ; log level; default info; others: debug,warn,trace
pidfile=/var/run/supervisor.pid
nodaemon=false               ; start in foreground if true; default false
silent=false                 ; no logs to stdout if true; default false
minfds=1024                  ; min. avail startup file descriptors; default 1024
minprocs=200                 ; min. avail process descriptors;default 200
;umask=022                   ; process file creation umask; default 022
;user=supervisord            ; setuid to this UNIX account at startup; recommended if root
;identifier=supervisor       ; supervisord identifier, default is 'supervisor'
;directory=/tmp              ; default is not to cd during start
;nocleanup=true              ; don't clean up tempfiles at start; default false
;childlogdir=/tmp            ; 'AUTO' child log dir, default $TEMP
;environment=KEY="value"     ; key value pairs to add to environment
;strip_ansi=false            ; strip ansi escape codes in logs; def. false
 
; The rpcinterface:supervisor section must remain in the config file for
; RPC (supervisorctl/web interface) to work.  Additional interfaces may be
; added by defining them in separate [rpcinterface:x] sections.
 
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
 
; The supervisorctl section configures how supervisorctl will connect to
; supervisord.  configure it match the settings in either the unix_http_server
; or inet_http_server section.
 
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
;username=chris              ; should be same as in [*_http_server] if set
;password=123                ; should be same as in [*_http_server] if set
;prompt=mysupervisor         ; cmd line prompt (default "supervisor")
;history_file=~/.sc_history  ; use readline history if available
 
; The sample program section below shows all possible program subsection values.
; Create one or more 'real' program: sections to be able to control them under
; supervisor.
 
;[program:theprogramname]
;command=/bin/cat              ; the program (relative uses PATH, can take args)
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
;numprocs=1                    ; number of processes copies to start (def 1)
;directory=/tmp                ; directory to cwd to before exec (def no cwd)
;umask=022                     ; umask for process (default None)
;priority=999                  ; the relative start priority (default 999)
;autostart=true                ; start at supervisord start (default: true)
;startsecs=1                   ; # of secs prog must stay up to be running (def. 1)
;startretries=3                ; max # of serial start failures when starting (default 3)
;autorestart=unexpected        ; when to restart if exited after running (def: unexpected)
;exitcodes=0                   ; 'expected' exit codes used with autorestart (default 0)
;stopsignal=QUIT               ; signal used to kill process (default TERM)
;stopwaitsecs=10               ; max num secs to wait b4 SIGKILL (default 10)
;stopasgroup=false             ; send stop signal to the UNIX process group (default false)
;killasgroup=false             ; SIGKILL the UNIX process group (def false)
;user=chrism                   ; setuid to this UNIX account to run the program
;redirect_stderr=true          ; redirect proc stderr to stdout (default false)
;stdout_logfile=/a/path        ; stdout log path, NONE for none; default AUTO
;stdout_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
;stdout_logfile_backups=10     ; # of stdout logfile backups (0 means none, default 10)
;stdout_capture_maxbytes=1MB   ; number of bytes in 'capturemode' (default 0)
;stdout_events_enabled=false   ; emit events on stdout writes (default false)
;stdout_syslog=false           ; send stdout to syslog with process name (default false)
;stderr_logfile=/a/path        ; stderr log path, NONE for none; default AUTO
;stderr_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
;stderr_logfile_backups=10     ; # of stderr logfile backups (0 means none, default 10)
;stderr_capture_maxbytes=1MB   ; number of bytes in 'capturemode' (default 0)
;stderr_events_enabled=false   ; emit events on stderr writes (default false)
;stderr_syslog=false           ; send stderr to syslog with process name (default false)
;environment=A="1",B="2"       ; process environment additions (def no adds)
;serverurl=AUTO                ; override serverurl computation (childutils)
 
; The sample eventlistener section below shows all possible eventlistener
; subsection values.  Create one or more 'real' eventlistener: sections to be
; able to handle event notifications sent by supervisord.
 
;[eventlistener:theeventlistenername]
;command=/bin/eventlistener    ; the program (relative uses PATH, can take args)
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
;numprocs=1                    ; number of processes copies to start (def 1)
;events=EVENT                  ; event notif. types to subscribe to (req'd)
;buffer_size=10                ; event buffer queue size (default 10)
;directory=/tmp                ; directory to cwd to before exec (def no cwd)
;umask=022                     ; umask for process (default None)
;priority=-1                   ; the relative start priority (default -1)
;autostart=true                ; start at supervisord start (default: true)
;startsecs=1                   ; # of secs prog must stay up to be running (def. 1)
;startretries=3                ; max # of serial start failures when starting (default 3)
;autorestart=unexpected        ; autorestart if exited after running (def: unexpected)
;exitcodes=0                   ; 'expected' exit codes used with autorestart (default 0)
;stopsignal=QUIT               ; signal used to kill process (default TERM)
;stopwaitsecs=10               ; max num secs to wait b4 SIGKILL (default 10)
;stopasgroup=false             ; send stop signal to the UNIX process group (default false)
;killasgroup=false             ; SIGKILL the UNIX process group (def false)
;user=chrism                   ; setuid to this UNIX account to run the program
;redirect_stderr=false         ; redirect_stderr=true is not allowed for eventlisteners
;stdout_logfile=/a/path        ; stdout log path, NONE for none; default AUTO
;stdout_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
;stdout_logfile_backups=10     ; # of stdout logfile backups (0 means none, default 10)
;stdout_events_enabled=false   ; emit events on stdout writes (default false)
;stdout_syslog=false           ; send stdout to syslog with process name (default false)
;stderr_logfile=/a/path        ; stderr log path, NONE for none; default AUTO
;stderr_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
;stderr_logfile_backups=10     ; # of stderr logfile backups (0 means none, default 10)
;stderr_events_enabled=false   ; emit events on stderr writes (default false)
;stderr_syslog=false           ; send stderr to syslog with process name (default false)
;environment=A="1",B="2"       ; process environment additions
;serverurl=AUTO                ; override serverurl computation (childutils)
 
; The sample group section below shows all possible group values.  Create one
; or more 'real' group: sections to create "heterogeneous" process groups.
 
;[group:thegroupname]
;programs=progname1,progname2  ; each refers to 'x' in [program:x] definitions
;priority=999                  ; the relative start priority (default 999)
 
; The [include] section can just contain the "files" setting.  This
; setting can list multiple files (separated by whitespace or
; newlines).  It can also contain wildcards.  The filenames are
; interpreted as relative to this file.  Included files *cannot*
; include files themselves.
 
[include]
files = /www/server/panel/plugin/supervisor/profile/*.ini

也可以直接下载 配置好了的“Supervisor管理器-配置文件”

芸众商城常见错误:

一.安装后提示:{“result”:0,“msg”:“”,“data”:{“status”:-4}}报错的原因
原因是环境设置问题检查以下内容
1、操作系统不是centos7或者以上版本;
2、web服务器不是nginx

二.Oops! 接口报错!!!|
请稍后再试,或者联系管理员!!!
是因为浏览器缓存造成哈,清理下缓存或者换个浏览器即可
————————————————
(如果还不会联系本站客服可提供技术支持!!!)

© 版权声明
THE END
喜欢就支持一下吧
点赞5 分享
评论 共6条
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片