系统安装+环境要求
安装
站点配置及说明
环境要求
PHP >= 7.4 (不支持8.0)
PHP cURL 扩展
PHP OpenSSL 扩展
PHP fileinfo 拓展 素材管理模块需要用到
Mysql >= 5.7.7
Apache 或 Nginx
Composer (用于管理第三方扩展包)
安装CA证书 (windows开发环境下)
必须先看环境搭建文档,安装完毕后务必配置站点和对应的伪静态还有常见问题文档

隐藏内容
本内容需权限查看
  • 普通用户: 10金币
  • VIP会员: 5金币5折
  • 永久会员: 免费
已有3人解锁查看

2、进入目录

cd rageframe3
3、安装依赖
// (不建议) 可以忽略版本环境依赖进行安装 php composer.phar install –ignore-platform-reqs
php composer.phar install
4、初始化项目
php init // 然后输入0回车,再输入yes回车
5、配置数据库信息
找到 common/config/main-local.php 并配置相应的信息, 注意要先创建好数据库
6、安装数据库(Mysql5.7.7及以上)
php ./yii migrate/up
7、初始化账号密码,一键创建总管理员账号密码(注意保存)
php ./yii password/init
截止到这里就安装完成了,可以去配置站点了,下面(8、9步骤)的都是根据自己实际的情况去执行
8、建议更新第三方扩展包(可选)
php composer.phar update
9、Linux 下文件缓存权限授权
Linux 环境下如果是文件缓存去 backend/runtime 目录执行一下 chmod -R 777 cache,不执行可能会造成修改了网站设置缓存不生效的情况
站点配置
注意:Nginx/IIS 先要设置好伪静态,Apache 默认已配置
站点指向目录为当前项目的web下
例如:

/path/to/rageframe3/web/
访问说明

应用 Url
后台 当前域名/backend
商户 当前域名/merchant
Html5 当前域名/html5
Api 当前域名/api
OAuth2 当前域名/oauth2
安装成功后如果需要微信公众号管理、商户管理等等功能,请到 系统管理->应用管理 进行安装插件

伪静态:

Nginx

推荐配置

location / {
    try_files $uri $uri/ /index.php$is_args$args;
}
location /backend {
    try_files $uri $uri/ /backend/index.php$is_args$args;
}
location /api {
    try_files $uri $uri/ /api/index.php$is_args$args;
}
location /merchant {
    try_files $uri $uri/ /merchant/index.php$is_args$args;
}
location /html5 {
    try_files $uri $uri/ /html5/index.php$is_args$args;
}
location /oauth2 {
    try_files $uri $uri/ /oauth2/index.php$is_args$args;
}

location ~* ^/attachment/.*\.(php|php5)$ 
{
    deny all;
}

类似Apache的配置

location / 
{
     index  index.html index.htm index.php;

     if (!-e $request_filename) {
           rewrite ^/backend(.*)$ /backend/index.php?s=$1 last;
           rewrite ^/merchant(.*)$ /merchant/index.php?s=$1 last;
           rewrite ^/api(.*)$ /api/index.php?s=$1 last;
           rewrite ^/html5(.*)$ /html5/index.php?s=$1 last;
           rewrite ^/oauth2(.*)$ /oauth2/index.php?s=$1 last;
           rewrite ^/(.*)$ /index.php?s=$1 last;
           break;
     }
         
     #autoindex  on;
}

Apache

注意系统默认自带了.htaccess,所以环境如果是apache可以不用再配置

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php

IIS

rule 部分配置

<rule name="backend" stopProcessing="true">
    <match url="^backend/(.*)" />
    <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
    </conditions>
    <action type="Rewrite" url="backend/index.php/{R:1}" />
</rule>
<rule name="merchant" stopProcessing="true">
    <match url="^merchant/(.*)" />
    <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
    </conditions>
    <action type="Rewrite" url="merchant/index.php/{R:1}" />
</rule>
<rule name="html5" stopProcessing="true">
    <match url="^html5/(.*)" />
    <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
    </conditions>
    <action type="Rewrite" url="html5/index.php/{R:1}" />
</rule>
<rule name="api" stopProcessing="true">
    <match url="^api/(.*)" />
    <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
    </conditions>
    <action type="Rewrite" url="api/index.php/{R:1}" />
</rule>
<rule name="oauth2" stopProcessing="true">
    <match url="^oauth2/(.*)" />
    <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
    </conditions>
    <action type="Rewrite" url="oauth2/index.php/{R:1}" />
</rule>
<rule name="frontend" stopProcessing="true">
    <match url="^(.*)$" />
    <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
    </conditions>
    <action type="Rewrite" url="index.php/{R:1}" />
</rule>


声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。