ユーザ用ツール

サイト用ツール


ビルド関連

ビルド時の追加オプション(引数)

OCSP Responder

libpki

https://www.openca.org/projects/libpki
https://github.com/openca/libpki

git clone -b libpki-0.9.0 https://github.com/openca/libpki.git

configure時のみ指定

./configure --prefix=/opt/local --with-openssl-prefix=/usr
  • configure時に、prefix指定なしであれば問題なし
  • configure指定時にprefixのみ指定だと、make時にエラーが出る。

  (ブランチ:libpki-0.9.0 clone:2022/10/31)

In file included from ../../libpki/pki.h:323,
                 from openssl_hsm.c:4:
 ../../libpki/pki_keyparams.h:18:29: エラー: unknown type name ‘PKI_EC_KEY_FORM’; did you mean ‘EC_F_EC_KEY_COPY’?
                             PKI_EC_KEY_FORM   curveForm,
                             ^~~~~~~~~~~~~~~
                             EC_F_EC_KEY_COPY
  • configure実行後に、「OpenSSL Configuration」でPrefixが「/opt/local」になっている。(まあ、見落とすよね。。。)

   そもそも、/opt/local配下にopensslなんてない。

   つまり、&color(red){prefix指定(場所変更)すると、「–with-openssl-prefix」で、opensslライブラリ場所を指定する必要あり。};

OCSP Responder

https://www.openca.org/projects/ocspd/

https://github.com/openca/openca-ocspd

git clone -b openca-ocspd-3.1.2 https://github.com/openca/openca-ocspd.git

configure時のみ指定

env CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib64 ./configure --prefix=/opt/local
  • configure指定時にprefixのみ指定だと、make時にエラーが出る。

  (ブランチ:openca-ocspd-3.1.2 clone:2022/10/31)

In file included from ocspd.c:9:
 ../../src/ocspd/includes/general.h:18:10: 致命的エラー: libpki/pki.h: No such file or directory
  #include <libpki/pki.h>
          ^~~~~~~~~~~~~~
 コンパイルを停止しました。

libpkiインストール時にインストール場所変更しているので、configure時、CPPFLAGS LDFLAGS で、libpkiの場所を追加

YACReaderLibraryServer

RaspberryPI (bullseye 32bit 11.5)

関連パッケージ
# apt install qt5-qmake qt5-qmake-bin qtbase5-dev qtbase5-dev-tools libunarr-dev
コンパイル
$ wget "https://github.com/YACReader/yacreader/releases/download/9.10.0/yacreader-9.10.0.2210304-src.tar.xz"
$ tar Jxfv yacreader-9.10.0.2210304-src.tar.xz
$ cd yacreader-9.10.0.2210304/YACReaderLibraryServer
$ qmake CONFIG+="no_pdf server_bundled p7zip" PREFIX=/opt/YACReader/YACReaderLibraryServer YACReaderLibraryServer.pro
$ make
# make install
諸設定

〇 StartUp登録 (systemd)

インストール先を変更しているが、定義はデフォルトのままなので変更

# vi /opt/YACReader/YACReaderLibraryServer/lib/systemd/user/yacreaderlibraryserver.service

[Unit]
Description= YACReaderLibrary headless server
After=network.target

[Service]
Type=simple
Restart=always
ExecStart=/opt/YACReader/YACReaderLibraryServer/bin/YACReaderLibraryServer start
User=root

[Install]
WantedBy=multi-user.target
# cd /lib/systemd/system
# cp /opt/YACReader/YACReaderLibraryServer/lib/systemd/user/yacreaderlibraryserver.service .
# systemctl enable yacreaderlibraryserver.service
# systemctl start yacreaderlibraryserver.service

〇 起動状態の確認

/var/log/syslog に、以下のログが記録され、Portは8080となっている。

portを8888に変更する場合は、yacreaderlibraryserver.serviceで

ExecStart=/opt/YACReader/YACReaderLibraryServer/bin/YACReaderLibraryServer --port 8888 start
YACReaderLibraryServer[145388]: INFO  2022-11-30T10:36:43.382 YACReaderLibraryServer attempting to start
YACReaderLibraryServer[145388]: INFO  2022-11-30T10:36:43.383 ---------- System & configuration ----------
YACReaderLibraryServer[145388]: INFO  2022-11-30T10:36:43.383 OS: "Debian GNU/Linux 11 (bullseye)" Version:  "11"
YACReaderLibraryServer[145388]: INFO  2022-11-30T10:36:43.383 Kernel: "linux" "5.15.76-v8+" Architecture: "arm64"
YACReaderLibraryServer[145388]: WARN  2022-11-30T10:36:43.384 QIODevice::read (QFile, "/opt/YACReader/YACReaderLibraryServer/bin/libraries.yacr"): device not open
YACReaderLibraryServer[145388]: INFO  2022-11-30T10:36:43.407 Libraries:  QMap()
YACReaderLibraryServer[145388]: INFO  2022-11-30T10:36:43.407 --------------------------------------------
YACReaderLibraryServer[145388]: INFO  2022-11-30T10:36:43.409 YACReaderLibrary starting
YACReaderLibraryServer[145388]: INFO  2022-11-30T10:36:43.522 Running on port "8080"

設定ファイルが存在する。$HOME/.local/share/YACReader/YACReaderLibrary/YACReaderLibrary.ini

⇒ /root/.local/share/YACReader/YACReaderLibrary/YACReaderLibrary.ini

ユニットファイルでUserを指定しないと、/.local/share/YACReader/YACReaderLibrary/YACReaderLibrary.ini となるので注意

[General]
LIBRARIES=@ByteArray(\0\0\0\0)

[docroot]
path=/opt/YACReader/YACReaderLibraryServer/share/yacreader/server/docroot

[listener]
cleanupInterval=10000
maxMultiPartSize=32000000
maxRequestSize=32000000
maxThreads=1000
minThreads=50
port=8888

[sessions]
expirationTime=864000000

[templates]
cacheSize=160000
path=/opt/YACReader/YACReaderLibraryServer/share/yacreader/server/templates
ビルド関連.txt · 最終更新: by admin