「InvoicePlane」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(→‎インストールウィザード: 英語版から追加)
(→‎インストールウィザード: 英語版から追加)
(同じ利用者による、間の1版が非表示)
82行目: 82行目:
 
include invoiceplane.conf;
 
include invoiceplane.conf;
   
  +
=== Explicitly permit InvoicePlane directories for php-fpm ===
=== Exclude packets from a specific IP address ===
 
  +
Since version 7.4 php-fpm is hardened per default and revokes read/write access on {{ic|/usr}} (and sub-directories). Therefore it is also necessary to explicitly give permissions on {{ic|/usr/share/webapps/invoiceplane}} directories.
   
  +
Create an {{ic|override.conf}} for {{ic|php-fpm}}:
ip.addr != 1.2.3.4
 
  +
# systemctl edit php-fpm.service
   
  +
Add and save following content.
=== Filter packets to LAN ===
 
   
  +
{{hc|/etc/systemd/system/php-fpm.service.d/override.conf|2=
To only see LAN traffic, no internet traffic run
 
  +
[Service]
  +
ReadWritePaths = /usr/share/webapps/invoiceplane/ipconfig.php
  +
ReadWritePaths = /usr/share/webapps/invoiceplane/uploads/
  +
ReadWritePaths = /usr/share/webapps/invoiceplane/application/logs
  +
ReadWritePaths = /usr/share/webapps/invoiceplane/vendor/mpdf/mpdf/tmp
   
  +
}}
(ip.src==10.0.0/8 AND ip.dst==10.0.0/8) OR (ip.src==172.16.0.0/12 AND ip.dst==172.16.0.0/12) OR (ip.src==192.168.0.0/16 and ip.dst==192.168.0.0/16)
 
   
  +
Afterwards [[restart]] the {{ic|php-fpm}} service and assign write permissions to the {{ic|http}} user.
This will filter traffic within any of the private network spaces.
 
 
=== Filter packets by port ===
 
 
See all traffic on two ports or more:
 
 
tcp.port==80||tcp.port==3306
 
tcp.port==80||tcp.port==3306||tcp.port==443
 
   
 
=== インストールウィザード ===
 
=== インストールウィザード ===

2021年1月31日 (日) 15:20時点における版

InvoicePlane は見積書・請求書・顧客・入金を管理するセルフホスト型のオープンソースアプリケーションです。

インストール

invoiceplaneAUR パッケージをインストールしてください。

設定

データベース

以下は MariaDB を使って Invoiceplane のデータベースをセットアップする例です。データベースの名前は invoiceplane、ユーザー名は invoiceplane、パスワードは password としています:

CREATE DATABASE invoiceplane;
GRANT ALL PRIVILEGES ON invoiceplane.* TO invoiceplane@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

ウェブサーバー

Apache

Apache の設定ファイルを作成:

/etc/httpd/conf/extra/invoiceplane.conf
Alias /invoiceplane "/usr/share/webapps/invoiceplane"
<Directory "/usr/share/webapps/invoiceplane">
    DirectoryIndex index.php
    AllowOverride All
    Options FollowSymlinks
    Require all granted
</Directory>

そして /etc/httpd/conf/httpd.conf にファイルを記述:

# InvoicePlane configuration
Include conf/extra/invoiceplane.conf

Lighttpd

Lighttpd の設定に invoiceplane のエイリアスを作成:

alias.url = ( "/invoiceplane" => "/usr/share/webapps/invoiceplane/")

それから設定で mod_alias, mod_fastcgi, mod_cgi を有効にしてください (server.modules セクション)。

Nginx

nginx で invoiceplane を使用するには、まず使用したいサーバーのルートディレクトリを確認してください。ルートディレクトリが /srv/http の場合、以下のようにシンボリックリンクを作成:

# ln -s /usr/share/webapps/invoiceplane/ /srv/http/invoiceplane

nginx の設定ファイルを作成します:

/etc/nginx/invoiceplane.conf
server {
    listen 80;
    root /srv/http/invoiceplane;
    index index.php index.html index.htm;
    server_name invoiceplane.example.com;

    location / {
        try_files $uri $uri/ /index.php?q=$uri&$args;
    }
    location ~ .php$ {
      try_files $uri = 404;
      fastcgi_pass  unix:/run/php-fpm/php-fpm.sock;
      fastcgi_index index.php;
      include fastcgi.conf;
    }

    location = /favicon.ico {
      log_not_found off;
      access_log off;
    }

    access_log /var/log/nginx/invoiceplane_access.log main;
    error_log  /var/log/nginx/invoiceplane_error.log;
}

そして /etc/nginx/nginx.confinvoiceplane.conf ファイルを記述:

# InvoicePlane configuration
include invoiceplane.conf;

Explicitly permit InvoicePlane directories for php-fpm

Since version 7.4 php-fpm is hardened per default and revokes read/write access on /usr (and sub-directories). Therefore it is also necessary to explicitly give permissions on /usr/share/webapps/invoiceplane directories.

Create an override.conf for php-fpm:

# systemctl edit php-fpm.service

Add and save following content.

/etc/systemd/system/php-fpm.service.d/override.conf
[Service]
ReadWritePaths = /usr/share/webapps/invoiceplane/ipconfig.php
ReadWritePaths = /usr/share/webapps/invoiceplane/uploads/
ReadWritePaths = /usr/share/webapps/invoiceplane/application/logs
ReadWritePaths = /usr/share/webapps/invoiceplane/vendor/mpdf/mpdf/tmp

Afterwards restart the php-fpm service and assign write permissions to the http user.

インストールウィザード

データベースとウェブサーバーを設定したら、http://your-invoiceplane-domain.com/index.php/setup からインストールウィザードのページを開いて指示に従ってください。

ローカリゼーション

英語以外の言語を使いたい場合は Translation / Localization を参照してください。

参照