ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
**安装须知:** 准备一台服务器,服务器系统centos7都可以,一个已经备案好的域名 如果你的服务器是阿里云的,那么域名必须也是阿里云的 服务器需要安装宝塔,如果不会安装可以联系客服帮忙安装 安装宝塔需要放开8888、888、80、443、20、22、21端口 宝塔一键安装命令 `yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh ed8484bec` **进入宝塔后台安装以下环境** ![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1663987230010-4d96e278-4247-46b8-b5fa-2ab0c7b7e1bc.png) **1\. 解析域名到服务器的外网IP** **2\. 新建站点,输入域名,建立数据库** ![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1663987258299-9e64f7ad-0cc0-4826-a74c-9b8ab4096a80.png) **3\. PHP安装扩展** **fileinfo redis mcrypt imagemagick Swoole4** ![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1663987345056-eb2a8d83-dcd3-4ad4-8ab3-1f802cee7f8f.png) ![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1663987352263-e4f4d559-c245-4a1c-97a6-8b5d82564f77.png) **4\. 删除函数exec跟shel\_exec** ![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1663987650797-b0515b95-c31f-4d48-a4c6-f90a3604e5e3.png) **5\. 配置伪静态** ~~~plain location / { # 如果找不到真实存在的文件,把请求分发至 index.php try_files $uri $uri/ /index.php?$args; } ~~~ ![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1663987659816-8183bede-783d-4ce7-8205-d4ac0186c7ee.png) **6\. 申请SSL,如果是其他证书,直接复制填到其他证书内,建议开启强制https** ![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1663987667783-fa35287f-5511-487d-be96-ca42ce997b4c.png)![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1663987674016-29f889f0-5fdc-4c04-bd15-746e779eb94a.png) **7\. 点击目录,上传安装包并解压,修改storage文件权限为777** ![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1664003140802-768005d6-422e-4e28-a279-142133efb9a1.png) ![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1664003259987-e4f5fdf4-5289-4fb9-aa2f-4f1e2f411028.png)![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1665299900106-234ee477-619a-4bff-a182-54cd77f0aa60.png)![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1665299947307-79794ca5-9ca2-4b04-858d-10b1c2ba7197.png)![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1665299965298-42bccbe6-b8e4-447f-8dbf-04813fe05672.png) ![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1664443009156-1c192572-2cd0-4639-8cc9-c1284ff66889.png) **8\. 取消防跨站,选择运行目录/public,保存** ![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1663987732980-0b847f59-df8b-4a41-8a97-cd33a36da021.png) **9\. 复制ixed.8.0.in到目录/www/server/php/80/lib/php/extensions/no-debug-non-zts-20200930** ![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1663987744209-9b704811-78c9-4f40-9000-e8ea94132b3e.png)![](https://cdn.nlark.com/yuque/0/2022/png/26695458/1663987753475-fba83768-6a40-4261-a1b6-24116ee35263.png)**10\. 修改PHP-8.0配置文件**