# 基于宝塔面板的安装
## **非[“淘宝Joomla一站通店铺”](https://item.taobao.com/item.htm?spm=a1z10.1-c-s.w5003-23029558665.60.7108c9302k8xnf&id=602703817186&scene=taobao_shop)购买的 迎客客服系统 ,没有服务 、 没有售后、没有更新 、谨防上当受骗**
要求服务器环境:php版本>=5.6 mysql>=5.6
安装教程是windows服务器、宝塔环境(Nginx 1.18.0、Mysql5.7、PHP7.3)
如果数据库版本是Mysql5.7需要修改配置sql_mode中删除ONLY_FULL_GROUP_BY(已经删除不存在可忽略),参考http://help.crmeb.net/crmeb-v4/2046206
# 添加站点
![](https://img.kancloud.cn/31/bf/31bf5536850f9939d641c712b49c58a3_779x740.png)
# 解压上传代码
将获取的源码包直接上传到站点文件夹
![](https://img.kancloud.cn/4d/85/4d854d4c8feeab8637ba3fa50300ead4_710x507.png)
![](https://img.kancloud.cn/33/aa/33aa8cf06f067eedb136095d56cc917d_774x547.png)
# 站点设置
![](https://img.kancloud.cn/fe/e9/fee9d6b13c819fd13088c86a5e7045b3_955x654.png)
# 宝塔防火墙配置
开启2080和9090端口
![](https://img.kancloud.cn/f7/60/f76029a81055db75da1c2267109ba877_815x557.png)
![](https://img.kancloud.cn/42/cb/42cbeda54e9cb08dfbb7278e5f3f7553_1021x626.png)
![](https://img.kancloud.cn/b9/51/b9519aa0ce0660d8b3535e16d89a2800_923x424.png)
![](https://img.kancloud.cn/4d/48/4d48f13f48dea7b49d344ca420ed116b_674x339.png)
![](https://img.kancloud.cn/91/0c/910c697e271fc22d6fe004bcf59f36bf_725x676.png)
![](https://img.kancloud.cn/bf/f1/bff18d560f16663483f20addd72b71a5_919x571.png)
![](https://img.kancloud.cn/19/e4/19e466f37b0d590515c46bdf602d12cb_746x443.png)
![](https://img.kancloud.cn/de/df/dedfc1681f2eaacad08f25c6117f4354_844x897.png)
# 伪静态设置
**NGINX配置如下**
Nginx伪静态规则使用如下规则
~~~
location / {
location ~ ^/(upload|assets)/.*\.(php|php5|jsp)$ {deny all;return 404;
}
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}
~~~
![](https://img.kancloud.cn/88/74/887450c01814519b2ced8273414ad09b_786x784.png)
**Apache配置如下**
Apache伪静态规则使用如下规则
~~~
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L]
</IfModule>
~~~
![](https://img.kancloud.cn/63/4c/634ccabb7c022ce95a431cd4f1a0c57a_696x663.png)
# 安装系统
访问网址`http://你的域名/install.php`进入安装程序:
![](https://img.kancloud.cn/f3/f7/f3f7af4f052827ee78ff3130fb9d6e47_725x906.png)
![](https://img.kancloud.cn/d0/bb/d0bbd13a9cbde2620993fbd75aedbe73_708x908.png)
数据库信息
Host:数据库服务器的IP,如果数据库和站点是同一服务器则可填写`127.0.0.1`或`localhost`;
Database name:您的数据库名称;
Username:对应数据库的用户名;
Password:数据库的密码;
超级管理员注册
Username:管理中心超级用户账号
Password:管理中心超级用户密码
服务器端口配置
App\_key:推送服务的app\_key(一般默认即可)
App\_secret:推送服务的app\_secret(一般默认即可)
App\_id: 推送服务的app\_id(一般默认即可)
websocket 地址:推送服务的websocket地址(自动获取,一般默认即可)
Api地址:推送服务器的api地址(自动获取,一般默认即可)
websocket 端口:推送服务的websocket端口(自定义,没有被占用的端口,注意:防火墙必须允许该端口)
Api端口:推送服务的api端口号(自定义,没有被占用的端口,注意:防火墙必须允许该端口)
registToken:默认即可
* * *
安装成功页面:
![](https://img.kancloud.cn/d8/b3/d8b3ae84ecf3a3a561845c67c94d12f0_724x265.png)
# 开启推送服务
[进入文件夹/wwwroot/域名/ymwl_pusher目录,点击winstart.bat文件]
![](https://img.kancloud.cn/17/70/1770dd9cd5c8720c9f79610ad7483d17_439x363.JPG)
如果运行winstart.bat文件提示 “php不是内部或外部命令,也不是可运行的程序或批处理文件” 或打开一闪黑窗口不见了
请参考https://blog.csdn.net/username666/article/details/106897020
切记winstart.bat启动后不能关闭
*****
# Windows防火墙添加入站规则放行2080端口、9090端口
![](https://img.kancloud.cn/ef/64/ef643765c5d839e2e1e6ec3d8acef67a_1125x629.png)
![](https://img.kancloud.cn/2b/41/2b410a87f83f70f6cffb85cf87fa3f8a_852x614.png)
![](https://img.kancloud.cn/cf/bf/cfbf4536c949d7f0c3bddae1b5580c32_899x551.png)
![](https://img.kancloud.cn/d9/c3/d9c39c57dfcb1ca28c2230cad913aea3_902x558.png)
![](https://img.kancloud.cn/3b/95/3b952ce986cd7e9f0a2fcfcbecf5f661_716x531.png)
![](https://img.kancloud.cn/48/1f/481fb6c2c1c39e4654f862f3922248af_711x520.png)
![](https://img.kancloud.cn/1d/67/1d6740e0719dd0719f202d7ddccf717c_708x530.png)
![](https://img.kancloud.cn/35/28/35288aa7dc12ac9e3cfd12acbdba9c96_718x530.png)
![](https://img.kancloud.cn/34/dd/34dd6e0079e1c245e6da5ff79fd71f5c_723x535.png)
![](https://img.kancloud.cn/ba/b0/bab0c830ed53a9396f9e12d6b9c22611_901x553.png)
根据上面的步骤依次添加入站规则放行9090端口,如果将来域名添加ssl认证还需要放行443和788端口
*****
# 服务器安全组配置
如果您的服务器是阿里云或腾讯云的服务器,需要配置安全组,**公网入方向和出方向**都允许2080和9090端口
![](https://img.kancloud.cn/bd/3d/bd3dac6a5cf362a6342b7c37a0aff479_1145x513.png)
![](https://img.kancloud.cn/fc/91/fc914c1d9a758adabb8db18904582f97_939x299.png)
**至此程序安装完成,感谢使用,如有安装不成功的朋友欢迎到[“淘宝Joomla一站通店铺”](https://item.taobao.com/item.htm?spm=a1z10.1-c-s.w5003-23029558665.60.7108c9302k8xnf&id=602703817186&scene=taobao_shop)咨询,掌柜会在第一时间解决问题,谢谢!**