cargic/edu

There is no license information available for the latest version (dev-master) of this package.

Yii2 demo

Maintainers

Details

github.com/cargic/edu

Source

Issues

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Language:Roff

Type:project

dev-master 2017-07-26 07:04 UTC

This package is not auto-updated.

Last update: 2024-11-15 20:47:23 UTC


README

企业系统使用Yii2框架开发,使用composer管理php依赖包(测试)

安装步骤

  1. 安装 composer.
  2. 在根目录执行以下命令来加载php依赖包文件
    • composer install
    • 生产环境加上 --no-dev 参数安装依赖包
  3. 配置Apache/nginx根路径
    • /path/to/server/frontend/web/
    • /path/to/server/backend/web/
    • /path/to/server/api/web/
  4. 配置文件夹权限
    • /path/to/server/backend/runtime 0755 apache apache
    • /path/to/server/backend/web/assets 0755 apache apache
    • /path/to/server/frontend/runtime 0755 apache apache
    • /path/to/server/frontend/web/assets 0755 apache apache
    • /path/to/server/api/runtime 0755 apache apache
    • /path/to/server/console/runtime 0755 apache apache
    • /path/to/server/data/uploads 0755 apache apache
  5. 数据库配置
    • /path/to/server/common/config/db.php
  6. memcached配置
    • /path/to/server/frontend/config/main.php
    • /path/to/server/backend/config/main.php
    • /path/to/server/api/config/main.php
    • /path/to/server/console/config/main.php
  7. redis配置
    • /path/to/server/common/config/main.php
  8. 其他参数配置
    • /path/to/server/common/config/params.php
  9. 关闭调试模式及修改环境为生产环境
    • /path/to/server/frontend/web/index.php
    • /path/to/server/backend/web/index.php
    • /path/to/server/api/web/index.php
    • defined('YII_DEBUG') or define('YII_DEBUG', false);
    • defined('YII_ENV') or define('YII_ENV', 'product');
  10. 定时任务配置
  • crontab -e
  • MAILTO=''
  • */5 * * * * /path/to/server/console/yii trackingcode/subscribe

项目结构

  1. api为接口目录
  2. backend为后台管理目录
  3. console为脚本目录
  4. frontend为前端用户目录
  5. common为公用配置/类库目录
  6. data为资源上传目录

脚本配置