magento 1.9.2 php7.0,magento在本地php7上安装方法(2)

Magento 2 is the new version of Magento framework which has many changes and advantages as compared to previous versions like site maintenance, easy to handle dashboard, obviously fast performance etc. The main and important aspects are the enhanced Admin Panel, separate tables for order processing, better image compression by default, static content caching etc.

PHP7 is an improved version of PHP Scripting Language which is ready for development and production environment. It has 2x faster performance and more than 50% lower memory consumption than previous PHP 5.6 version.

In this tutorial, we are going to use EasyPHP DevServer v16.1 (you can also use the latest version if it has been released) which includes Apache 2.4.17, PHP v7.0.1, PhpMyAdmin v4.5.2 and MySQL v5.7.9. Download and install it and make sure to set the path of PHP.EXE and PHP.INI in the Environment Variable. Also we are going to install Composer. Magento is now using Composer for dependency management. Composer enables Magento 2 to manage its components and dependencies. Download Composer via this link and install it.

We selected EasyPHP DevServer on the basis of official system requirements of Magento 2. Here are the official Magento 2 system requirements:

WEB SERVERS:

Apache 2.4 or 2.2 (In addition, the apache mod_rewrite module must be enabled. mod_rewrite enables the server to perform URL rewriting)

OR

nginx 1.8 (or latest mainline version)

DATABASE:

MySQL 5.7.x

OR

MySQL 5.6.x

PHP:

7.0.x

OR

5.6.x

OR

5.5.x (Magento no longer supports PHP 5.4.x)

Before you begin Magento 2 installation on your localhost, you should know that Magento 2 requires some extensions support for PHP7. Make sure you have the following PHP7 extensions installed and enabled on your EasyPHP DevServer:

pdo_mysql

mbstring

mcrypt

mhash

SimpleXML

curl

xsl

gd

imagick or ImageMagick 6.3.7 or later

soap

intl

bcmath

openssl

For more information about Magento 2 system requirements, visit Magento official website.

We are now ready to install Magento 2 on our local server. Here are the steps to follow:

STEP 1

Download Magento 2 zip file from official download page.

STEP 2

Start your EasyPHP DevServer. Right click on EasyPHP DevServer icon in Taskbar and click Open Dashboard.

Start-your-EasyPHP-DevServer-1.png

Start-your-EasyPHP-DevServer-2.png

STEP 3

On Dashboard, click start button below HTTP Server, Choose Apache as Server, Select PHP v7.0.1, Port 8888 and press start button.

configure-server-31.png

STEP 4

Return to Dashboard, now click start button below DATABASE Server, choose MySQL as Server and press start button.

4-e1456353470348.png

STEP 5

Return to your Dashboard and click on Portable Directory Link to explore the directory here we have to extract/unzip Magento 2 files and folders from the downloaded zip file. This is also known as ROOT Directory of your local server and in the rest of this article, we’ll refer to this directory as “ROOT”.

set-database.png

STEP 6

Create a new folder magento2 in ROOT and extract all the files and folders from the zip file to this directory using 7-Zip file archiver.

magento-2.png

magento-2-2.png

STEP 7

Go to your EasyPHP DevServer Dashboard, open PhpMyAdmin and create a new database – “magento2”.

create-database-for-magento-2.png

create-database-for-magento-2-2.png

STEP 8

Now we are ready to install Magento 2 on our local server. To access Magento installation/setup, enter your Magento 2 URL http://127.0.0.1:8888/magento2/ in your favorite web browser and hit enter. You’ll be automatically landed on the start page of Magento Setup, then click “Agree and Setup Magento”.

agree-and-setup-magento-2.png

Starting the Magento 2 Browser Installer

In this step, Magento will perform Readiness Check on your environment which includes PHP Version Check, PHP Settings Check, PHP Extension Check and File Permission Check. If you get any errors, you must resolve them in order to continue the setup.

magento-2-installer.png

magento-2-installer-localhost.png

In this step, Magento will ask you for some database details. Enter database server host “127.0.0.1”, username “root” and an already created database name “magento2”.

magento-2-localhost-database.png

Step 3 will ask for web configurations where you have to enter your Store Address and Admin URL. Change your Store Address to “http://127.0.0.1:8888/magento2/” (it may be set by default), and admin URL depends on what you wish.

magento-2-localhost-config.png

In this “Customize Your Store” section, you can select your timezone, currency and language of the future test Magento 2 store.

magento-2-localhost-customize.png

Enter Username, Email Address and Passwords to setup your Admin Panel’s credentials.

magento-2-credentials-localhost.png

Are you ready to install Magento 2 on your local server? Click “Install Now” and wait for a few mins.

NB: Do not close your browser until the setup is done and a success page appears!

magento-2-install-on-localhost-php7.png

magento-2-installing-localhost.png

A “Success” message will appear which will indicate the successful installation of Magento 2 on your local server but wait, it’s not over yet. Do not open your store address or admin panel URL. There are a few more things to do.

magento-2-successfully-installed.png

Now we are going to verify composer installation, deploy static content, clear/flush Magento cache and reindex the Magento 2 blocks by using Magento 2 CLI Commands. If you need to know more about it, read this article. To perform all the actions mentioned above, press WINDOWS KEY + R to open RUN dialog and type “cmd” to open Command Prompt.

open-console.png

Type “cd PATH_TO_YOUR_MAGENTO2_FILES” to enter the Magento 2 ROOT directory.

path-to-magento-2-files.png

Now, to verify Composer installation in the directory mentioned above, type “composer install”.

NB: If you get any error in this step, please double check your Composer installation.

magento-2-composer-install.png

In this step, we are setting up static content to deploy on our Magento store. To perform this, type “php bin/magento setup:static-content:deploy”.

NB: If you get any error, check your PHP.EXE and PHP.INI Environment Variable.

magento-2-static-content-deploy.png

Clear/Flush Magento 2 cache by typing “php bin/magento cache:flush” in the CMD.

flush-magento-2-cache-on-localhost.png

And finally, to Reindex Magento Static Blocks type “php bin/magento indexer:reindex”.

reindex-magento-2-static-blocks-on-localhost.png

Please visit your store address http://127.0.0.1:8888/magento2/ to access Frontend and your admin panel URL (my URL is http://127.0.0.1:8888/magento2/admin_cloudways) to access Admin Panel of your Magento 2 store.

We are done with Magento 2 setup and installation on your localhost. If you faced any problem, feel free to share it and comment below. Enjoy using Magento 2 with PHP7 configuration and discover the exclusive features of the new platform!

(责任编辑:最模板)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值