# 安裝精靈

Chamilo 2.0 includes a web-based installation wizard that guides you through the initial setup. The wizard runs automatically when you access the platform for the first time.

## Before You Start

Ensure the following prerequisites are met:

1. Your server meets all [server requirements](/2.x-zh-tw/guan-li-zhi-nan/admin-guide/installation/server-requirements.md).
2. You have downloaded a packaged (zip or tar.gz) version of Chamilo.
3. Your web server is configured to serve the `public/` directory as the document root.
4. Your `.env` file exists and is empty (the wizard will guide database setup).

## Step 1: Installation Language

![Installation wizard Step 1 — language selection](/files/5GlnnXer9d01TVvOiMdc)

The first step lets you select the language for the installation process. Choose your preferred language from the dropdown.

If Chamilo detects an existing installation (for an upgrade), it will display the migration status and offer an upgrade path instead of a fresh install.

## Step 2: Requirements Check

![Installation wizard Step 2 — requirements check showing PHP version, extensions, and directory permissions](/files/AoCodyMSSGeyCDHVJZPs)

The wizard checks your server environment:

* **PHP version** is 8.2 or superior
* **Required PHP extensions** are installed (intl, gd, curl, zip, mbstring, xml, etc.)
* **Recommended PHP settings** — `date.timezone` is configured, adequate upload/memory limits
* **Directory and file permissions** — `var/`, `config/`, and `public/upload/` are writable by the web server

If any requirements are not met, the wizard displays warnings or errors. Resolve them before proceeding.

## Step 3: License

![Installation wizard Step 3 — license acceptance](/files/zsVp2m8ANK2YnZ3UtcxP)

This step displays the GNU/GPLv3 license. You must check the **"I accept"** checkbox to proceed.

Optionally, you can expand the **Contact information** section to provide details about your organization (name, email, company, country). This is voluntary and helps the Chamilo community understand who uses the platform, but will also allow us to contact you *very rarely* about events happening close to you.

## Step 4: Database Settings

![Installation wizard Step 4 — database connection configuration](/files/4LhK7uN9Mu0Z2pt1PoGY)

Enter your database connection details:

| Field                 | Description                                                                   |
| --------------------- | ----------------------------------------------------------------------------- |
| **Database host**     | The hostname or IP of your database server (e.g., `localhost` or `127.0.0.1`) |
| **Database port**     | Default: 3306 for MySQL/MariaDB                                               |
| **Database name**     | The name of the database to use (alphanumeric and underscores only)           |
| **Database user**     | A database user with full privileges on the specified database                |
| **Database password** | The password for the database user                                            |

Click **Check database connection** to test. The wizard will not let you proceed until the connection is successful. If the database already exists, a warning is displayed.

## Step 5: Configuration Settings

![Installation wizard Step 5 — administrator account, portal settings, and email configuration](/files/94nO7o6O23S8I39TLGYP)

This step combines administrator account creation, portal settings, and email configuration.

### Administrator Account

| Field          | Description                                                      |
| -------------- | ---------------------------------------------------------------- |
| **Login**      | The administrator username                                       |
| **Password**   | Choose a strong password — this account has full platform access |
| **First name** | The administrator's first name                                   |
| **Last name**  | The administrator's last name                                    |
| **Email**      | Used for system notifications and password resets                |
| **Phone**      | Optional contact number                                          |

These admin details will also be used by Chamilo to populate the support contact details, so make sure you go reconfigure that in the settings after the installation concluded.

### Portal Settings

| Field                                  | Description                                             |
| -------------------------------------- | ------------------------------------------------------- |
| **Language**                           | The default interface language                          |
| **Portal name**                        | The name of your platform (e.g., "My Organization LMS") |
| **Company short name**                 | Your organization's abbreviated name                    |
| **Company URL**                        | Your organization's website                             |
| **Encryption method**                  | Password hashing algorithm — **bcrypt** is recommended  |
| **Allow self-registration**            | Yes / No / After approval                               |
| **Allow self-registration as trainer** | Yes / No                                                |

### Email Configuration

The email settings section lets you configure the mail transport (SMTP, Amazon SES, Mailjet, etc.) and test email delivery. See [Email Configuration](/2.x-zh-tw/guan-li-zhi-nan/admin-guide/installation/email-configuration.md) for details.

All these settings can be changed later from the administration panel.

## Step 6: Last Check Before Install

![Installation wizard Step 6 — review of all settings before installation](/files/ku8mx2ADJVwoJtoU7i95)

This step displays a summary of everything you entered for review:

* Administrator credentials (password is hidden by default — click the eye icon to reveal)
* Portal settings
* Database connection details

Review carefully, then click **Install Chamilo** to execute the installation. The wizard creates all database tables, populates initial data, and configures the platform.

## Step 7: Installation Complete

![Installation wizard Step 7 — completion with security advice and portal link](/files/7Bd8w5sK7kExx6x4QgpJ)

After installation completes successfully, the wizard shows:

* **Getting started advice** — Suggests creating your first course to explore the platform (as admin, you need to do this from the admin panel)
* **Security recommendations**:
  * Make the `config/` directory read-only (`chmod 0555`)
  * Delete the `public/main/install/` directory
* A **link to your portal** to log in with the administrator credentials you just created

## Post-Installation

After completing the wizard:

* **Remove or restrict access to the installer** -- The wizard should not be accessible after installation. Chamilo typically locks it automatically, but verify that re-visiting the install URL redirects to the login page.
* **Configure email delivery** -- See [Email Configuration](/2.x-zh-tw/guan-li-zhi-nan/admin-guide/installation/email-configuration.md).
* **Set up backups** -- Before adding content, configure automated database and file backups (Chamilo does not provide a solution for this, but copying the var/ folder and the database are the 2 most important elements).
* **Review security settings** -- See [Security Settings](/2.x-zh-tw/guan-li-zhi-nan/admin-guide/platform-settings/security-settings.md).

## Troubleshooting

| Problem                        | Solution                                                                                                                     |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| Blank page at install URL      | Check PHP error logs. Change to `APP_ENV=dev` in .env temporarily to see errors in the browser.                              |
| Database connection fails      | Verify credentials, confirm the database exists, check that the database server allows connections from the web server host. |
| Permission denied errors       | Ensure `var/` is writable by the web server user.                                                                            |
| Assets not loading (no CSS/JS) | Run `yarn install && yarn build` to compile frontend assets.                                                                 |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chamilo.org/2.x-zh-tw/guan-li-zhi-nan/admin-guide/installation/installation-wizard.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
