こちらのページを参考にしました。
EC-CUBE 4.0 開発者向けドキュメント:インストール方法
こちらのページのように、sqlite3 でインストールして動作の確認をし、MariaDB に切り替えます。
eccube-4.2.1 を symfony/cli でインストール (sqlite3)
Ubuntu 22.10 で確認しました。
データベースの用意
ホスト localhost
ユーザー dbuser
パスワード secret
データベース eccubedb
SQL
CREATE ROLE dbuser login password 'secret';
create database eccubedb;
alter database eccubedb owner to dbuser;
インターアクティブに作成
$ sudo -u postgres psql
psql (14.7 (Ubuntu 14.7-0ubuntu0.22.10.1))
Type "help" for help.
postgres=# CREATE ROLE dbuser login password 'secret';
CREATE ROLE
postgres=# create database eccubedb;
CREATE DATABASE
postgres=# alter database eccubedb owner to dbuser;
ALTER DATABASE
postgres=# exit
インストール
bin/console eccube:install
次のように入れます。
Trusted hosts. ex) www.example.com, localhost ...etc [localhost]:
>
Database Url []:
> postgresql://localhost/eccubedb?user=dbuser&password=secret
Mailer Dsn [null://null]:
>
Auth Magic [qaMx5l1c1k1VrH2U]:
>
.env が次のように書き換えられます。
(省略)
DATABASE_URL=postgresql://localhost/eccubedb?user=dbuser&password=secret
DATABASE_SERVER_VERSION=14.7
DATABASE_CHARSET=utf8
(省略)
サーバーの起動
symfony server:start
フロント画面
管理画面
http://localhost:8000/admin/
ユーザー admin
パスワード password
でログイン
DB サーバー: PostgreSQL 14.7 (Ubuntu 14.7-0ubuntu0.22.10.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 12.2.0-3ubuntu1) 12.2.0, 64-bit