ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
### 系统环境 * Linux 或 Windows (`推荐Linux`) * PHP 7.1+ * Apache 或 Nginx (`推荐Nginx`) * MySQL 5.6+ ### 开发环境 * Git客户端 * Composer ### 安装过程 #### 1. 下载源码 Gitee仓库 ```bash git clone https://gitee.com/fusionsdk/fusionaas.git ``` 或 Github仓库 ```bash git clone https://github.com/fusionsdk/fusionAAS.git ``` #### 2. 安装PHP依赖库 在项目的根目录下(包含`think`文件的目录),执行 ```bash composer install ``` #### 3. 数据库安装 在MySQL中创建数据库,库名建议为`fsdk_aas` ```bash create database `fsdk_aas` default character set utf8mb4 collate utf8mb4_unicode_ci; ``` 导入`sql\fsdk_aas.sql`文件进入数据库中 ```bash mysql -u root -p fsdk_aas < ./sql/fsdk_aas.sql ``` #### 4. 系统配置 将`data/config/database.php-sample`文件复制到同目录下,命名为`database.php`,修改其中相关数据库连接参数。 ### HTTP服务器配置 本系统支持Apache服务器或Nginx服务器,具体安装过程请到相关官网查看。 #### Apache服务器配置 以下为虚拟主机配置文件`conf/extra/httpd-vhosts.conf`中的站点定义 ``` <VirtualHost *:80> ServerName localhost DocumentRoot /your_site_save_path/fusionaas/public <Directory "/your_site_save_path/fusionaas/public/"> Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost> ``` #### Nginx服务器配置(推荐) 以下为虚拟主机配置文件`/etc/nginx/conf.d/your_site.conf`中的站点定义 ``` server { listen 80; server_name localhost; root /your_site_save_path/fusionaas/public; location / { index index.php index.html index.htm; if (!-e $request_filename) { #地址作为将参数rewrite到index.php上。 rewrite ^/(.*)$ /index.php?s=$1; #若是子目录则使用下面这句,将subdir改成目录名称即可。 #rewrite ^/public/(.*)$ /public/index.php?s=$1; } } location /api/ { index index.php index.html index.htm; if (!-e $request_filename) { #地址作为将参数rewrite到index.php上。 #rewrite ^/(.*)$ /api.php?s=$1; #若是子目录则使用下面这句,将subdir改成目录名称即可。 rewrite ^/api/(.*)$ /api.php?s=$1; } } #proxy the php scripts to php-fpm location ~ \.php { include fastcgi_params; set $path_info ""; set $real_script_name $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") { set $real_script_name $1; set $path_info $2; } fastcgi_param SCRIPT_FILENAME $document_root$real_script_name; fastcgi_param SCRIPT_NAME $real_script_name; fastcgi_param PATH_INFO $path_info; fastcgi_intercept_errors on; fastcgi_pass 127.0.0.1:9000; } location ^~ /data/runtime { return 404; } location ^~ /application { return 404; } location ^~ /simplewind { return 404; } } ```