Skip to content

宝塔部署

系统环境要求

1.PHP版本 = 8.2+ 2.MySql版本 = 5.7 (需支持innodb引擎) 3.Nginx 4.Composer 2.0+

Linux + 宝塔环境安装

推荐您使用Linux系统 配合宝塔集成环境,运行PHP程序快速简单,稳定高效 宝塔面板安装文档:https://www.bt.cn/bbs/thread-19376-1-1.html

安装相关软件

软件商城安装相关软件:PHP8.2+、MySql5.7、Redis、Composer 如图: starpms图

添加站点

starpms图

填写网站信息

starpms图 浏览器输入你的域名 starpms图

删除默认文件

starpms图

上传压缩包

starpms图

点击解压

starpms图

解压后的目录结构

starpms图

点击编辑站点

starpms图

设置运行目录

starpms图

开启Redis服务

Redis 是C语言开发的一个开源高性能键值对的内存数据库,可以用来做数据库、缓存、消息中间件等场景,是一种NoSQL(not-only sql,非关系型数据库)的数据库 starpms图 Redis密码和端口号可在redis设置中性能调整中查看和设置,如若设置请在设置后在服务中重启 starpms图

进入安装程序

starpms图

环境检测

starpms图 以file info扩展举例在软件商城-已安装软件-php设置-安装扩展中安装。 starpms图 安装完成后在php设置-服务中重启 starpms图

开始安装

starpms图

邮箱配置

系统除了站内信提醒外还通过邮件发送相关询价、竞价、招标等系统信息,所以必须要设置相关发送邮箱。 发件箱相关驱动默认为SMTP。 相关配置以阿里SMTP配置参考:https://help.aliyun.com/document_detail/36576.htmlstarpms图

使用Composer更新Vendor

Composer版本2.0+ 项目根目录执行 composer install starpms图

修改nginx配置

starpms图

配置说明: 在server中添加

bash
location /wss { proxy_pass http://basewebsock; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection Upgrade; } location /admin { rewrite ^/(.*)$ /index.php?s=$1 last; }

location /frontend { rewrite ^/(.*)$ /index.php?s=$1 last; }

location /upload { rewrite ^/(.*)$ /index.php?s=$1 last; }

在server外添加

bash
upstream basewebsock{ server 127.0.0.1:23192; }

默认的后台地址

网址:https://www.你的域名.com 默认的账户密码:admin ecp@2024

开启定时任务

系统定时任务自动处理招标采购系统自动开标以及报名截至等时间相关状态的更新,所以必须要开启。 将命令行PHP版本号与站点同步 宝塔面板 - 站点设置 - PHP版本(PHP-82) starpms图 宝塔面板 - 网站 - PHP命令行版本,调整为PHP-82版本 starpms图 打开终端命令行,输入php -v,看显示的版本是否与站点一致(PHP82) starpms图 请解除以下 7个 PHP函数的禁用 (如果是宝塔环境下必须操作) pcntl_signal pcntl_signal_dispatch pcntl_fork pcntl_wait pcntl_waitpid pcntl_alarm proc_open starpms图 安装进程守护软件 宝塔面板 - 软件商店 - 搜索 进程守护管理器 - 安装 starpms图 添加定时任务守护进程 名称填写 ecp-timer 启动用户选择 www 运行目录设置为你的站点路径 填写启动命令 php artisan schedule:run 进程数量 1 starpms图 添加实时通信守护进程(参考添加定时任务守护进程) 名称填写 ecp-workman 启动用户选择 root 运行目录设置为你的站点路径 填写启动命令 php artisan workman start 如若报错请参考 :https://blog.csdn.net/qq_50750196/article/details/132657497

添加消息队列守护进程(参考添加定时任务守护进程) 名称填写 ecp-queue 启动用户选择 root 运行目录设置为你的站点路径 填写启动命令 php artisan queue:list