rudderrave / yii2-rave-cms-erp
基于 Yii 2 高级项目模板的 Rave CMS&ERP
dev-master
2020-09-30 13:21 UTC
Requires
- php: >=5.4.0
- rudderrave/yii2-comments: dev-master
- rudderrave/yii2-rave-auth: dev-master
- rudderrave/yii2-rave-comment: dev-master
- rudderrave/yii2-rave-core-rest: dev-master
- rudderrave/yii2-rave-media: dev-master
- rudderrave/yii2-rave-menu: dev-master
- rudderrave/yii2-rave-page: dev-master
- rudderrave/yii2-rave-post: dev-master
- rudderrave/yii2-rave-seo: dev-master
- rudderrave/yii2-rave-settings: dev-master
- rudderrave/yii2-rave-translation: dev-master
- rudderrave/yii2-rave-user: dev-master
- yiisoft/yii2: ~2.0.6
- yiisoft/yii2-bootstrap: ~2.0.6
- yiisoft/yii2-swiftmailer: ~2.0.6
Requires (Dev)
- yiisoft/yii2-codeception: ~2.0.5
- yiisoft/yii2-debug: ~2.0.9
- yiisoft/yii2-faker: ~2.0.3
- yiisoft/yii2-gii: ~2.0.5
This package is auto-updated.
Last update: 2024-09-29 05:48:56 UTC
README
RaveCMS&ERP - 基于 Yii2 PHP 框架的控制面板
安装
安装 Rave CMS&ERP 应用程序。
- 使用 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
```
-
初始化已安装的应用程序
执行
init
命令并选择dev
或prod
作为环境。cd /var/www/mysite.com/ php init
-
配置您的 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; } }
-
创建一个新的数据库,并相应地调整
common/config/main-local.php
中的components['db']
配置。 -
使用控制台命令
php yii migrate --migrationLookup=@ravesoft/yii2-rave-core-rest/migrations/,@ravesoft/yii2-rave-auth/migrations/,...
应用所有迁移。 -
使用控制台命令
php yii init-admin
初始化根用户。 -
在
common/config/main-local.php
中配置您的['components']['mailer']
。
#####您的 Yee CMS
应用程序已安装。访问您的网站 mysite.com
或管理面板 mysite.com/admin
,网站应该可以正常工作,并显示消息 恭喜!您已成功创建了基于 Yii 的应用程序。