如何在 Ubuntu 16.04 中安装 Magento

17 Mar 2025 | 阅读 2 分钟

引言

Magento 是一个开源的 CMS(内容管理系统)。它被广泛用作电子商务平台来创建电子商务网站。

在本教程中,我们将在 Ubuntu 操作系统中安装此 CMS。 在安装之前,我们必须满足以下所有先决条件。

前提条件

  • Ubuntu 16.04
  • LAMP (Linux Apache MySQL PHP)

以下 PHP 扩展

  • PHP 扩展 dom。
  • PHP 扩展 Curl。
  • PHP 扩展 mcrypt。
  • PHP 扩展 simplexml。
  • PHP 扩展 spl。
  • PHP 扩展 xsl。
  • PHP 扩展 intl。
  • PHP 扩展 mbstring。
  • PHP 扩展 ctype。
  • PHP 扩展 hash。
  • PHP 扩展 openssl。
  • PHP 扩展 zip。
  • PHP 扩展 xmlwriter。
  • PHP 扩展 gd。
  • PHP 扩展 iconv。

以 root 用户身份登录终端


安装 Magento

1) 下载并解压

从官方网站下载最新的 Magento 版本 下载 Magento./p>

下载后,将其解压到 /var/www/html/ 目录中。

2) 在 Localhost 上运行

首先,我们需要设置项目的权限以通过浏览器访问它。

现在,通过指定 localhost/megento 从 localhost 访问该文件夹。 浏览器将产生以下输出。

Software Magento 1

3) 设置 Magento

Software Magento 2

启动准备情况检查

在此阶段,Magento 安装程序会验证并检查 localhost 中所有必需的插件是否可用。

之后,它会生成报告并显示如下。

Software Magento 3

设置数据库

使用以下命令在 MySQL 中创建一个数据库。

提供数据库信息和凭据以使用数据库设置 Magento。

Software Magento 4

Web 配置

设置主页 url 和 Magento 管理地址。

Software Magento 5

设置日期时间和语言

Software Magento 6

创建管理员帐户

Software Magento 7

开始安装

Software Magento 8

安装进度

Software Magento 9

安装成功

Software Magento 10

使用 localhost/magento 访问主页

Software Magento 11

管理页面

通过使用 localhost/magento/admin 访问。

Software Magento 12