# 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