介绍
Magento是由Varien Inc.开发的开源电子商务平台。它完全用PHP编写, 于2008年3月31日发布。它被e-bay收购, 后者在2015年11月17日发布了Magento2。在本教程中, 我们将在MacOS上安装Magento。
先决条件
- MacOS的
- 在终端上以管理员身份登录
- PHP扩展dom。
- PHP扩展卷曲。
- PHP扩展mcrypt。
- PHP扩展simplexml。
- PHP扩展spl。
- PHP扩展xsl。
- PHP扩展国际
- PHP扩展mbstring。
- PHP扩展名ctype。
- PHP扩展哈希。
- PHP扩展openssl。
- PHP扩展zip。
- PHP扩展xmlwriter。
- PHP扩展名gd。
- PHP扩展图标v。
安装
安装包括以下步骤。
1.下载并解压缩文件
为了在MacOS上安装Magento, 我们需要先通过访问其官方网站https://magento.com/tech-resources/download下载文件, 然后将文件提取到/ Library / WebServer / Documents中并运行以下命令。
$ tar xvfz magento2-2.2.2.tar.gz
2.启动开发服务器
导航至提取Magento的目录, 然后运行以下命令以启动PHP开发服务器。
$ php -S 127.0.0.1:8080

3.在浏览器上访问
我们只需要在浏览器的搜索栏中输入localhost:8080, 即可在浏览器上访问Magento, 我们将得到如下所示的浏览器屏幕。

单击同意并设置Magento以导航到下一步。

单击开始准备检查, 系统将开始检查是否满足需求。

此步骤提示我们填写数据库详细信息。为此, 我们需要通过运行以下命令来创建MySQL数据库。
$ mysql -u root ?password "123"
其中root是用户名, 123是密码。现在, 我们可以通过在MySQL Shell上键入以下命令来创建数据库。
$ create database magento;
现在, 我们可以如下填充数据库详细信息。






因此, 现在我们在MacOS上安装了磁电机。使用用户名和密码登录网站。