PHPackages                             engine-core/module-installation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. engine-core/module-installation

ActiveEc-extension[Utility &amp; Helpers](/categories/utility)

engine-core/module-installation
===============================

提供项目安装、卸载等操作

011PHP

Since Jun 21Pushed 4y ago1 watchersCompare

[ Source](https://github.com/engine-core/module-installation)[ Packagist](https://packagist.org/packages/engine-core/module-installation)[ RSS](/packages/engine-core-module-installation/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

module-installation
===================

[](#module-installation)

包含web端和console端的安装向导模块。模块提供项目安装、卸载等操作。

使用方法：
-----

[](#使用方法)

### 有两种方式使用该扩展，如果是开发者自建的应用项目，按照以下步骤完成即可。

[](#有两种方式使用该扩展如果是开发者自建的应用项目按照以下步骤完成即可)

一、`@common/config/main-local.php`文件里添加以下配置：

```
use EngineCore\extension\setting\SettingProviderInterface;

return [
    'container' => [
        'definitions' => [
            // 初始化安装助手类
            'EngineCore\modules\installation\helpers\InstallerHelper' => [
                /**
                 * 默认需要安装的扩展，格式参见
                 * @see \EngineCore\modules\installation\helpers\InstallerHelper::setDefaultExtensions()
                 */
                'defaultExtensions' => [
                    // https://github.com/engine-core/module-extension
                    'engine-core/module-extension' => [ // 用于管理系统扩展，建议下载安装
                        'app' => 'backend',
                    ],
                    // https://github.com/engine-core/controller-backend-site
                    'engine-core/controller-backend-site' => [ // 后台首页
                        'app' => 'backend',
                    ],
                ],
            ],
            // 默认采用文件方式存储系统设置数据
            'SettingProvider' => [
                'class' => 'EngineCore\extension\setting\FileProvider',
            ],
            // 默认采用文件方式存储系统菜单数据
            'MenuProvider' => [
                'class' => 'EngineCore\extension\menu\FileProvider',
            ],
        ],
    ],
    'params'     => [
        // 系统设置数据
        SettingProviderInterface::SETTING_KEY => [
            // 系统默认主题
            SettingProviderInterface::DEFAULT_THEME => [
                // https://github.com/engine-core/theme-basic
                'value' => 'engine-core/theme-basic',
                'extra' => 'engine-core/theme-basic:engine-core/theme-basic',
            ],
        ],
    ],
    // 数据库配置
    'components' => [
        'db' => [
            'class'               => 'yii\db\Connection',
            'dsn'                 => 'mysql:host=localhost;dbname=inOne',
            'username'            => 'root',
            'password'            => '',
            'charset'             => 'utf8',
            'tablePrefix'         => 'io_',
            'enableSchemaCache'   => false, // 关闭数据库元数据缓存
            'schemaCacheDuration' => 3600, // 数据库元数据缓存持续时间
        ],
    ],
];
```

二、`@backend/config/main-local.php`添加以下配置：

```
    'controllerMap' => [
        /**
         * 安装向导控制器所需的其它配置会自动加载
         *
         * 已有的配置数据参见：
         * @see \EngineCore\modules\installation\Info::getConfig()
         *
         * 其他配置的自动加载是通过调用`\EngineCore\Ec::$service->getExtension()->entity()->loadConfig()`方法实现
         * @see \EngineCore\extension\entity\ExtensionEntity::loadConfig()
         * @see \EngineCore\modules\installation\console\InstallationController::init()
         */
        'installation' => [
            'class' => 'EngineCore\modules\installation\console\InstallationController',
        ],
    ],
```

三、`@console/config/mian-local.php`添加以下配置：

```
    'controllerMap' => [
        /**
         * 安装向导控制器所需的其它配置会自动加载
         *
         * 已有的配置数据参见：
         * @see \EngineCore\modules\installation\Info::getConfig()
         *
         * 其他配置的自动加载是通过调用`\EngineCore\Ec::$service->getExtension()->entity()->loadConfig()`方法实现
         * @see \EngineCore\extension\entity\ExtensionEntity::loadConfig()
         * @see \EngineCore\modules\installation\console\InstallationController::init()
         */
        'installation' => [
            'class' => 'EngineCore\modules\installation\console\InstallationController',
        ],
    ],
```

四、在相应的应用里执行以下操作：

- `backend`应用：地址栏输入安装向导路由地址：`/installation`开始安装向导。
- `console`应用：命令行执行命令`./yii installation`开始安装向导。

### 如果开发者使用的是`inone`应用项目模板，仅需在命令行初始化安装环境即可，执行如下命令：

[](#如果开发者使用的是inone应用项目模板仅需在命令行初始化安装环境即可执行如下命令)

```
php init --env=Installation --overwrite=y
```

接着按照上述的第四个步骤执行安装向导即可。

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef0fd33526ea9ecb0881af0f45e9f93a9bf01e23f590438a446fc9b055cf2c4b?d=identicon)[e-kevin](/maintainers/e-kevin)

---

Top Contributors

[![e-kevin](https://avatars.githubusercontent.com/u/3927528?v=4)](https://github.com/e-kevin "e-kevin (5 commits)")

### Embed Badge

![Health badge](/badges/engine-core-module-installation/health.svg)

```
[![Health](https://phpackages.com/badges/engine-core-module-installation/health.svg)](https://phpackages.com/packages/engine-core-module-installation)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
