# 咸鱼云网盘 **Repository Path**: xiaotao233/webdisk ## Basic Information - **Project Name**: 咸鱼云网盘 - **Description**: No description available - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 0 - **Created**: 2020-08-16 - **Last Updated**: 2022-12-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 基于PHP Laravel的咸鱼云(未开发完成) 运行环境: * PHP版本:>= 7.4 * 操作系统:GNU/Linux * BCMath PHP 拓展 * Ctype PHP 拓展 * Fileinfo PHP 拓展 * JSON PHP 拓展 * Mbstring PHP 拓展 * OpenSSL PHP 拓展 * PDO PHP 拓展 * Tokenizer PHP 拓展 * XML PHP 拓展 * Redis PHP 拓展 * Redis 服务器 * MySQL 服务器 项目部署: 1. 安装拓展 ```shell apt install php7.4-{xml,mysql,mbstring} ``` 2. 安装依赖 ```shell composer install ``` 若有报错需要其他则根据提示安装拓展即可 3. 配置.env环境变量 ```shell cp .env.example .env ``` 在.env中配置好数据库信息(DB开头的字段)和以下两个变量 - `RES_ROOT` 资源目录 - `TEMP_DIR` 文件共享临时存储目录 4. 在项目目录运行Laravel数据库迁移 ```shell php artisan migrate ``` 5. 配置Nginx,以下为示例 ```nginx server{ listen 80; server_name _; # root设为项目目录下的public root /home/pi/web/webdisk/public; client_max_body_size 8192m; add_header X-Frame-Options "SAMEORIGIN"; add_header X-XSS-Protection "1; mode=block"; add_header X-Content-Type-Options "nosniff"; index index.html index.htm index.php; charset utf-8; location / { try_files $uri $uri/ /index.php?$query_string; } location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } error_page 404 /index.php; location ~ \.php$ { fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; fastcgi_read_timeout 7200; fastcgi_send_timeout 7200; } location ~ /\.(?!well-known).* { deny all; } } ``` 6. 其他自定义配置 1. 配置下载节点 在`app/Webdisk/config.php`的`DOWNLOAD_NODE`常量中配置 2. 配置系统状态信息中的网卡信息 替换`app/Http/Controllers/Webdisk/Admin/SystemController.php`的56,58行中的`enp3s0`为目标网络接口名称 后期会开发Web配置面板以取代部分繁琐的手动修改代码配置