0
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-2.17.2 を Arch Linux にインストール (PostgreSQL)

Last updated at Posted at 2023-03-07

こちらの記事を参考にしました。
いまさらECCUBE2をローカル環境にインストール

eccube-2.17.2 を Arch Linux にインストールしました。
データベースは、PostgreSQL です。

php のバージョンです。

$ php --version
PHP 8.2.3 (cli) (built: Feb 15 2023 16:48:38) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.3, Copyright (c) Zend Technologies

PostgreSQL のバージョンです。

$ psql --version
psql (PostgreSQL) 15.2

pgsql を使えるようにします。

sudo pacman -S php-pgsql
/etc/php/php.ini
(省略)
extension=pgsql

PostgreSQL が動いていることを確認

$ sudo systemctl status postgresql
● postgresql.service - PostgreSQL database server
     Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; pres>
     Active: active (running) since Sat 2023-03-11 14:35:55 JST; 28s ago
    Process: 2643 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data >
   Main PID: 2645 (postgres)

データベースの用意

ユーザー eccube2
パスワード tiger123
データベース eccube_db

su postgres
psql
postgres=# CREATE ROLE eccube2 login password 'tiger123';
postgres=# create database eccube_db;
postgres=# alter database  eccube_db  owner to  eccube2;

ソースのダウンロード

wget https://github.com/EC-CUBE/ec-cube2/releases/download/eccube-2.17.2/eccube-2.17.2.tar.gz

解凍

tar xvfz eccube-2.17.2.tar.gz

サーバーの起動

cd ec-cube2

パーミッションの変更

    chmod -R go+w "./html"
    chmod go+w "./data"
    chmod -R go+w "./data/Smarty"
    chmod -R go+w "./data/cache"
    chmod -R go+w "./data/class"
    chmod -R go+w "./data/class_extends"
    chmod go+w "./data/config"
    chmod -R go+w "./data/download"
    chmod -R go+w "./data/downloads"
    chmod go+w "./data/fonts"
    chmod go+w "./data/include"
    chmod go+w "./data/logs"
    chmod -R go+w "./data/module"
    chmod go+w "./data/smarty_extends"
    chmod go+w "./data/upload"
    chmod go+w "./data/upload/csv"

サーバーの起動

php -S localhost:8000

インストール

次にアクセスして設定をすすめる
http://localhost:8000/html/install/
image.png

管理画面

インストールがうまくいくと、次のような画面が出てきます。
http://localhost:8000/html/[管理機能ディレクトリ]/
[管理機能ディレクトリ] を kanri とした場合は、
http://localhost:8000/html/kanri/ です。
image.png

ログインには、
管理機能にログインするためのIDです。
管理機能にログインするためのパスワードです。
で入力したものを使います。
image.png

管理者でログインした時の画面
image.png

フロント画面

http://localhost:8000/html/
image.png

新着情報の追加

管理画面にログインして、
コンテンツ管理 -> 新着情報
image.png

フロント画面の新着情報に表示されます
image.png

設定情報

データベースの設定情報などはこちらです。
PostgreSQL で、
データベースは、eccube_db
ユーザーは、eccube2
です。

data/config/config.php
<?php
define('ECCUBE_INSTALL', 'ON');
define('HTTP_URL', 'http://localhost:8000/html/');
define('HTTPS_URL', 'http://localhost:8000/html/');
define('ROOT_URLPATH', '/html/');
define('DOMAIN_NAME', '');
define('DB_TYPE', 'pgsql');
define('DB_USER', 'eccube2');
define('DB_PASSWORD', '*******');
define('DB_SERVER', '127.0.0.1');
define('DB_NAME', 'eccube_db');
define('DB_PORT', '');
define('ADMIN_DIR', 'kanri/');
define('ADMIN_FORCE_SSL', FALSE);
define('ADMIN_ALLOW_HOSTS', 'a:0:{}');
define('AUTH_MAGIC', '047f3e7ad583d91df4ccad16d3479e6983e45f4d');
define('PASSWORD_HASH_ALGOS', 'sha256');
define('MAIL_BACKEND', 'mail');
define('SMTP_HOST', '');
define('SMTP_PORT', '');
define('SMTP_USER', '');
define('SMTP_PASSWORD', '');
0
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
0
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?