コマンドラインを立ち上げ
下記コマンドを打ち込んでgithubからeccbe3をクローンする。
今回はローカルで動かすので、MAMPのhtdocsフォルダにダウンロード。
git clone http://github.com/EC-CUBE/ec-cube.git
フォルダ内へ移動
cd ec-cube
composerをインストールします。
curl -sS https://getcomposer.org/installer | php
次にMAMPを立ち上げ、phpmyadminから適当な名前のDBを作成しておきます。
次に、インストールしたECCUBEのフォルダの中の「eccube_install.sh」をエディタで開きます。
インストールに必要な修正は以下の部分。
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
# Configuration | |
#-- Shop Configuration | |
CONFIG_PHP="app/config/eccube/config.php" | |
ADMIN_MAIL=${ADMIN_MAIL:-"admin@example.com"} | |
SHOP_NAME=${SHOP_NAME:-"EC-CUBE SHOP"} | |
HTTP_URL=${HTTP_URL:-"http://test.local"} | |
HTTPS_URL=${HTTPS_URL:-"http://test.local/"} | |
ROOT_URLPATH=${ROOT_URLPATH:-"/"} | |
DOMAIN_NAME=${DOMAIN_NAME:-""} | |
ADMIN_DIR=${ADMIN_DIR:-"admin/"} | |
DBSERVER=${DBSERVER-"127.0.0.1"} | |
DBNAME=${DBNAME:-"cube3_dev"} | |
DBUSER=${DBUSER:-"cube3_dev_user"} | |
DBPASS=${DBPASS:-"password"} | |
ADMINPASS="f6b126507a5d00dbdbb0f326fe855ddf84facd57c5603ffdf7e08fbb46bd633c" | |
AUTH_MAGIC="droucliuijeanamiundpnoufrouphudrastiokec" | |
DBTYPE=$1; | |
case "${DBTYPE}" in | |
"pgsql" ) | |
#-- DB Seting Postgres | |
PSQL=psql | |
PGUSER=postgres | |
DROPDB=dropdb | |
CREATEDB=createdb | |
DBPORT=5432 | |
;; | |
"mysql" ) | |
#-- DB Seting MySQL | |
MYSQL=mysql | |
ROOTUSER=root | |
ROOTPASS=$DBPASS | |
DBSERVER="127.0.0.1" | |
DBPORT=3306 | |
;; |
-そのまま
CONFIG_PHP="app/config/eccube/config.php"
-そのまま
ADMIN_MAIL=${ADMIN_MAIL:-"admin@example.com"}
-そのまま
SHOP_NAME=${SHOP_NAME:-"EC-CUBE SHOP"}
-ローカルのURL、http://localhost:8888/ec-cube/html/
HTTP_URL=${HTTP_URL:-"http://test.local"}
-ローカルのURL、http://localhost:8888/ec-cube/html/
HTTPS_URL=${HTTPS_URL:-"http://test.local/"}
-ローカルのURL、/ec-cube/html/
ROOT_URLPATH=${ROOT_URLPATH:-"/"}
-そのまま
DOMAIN_NAME=${DOMAIN_NAME:-""}
-そのまま
ADMIN_DIR=${ADMIN_DIR:-"admin/"}
-localhost
DBSERVER=${DBSERVER-"127.0.0.1"}
-上記で作ったDBの名前
DBNAME=${DBNAME:-"cube3_dev"}
-自分のDBのユーザー名
DBUSER=${DBUSER:-"cube3_dev_user"}
-自分のDBのパス
DBPASS=${DBPASS:-"password"}
"mysql" ) #-- DB Seting MySQL
-そのまま
MYSQL=mysql
-自分のDBのユーザー名
ROOTUSER=root
-そのまま
ROOTPASS=$DBPASS
-localhost
DBSERVER="127.0.0.1"
-そのまま
DBPORT=3306
;;
保存したらインストール可能です。
下記コマンドでインストールが始まります。
sh eccube_install.sh mysql
0 コメント:
コメントを投稿