# filesystem **Repository Path**: jcm_dir/filesystem ## Basic Information - **Project Name**: filesystem - **Description**: No description available - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-01-28 - **Last Updated**: 2021-11-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Filesystem * 产品名称:乐信文件系统 Filesystem 为及时聊天软件`乐信`的提供了文件管理,使用 Laravel 5.6 开发。 ## 运行环境要求 * Nginx 1.14+ * PHP 7.2+ * MySQL 5.7+ * Redis 4.0+ ## 开发环境部署/安装 本项目代码使用 PHP 框架 [Laravel 5.6](https://laravel-china.org/docs/laravel/5.6/) 开发,本地开发环境使用 [Laravel Homestead](https://laravel-china.org/docs/laravel/5.6/homestead/1285)。 下文将在假定读者已经安装好了 Homestead 的情况下进行说明。如果您还未安装 Homestead,可以参照 [Homestead 安装与设置](https://laravel-china.org/docs/laravel/5.6/homestead/1285#installation-and-setup) 进行安装配置。 ## 基础安装 ### 1. 克隆源代码 克隆 `chat` 源代码到本地: ```bash git clone git@gitee.com:lym125/filesystem.git ``` ### 2. 配置本地的 Homestead 环境 1). 运行以下命令编辑 Homestead.yaml 文件: ``` homestead edit ``` 2). 加入对应修改,如下所示: ``` folders: - map: ~/my-path/filesystem/ # 你本地的项目目录地址 to: /home/vagrant/filesystem sites: - map: filesystem.test to: /home/vagrant/filesystem/public databases: - filesystem ``` 3). 应用修改 修改完成后保存,然后执行以下命令应用配置信息修改: ``` homestead provision ``` 随后请运行 `homestead reload` 进行重启。 ### 3. 安装扩展包依赖 ``` composer install ``` ### 4. 生成配置文件 ``` cp .env.example .env ``` 你可以根据情况修改 .env 文件里的内容,如数据库连接、缓存、邮件设置等: ``` # 文件下载地址 APP_DOWNLOAD_URL=http://download.filesystem.test ``` ### 5.生成数据表及生成测试数据 ``` php artisan migrate --seed ``` ### 7. 生成秘钥 ``` php artisan key:generate ``` ### 8. 配置 hosts 文件 ``` echo "192.168.10.10 filesystem.test" | sudo tee -a /etc/hosts ``` ## 扩展包使用清单 |扩展包|描述|应用场景| | :- | :- | :- | |[appstract/laravel-opcache](https://github.com/appstract/laravel-opcache)|使用 Laravel Artisan 命令调用 php opcache|生产环境下使用 php opcache 提高php性能| ## 自定义 Artisan 命令 |命令行名字|描述|Cron|代码调用| | :- | :- | :- | :- | | `security:generate` | 生产应用的秘钥 | 手动为指定的应用生产秘钥 | 无 |