-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mac環境でMAMPを使用したローカルインストールの記事を書きました。 #107
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,215 @@ | ||
--- | ||
title: Mac環境でMAMPを使用したインストール方法 | ||
keywords: install MAMP | ||
tags: [quickstart, install, gui] | ||
permalink: quickstart_install/gui_mac_install | ||
forder: quickstart | ||
description: EC-CUBE4系をMAMPを使用してMacのローカル環境へインストールする方法を解説します。 | ||
--- | ||
|
||
## インストールの前に | ||
MAMPを使用してMacのローカル環境へインストールする方法を解説します。 | ||
この記事の構築環境は以下の通りです。 | ||
``` | ||
// サンプルの構築環境 | ||
MacOS 10.15.5(Catalina) | ||
EC-CUBE 4.0.3 | ||
MAMP 5.7 | ||
``` | ||
|
||
|
||
## MAMPをダウンロード、インストール | ||
まずはMAMPを準備します。 | ||
|
||
[MAMP公式サイト](https://www.mamp.info/en/mac/){:target='_blank'}へアクセスし、 | ||
「Free Download」からダウンロードページへ移動します。 | ||
「MAMP&MAMP PRO」の最新バージョンをダウンロードします。(この記事では5.7) | ||
|
||
インストールすると、アプリケーションの中にMAMPとMAMP PRO、2つのソフトがインストールされます。 | ||
こちらの解説ではMAMPを使用します。 | ||
|
||
|
||
## EC-CUBEをダウンロード | ||
続いて、EC-CUBEをダウンロードします。 | ||
[EC-CUBE公式サイトのダウンロードページ](https://www.ec-cube.net/download/){:target='_blank'}から最新版のEC-CUBEをダウンロードします。(この記事では4.0.3) | ||
※ ダウンロードには会員登録が必要です。 | ||
|
||
ダウンロードしたら解凍します。 | ||
|
||
|
||
|
||
## MAMPにEC-CUBEを配置 | ||
解凍したEC-CUBEをMAMPのhtdocsディレクトリ(フォルダ)に配置します。 | ||
|
||
**配置したディレクトリの構造でショップのトップページURLが決まります。** | ||
`http://localhost:8888/{htdocsの中に作成したディレクトリ名/}/` | ||
|
||
|
||
``` | ||
例:eccube-4.0.3というディレクトリ名をshopに変更しhtdocsの中に配置した場合 | ||
■ ディレクトリ構造 | ||
/Applications/MAMP/htdocs/shop/ | ||
|
||
■ ショップのトップページURL | ||
http://localhost:8888/shop/ | ||
``` | ||
※ まだEC-CUBEをインストールしていないので、ショップURLにアクセスしてもサイトは表示されません。 | ||
|
||
|
||
## phpバージョンの設定 | ||
EC-CUBE4.0.3は、**php7.1 〜7.3**で動作確認しています。 | ||
MAMPの環境設定から該当のphpバージョンに変更します。 | ||
|
||
MAMPを起動します。 | ||
|
||
Macの左上のメニューから「MAMP」→「Preferences」をクリックします。 | ||
![MAMP](/images/install/gui-mac/02.png) | ||
|
||
|
||
![MAMP](/images/install/gui-mac/03.png) | ||
|
||
設定画面が開くので「PHP」の項目から「7.3.9」にチェックをして「OK」をクリックします。 | ||
|
||
|
||
## データベース作成 | ||
MAMPからサーバーを立ち上げます。 | ||
|
||
![MAMP](/images/install/gui-mac/07.png) | ||
|
||
「Start Server」をクリックします。 | ||
|
||
MAMPのトップページが表示されます。 | ||
![MAMP](/images/install/gui-mac/04.png) | ||
|
||
ヘッダーメニューの「TOOLS」から「PHPMYADMIN」をクリックします。 | ||
|
||
phpMyAdminが開きます。 | ||
|
||
![phpMyAdmin](/images/install/gui-mac/05.png) | ||
|
||
「New」をクリックしてデータベース名を入力し、データベースを作成します。 | ||
※データベース名は外部から予測されにくい名前にしてください。 | ||
``` | ||
例 | ||
データベース名 | ||
`eccube123_` | ||
|
||
照合順序はutf8mb4_general_ciのままで問題ありません。 | ||
``` | ||
|
||
MAMPにはデータベースアカウントが標準で入っており、そちらを使用してEC-CUBEをインストールします。 | ||
もし、アカウントを作成する場合は、メニューの「User accounts」から作成してください。 | ||
|
||
※ 本番環境としてデータベースを作成する場合、ユーザーアカウントを作成してください。 データベースの接続情報(データベース名、アカウント情報等)が外部に漏れると、個人情報の漏洩などの原因になります。 管理にはご注意ください。 | ||
|
||
|
||
## EC-CUBEのインストール | ||
|
||
ブラウザから以下のURLにアクセスします。 | ||
`http://localhost:8888/{EC-CUBEをアップロードしたディレクトリ名/}/index.php/install/` | ||
``` | ||
例 | ||
http://localhost:8888/shop/index.php/install/ | ||
``` | ||
![install step2](/images/install/step1.png) | ||
インストール画面が表示されます。 | ||
「次へ進む」をクリックします。 | ||
|
||
![install step2](/images/install/step2.png) | ||
「次へ進む」をクリックします。 | ||
|
||
|
||
### サイトの設定 | ||
|
||
![install step3](/images/install/step3.png) | ||
|
||
#### 店舗の基本情報 | ||
|
||
- **あなたの店名** | ||
- 店名を入力してください。日本語でも問題ありません。 | ||
- **メールアドレス** | ||
- ここで指定するメールアドレス宛に注文通知メールなどが送信されます。 | ||
- **管理画面ログインID** | ||
- 管理画面にログインする際に利用する管理者のログインIDです。一番権限の強いスーパーユーザーなので、「admin」などの推測されやすいIDは不正アクセスや情報漏洩の元になるので避けてください。 適当な意味を持たない文字列が良いです。 | ||
- **管理画面パスワード** | ||
- 上記の管理者がログインする際に使用するパスワードを指定します。 ここで指定するパスワードを忘れると**管理画面にログインできなくなる**ので必ず控えてください。 | ||
EC-CUBEには**管理者のパスワード再発行機能は実装されていません。** | ||
管理者ログインIDと同様に意味を持たない複雑なパスワードにしてください。 | ||
「test1234」や「password」などは**絶対避けてください** | ||
- **管理画面のディレクトリ名** | ||
- 管理画面にアクセスする場合のURLになります。 | ||
http://localhost:8888/{EC-CUBEをインストールしたディレクトリ}/{管理画面のディレクトリ名}/ でアクセスする事になります。 | ||
こちらのディレクトリ名も「admin」や「dashboard」など推測されやすい文字列を指定すると危険です。 | ||
適当な意味を持たない文字列を指定してください。 | ||
- **サイトのアクセスをSSL経由に強制します** | ||
- ローカル環境では入力しないでください。 | ||
- **管理画面へのアクセスを、以下のIPに制限します** | ||
- 管理画面へのアクセスを特定のIPアドレスに固定します。 | ||
ローカル環境では特に指定しなくて大丈夫です。 | ||
こちらにIPアドレスを指定すると、指定したIPアドレスのみ管理画面にアクセスできます。 | ||
指定した方がセキュリティは強くなりますが、スマートフォンの公衆回線からアクセスできなくなるなど、利便性は損ないます。 | ||
固定IPをお持ちでない方は指定しないでください。 | ||
|
||
*※ 管理画面のアクセス情報が漏洩すると個人情報の漏洩や詐欺に利用されるなど甚大な被害が発生します。取り扱いには充分にご注意ください。* | ||
|
||
#### メール設定 | ||
ローカル環境では特に指定しなくて問題ありません。 | ||
|
||
|
||
### データベースの設定入力 | ||
![install step 4](/images/install/gui-win/step5.png) | ||
|
||
データベースの情報を入力します。 | ||
**今回はMAMPに標準で用意されているデータベースアカウントを使用します。** | ||
|
||
**MAMPのデータベースアカウントの確認方法** | ||
|
||
MAMPを開き、「Open WebStart page」をクリックしてMAMPトップページを立ち上げます。 | ||
![Open WebStart page](/images/install/gui-mac/01.png) | ||
|
||
スクロールするとデータベースアカウント情報が記載された項目があります。 | ||
![MySQL account](/images/install/gui-mac/06.png) | ||
|
||
|
||
こちらのアカウント情報を見ながら入力していきます。 | ||
|
||
- **データベースの種類** | ||
- 今回はMySQLを使用します。 | ||
- **データベースのホスト名** | ||
- localhostになります。 | ||
- **データベースのポート番号** | ||
- 8889 | ||
- **データベース名** | ||
- 準備したデータベース名を指定してください。 サンプルでは「eccube123_」です。 | ||
- **ユーザー名** | ||
- rootになります。 | ||
- **パスワード** | ||
- rootになります。 | ||
|
||
※ユーザー名やパスワードは本番環境では独自に作成してください。 | ||
|
||
一通り入力したら「次へ進む」をクリックします。 | ||
|
||
|
||
|
||
|
||
### データベースの初期化 | ||
![install step 6](/images/install/step6.png) | ||
|
||
データベースに初期データを登録します。 | ||
|
||
「次へ進む」をクリックします。 | ||
|
||
|
||
### インストール完了 | ||
![install step 6](/images/install/step7.png) | ||
|
||
**おめでとうございます!** | ||
この画面が表示されたらインストール完了です。 | ||
|
||
管理画面の使い方は[こちら](https://www.shiro8.net/manual4/v40x/index.html){:target="_blank"}。 | ||
|
||
*管理画面を表示*をクリックすると、管理画面のログイン画面に遷移します。 | ||
[店舗の基本情報](#店舗の基本情報)で入力した管理者の情報で管理画面にログインしてください。 | ||
|
||
もし、ここでログインできない場合は、管理者のパスワードやログインIDを間違えて控えた可能性が高いので、インストールしたディレクトリの .envを削除し、データベースを空にして再度インストール手順を行ってください。 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/index.php
はなくてもアクセスできます。(その場合でも内部的には/index.php
を経由しています。)初回アクセス時は
/install
はなくても勝手に補完されます。