使用symfony/cli安装eccube-4.2.1(MariaDB)
我参考了这个网页。
EC-CUBE 4.0开发者文档:安装方法。
用与这个页面类似的方法,先在sqlite3上安装并确认其运行成功,然后再切换到MariaDB。
使用 symfony/cli 安装 eccube-4.2.1(使用sqlite3)。
我在Ubuntu 22.10上进行了确认。
准备数据库
主机:localhost
用户:dbuser
密码:secret
数据库:eccubedb
执行结构化查询语言
create user 'dbuser'@'localhost' identified by 'secret';
create database eccubedb;
grant all on eccubedb.* to 'dbuser'@'localhost';
交互式创建
$ sudo mysql -uroot
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 32
Server version: 10.6.12-MariaDB-0ubuntu0.22.10.1 Ubuntu 22.10
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> create user 'dbuser'@'localhost' identified by 'secret';
Query OK, 0 rows affected (0.004 sec)
MariaDB [(none)]> create database eccubedb;
Query OK, 1 row affected (0.000 sec)
MariaDB [(none)]> grant all on eccubedb.* to 'dbuser'@'localhost';
Query OK, 0 rows affected (0.004 sec)
MariaDB [(none)]> exit
Bye
安装
bin/console eccube:install
请按照以下方式放置。
Trusted hosts. ex) www.example.com, localhost ...etc [localhost]:
> localhost
Database Url [mysql://dbuser:secret@localhost/eccubedb]:
> mysql://dbuser:secret@localhost/eccubedb
Mailer Dsn [null://null]:
> null://null
Auth Magic [qaMx5l1c1k1VrH2U]:
> qaMx5l1c1k1VrH2U
.env 文件可以被修改为以下内容。
(省略)
DATABASE_URL=mysql://dbuser:secret@localhost/eccubedb
DATABASE_SERVER_VERSION=10.6.12-MariaDB-0ubuntu0.22.10.1
DATABASE_CHARSET=utf8mb4
(省略)
启动服务器
symfony server:start
前台界面

管理界面
通过使用以下信息登录:URL:http://localhost:8000/admin/ 用户名:admin 密码:password

DB服务器: MySQL 10.6.12-MariaDB-0ubuntu0.22.10.1