rudderrave/yii2-rave-cms-erp

基于 Yii 2 高级项目模板的 Rave CMS&ERP

安装: 1

依赖项: 0

建议者: 0

安全: 0

星星: 0

关注者: 2

分支: 0

开放性问题: 0

语言:CSS

类型:项目

dev-master 2020-09-30 13:21 UTC

This package is auto-updated.

Last update: 2024-09-29 05:48:56 UTC


README

RaveCMS&ERP - 基于 Yii2 PHP 框架的控制面板

安装

安装 Rave CMS&ERP 应用程序。

  1. 使用 Composer 安装
If you do not have [Composer](https://getcomposer.org.cn/), follow the instructions in the
[Installing Yii](https://github.com/yiisoft/yii2/blob/master/docs/guide/start-installation.md#installing-via-composer) section of the definitive guide to install it.

With Composer installed, you can then install the application using the following commands:

```bash
cd /var/www/
php composer.phar global require "fxp/composer-asset-plugin:^1.2.0"
php composer.phar create-project --prefer-dist --stability=dev ravesoft/yii2-rave-cms-erp mysite.com 
php composer.phar create-project --prefer-dist ravesoft/yii2-rave-cms-erp mysite.com 
```
  1. 初始化已安装的应用程序

    执行 init 命令并选择 devprod 作为环境。

    cd /var/www/mysite.com/
    php init
  2. 配置您的 Web 服务器

    对于 Apache 配置文件可以是以下内容

    <VirtualHost *:80>
      ServerName mysite.com
      ServerAlias www.mysite.com
      DocumentRoot "/var/www/mysite.com/"
      <Directory "/var/www/mysite.com/">
        AllowOverride All
      </Directory>
    </VirtualHost>

    对于 Nginx 配置文件可以是以下内容

    server {
        charset      utf-8;
        client_max_body_size  200M;
        listen       80;
    
        server_name  mysite.com;
        root         /var/www/mysite.com;
    
        location / {
            root  /var/www/mysite.com/frontend/web;
            try_files  $uri /frontend/web/index.php?$args;
    
            # avoiding processing of calls to non-existing static files by Yii
            location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
                access_log  off;
                expires  360d;
                try_files  $uri =404;
            }
        }
    
        location /admin {
            alias  /var/www/mysite.com/backend/web;
            rewrite  ^(/admin)/$ $1 permanent;
            try_files  $uri /backend/web/index.php?$args;
        }
    
        # avoiding processing of calls to non-existing static files by Yii
        location ~ ^/admin/(.+\.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar))$ {
            access_log  off;
            expires  360d;
    
            rewrite  ^/admin/(.+)$ /backend/web/$1 break;
            rewrite  ^/admin/(.+)/(.+)$ /backend/web/$1/$2 break;
            try_files  $uri =404;
        }
    
        location ~ \.php$ {
            include  fastcgi_params;
            # check your /etc/php5/fpm/pool.d/www.conf to see if PHP-FPM is listening on a socket or port
            fastcgi_pass  unix:/var/run/php5-fpm.sock; ## listen for socket
            #fastcgi_pass  127.0.0.1:9000; ## listen for port
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
            try_files  $uri =404;
        }
        #error_page  404 /404.html;
    
        location = /requirements.php {
            deny all;
        }
    
        location ~ \.(ht|svn|git) {
            deny all;
        }
    }
  3. 创建一个新的数据库,并相应地调整 common/config/main-local.php 中的 components['db'] 配置。

  4. 使用控制台命令 php yii migrate --migrationLookup=@ravesoft/yii2-rave-core-rest/migrations/,@ravesoft/yii2-rave-auth/migrations/,... 应用所有迁移。

  5. 使用控制台命令 php yii init-admin 初始化根用户。

  6. common/config/main-local.php 中配置您的 ['components']['mailer']

#####您的 Yee CMS 应用程序已安装。访问您的网站 mysite.com 或管理面板 mysite.com/admin,网站应该可以正常工作,并显示消息 恭喜!您已成功创建了基于 Yii 的应用程序