Project

General

Profile

Actions

作業ログ #34

closed

[起票;2023/03/07]フォトアルバムPiwigoインストール

手動人形 added on 03/07/2023. It was last updated on 04/10/2023.

Status:
終了
Priority:
通常
Assignee:
Target version:
Start date:
03/07/2023
Due date:
% Done:

0%

Estimated time:
Tag List: Piwigo Ubuntu

Description

概要

LAMP環境で動くフォトアルバムPiwigoをインストールします。

インストール

コメントにぶら下げた手順で確認

残作業

  • DBバックアップ設定
  • 写真格納ディレクトリをクラウドストレージに変更

Web解析「matomo」との連携

https://piwigo.org/ext/index.php?tid=100


Files

clipboard-202303071629-ryhvi.png View clipboard-202303071629-ryhvi.png 71.4 KB 手動人形, 03/07/2023 04:29 PM
clipboard-202303071657-dmkxf.png View clipboard-202303071657-dmkxf.png 35.5 KB 手動人形, 03/07/2023 04:57 PM
Actions #1

手動人形 updated on 03/07/2023

導入-1-

Piwigo入手

  • 作業用ディレクトリに移動
cd hoge && pwd
  • Piwigoダウンロード
wget https://piwigo.org/download/dlcounter.php?code=latest -O piwigo-latest.zip
# 最新版のダウンロード
  • zip展開
unzip piwigo-latest.zip
  • アクセス権変更
sudo chown -R www-data:www-data piwigo
  • ディレクトリ配置
sudo mv piwigo /var/www/html/
ls- ld /var/www/html/piwigo
# ファイルがあること、所有者がwww-dataを確認します

DB設定

mysql -u root -p
CREATE DATABASE piwigo CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'piwigo_user'@'localhost' IDENTIFIED BY 'パスワード';
/* パスワードは任意のものを設定します */
GRANT ALL ON piwigo.* TO 'piwigo_user'@'localhost';
GRANT RELOAD ON *.* TO 'piwigo_user'@'localhost';
/* 後の運用を考えて、dumpが取得できるようにします */
FLUSH PRIVILEGES;
EXIT;
Actions #2

手動人形 updated on 03/07/2023

apache設定

バーチャルファイル作成

  • ServerName
  • ドメイン
  • 格納場所(ログ含む)
  • SSL証明書及び秘密鍵格納位置

は自分の環境に合わせてください。

cat <<- __EOF__ | sudo tee -a /etc/apache2/sites-available/piwigo.conf
<VirtualHost _default_:80>
ServerName album.example.com
 RewriteEngine On
        RewriteCond %{HTTPS} off
        RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</VirtualHost>

<VirtualHost *:443>
    ServerName hideout.reisalin.com
    CustomLog /var/log/apache2/piwigo_access.log combined
    ErrorLog /var/log/apache2/piwigo_error.log

    DocumentRoot /var/www/html/piwigo
    <Directory /var/www/html/piwigo>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>

  SSLEngine on

    Protocols h2 http/1.1
    Header always set Strict-Transport-Security "max-age=63072000"

SSLCertificateFile /etc/certs/example.com.crt
SSLCertificateKeyFile /etc/private/example.com.key

</VirtualHost>

SSLProtocol             all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite          ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
SSLHonorCipherOrder     off
SSLSessionTickets       off

SSLUseStapling On
SSLStaplingCache "shmcb:logs/ssl_stapling(32768)"
__EOF__

バーチャルファイル有効化

sudo a2ensite piwigo.conf

設定反映

sudo apache2ctl configtest
# Syntax OKを確認します
sudo systemctl restart apache2.service
systemctl status apache2.service
# active (running)を確認します
Actions #3

手動人形 updated on 03/07/2023


画像

画像

表示確認

http://設定したドメイン

にアクセス後、以下が表示されます。

データベース設定

  • ユーザー: DBユーザ名
  • パスワード: 設定したDBのパスワード
  • データベース名:DB名

を入力します。

管理設定

  • ユーザ名:管理者名を入れます。
  • パスワード:管理者のパスワードを入れます。
  • メールアドレス:メールアドレスを入力します。

設定後、以下が表示されると設定完了です。

Actions #4

手動人形 updated on 03/07/2023

  • Description updated (diff)
  • Status changed from 新規 to 進行中
Actions #5

手動人形 updated on 03/07/2023

  • Description updated (diff)
Actions #6

手動人形 updated on 04/10/2023

  • Status changed from 進行中 to 終了
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 50 MB)