## <span style="color:blue;">安装环境要求如下:</span> <blockquote class="info"><ul><li>PHP &gt;= 7.1 && <= 7.4 推荐7.3 </li> <li>PDO PHP Extension</li><li>MBstring PHP Extension</li><li>Mysql >= 5.7</li><li>Redis >= 3.2</li></ul></blockquote> 只需要满足上述环境正常安装laravel模式即可,其中需要放开php.ini中的<code>exec</code>函数.。 1、下载代码后,配置相关数据库后,执行<code>php artisan migrate</code> 创建相关数据表。 2、获取内置sql:<code>resources/sql/wf.sql</code>,执行内置sql文件。 至于项目部署,请参考[laravel部署]([https://learnku.com/docs/laravel/7.x/deployment/7452](https://learnku.com/docs/laravel/7.x/deployment/7452)) ## <span style="color:blue;">项目后端部署配置参考文件如下:</span> 关于服务环境笔者推荐采用 [一键lnmp]([https://lnmp.org/install.html](https://lnmp.org/install.html)) 安装或者采用 [宝塔](https://www.bt.cn/bbs/thread-19376-1-1.html) 安装。 ``` # https模式 server { listen 80; server_name jishulincs.cn www.jishulincs.cn; return 301 https://www.jishulincs.cn$request_uri; } server { listen 443 default ssl; server_name www.jishulincs.cn jishulincs.cn; ssl_certificate 证书pem; ssl_certificate_key 证书key; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; index index.html index.htm index.php default.html default.htm default.php; root /home/wwwroot/jishulincs-general-service/public; #root /home/wwwroot/rageframe2/web; include rewrite/laravel.conf; include enable-php.conf; location /socket.io { proxy_pass http://localhost:6001; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 12h; } location ~ /.well-known { allow all; } location ~ /\. { deny all; } access_log /home/wwwlogs/www.jishulin.com.log; } # http模式 server { listen 80; server_name rages.jishulincs.cn; index index.html index.htm index.php; root /home/wwwroot/jishulincs-general-service/public; include rewrite/laravel.conf; include enable-php.conf; location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 12h; } location ~ /.well-known { allow all; } location ~ /\. { deny all; } access_log /home/wwwlogs/www.jishulin.com.log; } ``` ## <span style="color:blue;">项目前端部署配置参考文件如下:</span> ``` server { listen 80; server_name wf.jishulincs.cn; #index index.php index.html; client_max_body_size 500m; #error_page 404 /404.html; location / { root /home/wwwroot/jishulincs-workflow/dist; index index.html index.htm; autoindex on; } location /wf/{ proxy_pass https://www.jishulincs.cn/; proxy_connect_timeout 300s; proxy_send_timeout 300s; proxy_read_timeout 300s; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For %proxy_add_x_forwarder_for; } location /nginx_status { stub_status on; access_log off; } location ~ /\. { deny all; } access_log /home/wwwlogs/workflow.log ; } ```