[Open source sharing] Online customer service system construction - based on php and swoole customer service system CRMchat (complete construction tutorial with source code)...

CRMChat is an open source online customer service system. The background management uses the thinkphp framework, and the message communication uses the swoole extension. Now I will deploy and build it.

This is a non-commercial open source customer service system. If you have commercial needs, you can visit my website: gofly.v1kf.com

DNS

Taking Alibaba Cloud as an example, I added my own secondary domain name crmchat.v1kf.com to the server IP

PHP extension installation

1. Install the PHP plug-in: fileinfo, redis, swoole4.
2. Delete  proc_openthe disabled functions in the corresponding version of PHP.

Detailed steps:

  1. Enter the pagoda panel, click  the software store  , click  PHP settings  . Here is PHP7.3an example;
  2. Enter the installation extension, install: fileinfo, redis, swoole4 extensions
  3. Enter  the disabled function  , find  proc_open the delete
  4. Restart the service or reload the configuration

site configuration

Summary of steps

1. Set the website running directory public
2. Set the PHP version to choose pure static.
3. Options If required, enable SSL, configure an SSL certificate, and enable mandatory https domain names.
Fourth, add a reverse proxy.

add site

download source code


Execute git clone  https://gitee.com/taoshihan/CRMChat.git in the root directory of the website you added

set directory

The site root directory should be set to the public directory

reverse proxy

设置反向代理,反向代理的端口号是20108
反向代理的配置文件,复制粘贴下面的内容

location /
{
    proxy_pass http://127.0.0.1:20108;
    proxy_http_version 1.1;
    proxy_read_timeout 360s;   
    proxy_redirect off; 
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    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 REMOTE-HOST $remote_addr;
    
    add_header X-Cache $upstream_cache_status;
    
    #Set Nginx Cache
    
        add_header Cache-Control no-cache;
    expires 12h;
}

线上安装

直接访问我的域名crmchat.v1kf.com,会进入安装向导界面

我们需要提前创建好数据库,在宝塔左侧菜单【数据库】【添加数据库】设置好数据库名,用户名,密码
在界面向导中需要填入对应的密码
上面的报错,可以修改下面文件,把这个判断注释掉,没有啥用
app/controller/InstallController.php

如果遇到登录过期,请重启swoole
php think swoole restart

Guess you like

Origin blog.csdn.net/taoshihan/article/details/132332432