Skip to content

Instantly share code, notes, and snippets.

@s-hiroshi
Last active September 22, 2016 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s-hiroshi/6fbffa8a798de40909fa0be1f325fe15 to your computer and use it in GitHub Desktop.
Save s-hiroshi/6fbffa8a798de40909fa0be1f325fe15 to your computer and use it in GitHub Desktop.
開発環境構築 EC-CUBE3 ビルトインサーバーで構築するまとめです。

リソース

新規インストール

ソースソースをGitHubからクローンしインストールスクリプト(eccube_install.sh)を実行します。
スクリプトはDBの作成、Composer処理、設定ファイル作成などを行います。

下記はあらかじめDBを用意しeccube_install.shのDB設定関連を変更し実行します。

インストール後はinstall.phpを削除してください。

DB準備

項目
DB名 eccube3
DBユーザー名 cube3
パスワード cube3

DBサーバー起動

$ mysql.server start

DB作成

CREATE DATABASE eccube3 DEFAULT CHARACTER SET utf8;

ユーザー追加・権限権限付与

GRANT ALL PRIVILEGES ON `eccube3`.* TO 'cube3'@'localhost' IDENTIFIED BY 'cube3' WITH GRANT OPTION;

開発者用ソースダウンロード

git clone https://github.com/EC-CUBE/ec-cube

必要であればディレクトリ名をec-cubeへ変更します。
ec-cubeをプロジェクトのトップディレクトリとします。

eccube_install.sh 修正・実行

eccube_install.shのDB設定箇所を適宜変更しスクリプトを実行します。

$ cd /path/to/ec-cube
$ sh eccube_install.sh mysql

ビルトインサーバー起動

$ cd/path/to/ec-cube
$ php -S localhost:8080 -t html

ブラウザでインストール処理

下記アドレスへアクセスしてインストールを実行します。

http://localhost:8080/install.php

install.php削除

install.phpを削除します。

アップデート

http://ec-cube.github.io/update.html

  1. 最新ソースクローン
  2. ソースマージ
  3. DBマイグレーション

ソースマージ

src html vendorディレクトリを最新のファイルですべて上書きしてください。

DBマイグレーション

http://インストール先/install.php/migration

6 不要ファイルの削除
アップデート後は以下のファイルを必ず削除してください。
html/install.php
html/index_dev.php (開発用途で使用する場合は残す)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment