1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

eccube-4.2.1 を symfony/cli でインストール (PostgreSQL)

Last updated at Posted at 2023-03-13

こちらのページを参考にしました。
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/
image.png

管理画面

http://localhost:8000/admin/
ユーザー admin
パスワード password
でログイン
image.png
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

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?