こんにちは、MacにおけるEC-CUBE4の開発環境構築手順です。
やり方はたくさんありますが、初めての方は今回紹介する手順が良いでしょう。
はじめに
0. Macにhomebrewをインストールしていない方はコチラ
EC-CUBE4インストール
1.任意のフォルダでgit clone
$ git clone https://github.com/EC-CUBE/ec-cube.git
2. ダウンロードしたフォルダに移動
$ cd ec-cube
3. 依存関係のライブラリをインストール
$ composer install
4. EC-CUBE4のインストール
$ bin/console e:i
EC-CUBE Installer Interactive Wizard
====================================
If you prefer to not use this interactive wizard, define the environment valiables as follows:
$ export APP_ENV=dev
$ export APP_DEBUG=1
$ export DATABASE_URL=database_url
$ export DATABASE_SERVER_VERSION=server_version
$ export MAILER_URL=mailer_url
$ export ECCUBE_AUTH_MAGIC=auth_magic
... and more
$ php bin/console eccube:install --no-interaction
5. 3回Enterで最後は「yes」を入力
Database Url [sqlite:///var/eccube.db]:
>
Mailer Url [null://localhost]:
>
Auth Magic [lsDLkCPPm1nBJQT3]:
>
!
! [CAUTION] Execute the installation process. All data is initialized.
!
Is it OK? (yes/no) [yes]:
> yes
Run doctrine:database:create...
Created database var/eccube.db for connection named default
Run doctrine:schema:drop --force...
Dropping database schema...
[OK] Database schema dropped successfully!
Run doctrine:schema:create...
! [CAUTION] This operation should not be executed in a production environment!
Creating database schema...
[OK] Database schema created successfully!
Run eccube:fixtures:load...
> Finished Successful!
Run cache:clear --no-warmup...
// Clearing the cache for the dev environment with debug
// true
[OK] Cache for the "dev" environment (debug=true) was successfully cleared.
[OK] EC-CUBE installation successful.
最終的にOKが出れば問題なしです。
6. ビルドインWebサーバーの起動
$ bin/console server:run
[OK] Server listening on http://127.0.0.1:8000
// Quit the server with CONTROL-C.
PHP 7.2.31 Development Server started at Mon Aug 31 21:18:01 2020
Listening on http://127.0.0.1:8000
Document root is /Users/******/EC-CUBE4
Press Ctrl-C to quit.
7.以下の画面で表示されていれば完了です。

お疲れ様でした!
スポンサーリンク
スポンサーリンク