HomeTV6
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#contents();
** mirakurun (Tuner Server) のインストール [#ndceae01]
*** Docker のインストール [#c6218575]
- Docker / Compose をインストール(Ubuntu公式推奨のDocker...
sudo apt update
sudo apt install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg ...
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc...
$(. /etc/os-release && echo ${UBUNTU_CODENAME}) stable...
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.i...
- sudo なしで docker を使うための設定
sudo usermod -aG docker $USER
newgrp docker
- 動作確認
[KGB2] munakata:~$ docker run --rm hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
17eec7bbc9d7: Pull complete
ea52d2000f90: Download complete
Digest: sha256:d4aaab6242e0cace87e2ec17a2ed3d779d18fbfd0...
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be ...
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image fro...
3. The Docker daemon created a new container from that ...
4. The Docker daemon streamed that output to the Docker...
To try something more ambitious, you can run an Ubuntu c...
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free D...
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
[KGB2] munakata:~$ docker compose version
Docker Compose version v5.0.0
*** [[Mirakurun:https://github.com/Chinachu/Mirakurun]][#...
- [[プラットフォーム / 環境構築手順 ガイド(公式):https:...
- [[Setup ガイド(公式):https://github.com/Chinachu/Mira...
- カードリーダーの存在確認 [#s281615b]
[KGB2] munakata:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 ro...
Bus 001 Device 002: ID 04ca:004f Lite-On Technology Corp...
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 004: ID 26ce:01a2 ASRock LED Controller
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 ro...
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 ro...
Bus 003 Device 002: ID 174c:2074 ASMedia Technology Inc....
Bus 003 Device 003: ID 051d:0002 American Power Conversi...
Bus 003 Device 004: ID 04e6:5116 SCM Microsystems, Inc. ...
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 ro...
Bus 004 Device 002: ID 174c:3074 ASMedia Technology Inc....
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 ro...
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 ro...
- チューナの存在確認 (PT3 は /dev/dvb デバイスとして自動...
[KGB2] munakata:~$ ls -l /dev/dvb/
total 0
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter0
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter1
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter2
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter3
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter4
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter5
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter6
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter7
- 既存の docker-compose.yml を利用(場所は munakata/mirak...
[KGB2] munakata:~/mirakurun$ cat docker-compose.yml
services:
mirakurun:
# `:latest` can be changed to fix the version
# `:latest` の部分を編集するとバージョンを固定できます
# available tags: https://hub.docker.com/r/chinachu/...
#image: chinachu/mirakurun:latest
image: chinachu/mirakurun:3.9.0-rc.4
container_name: mirakurun
cap_add:
- SYS_ADMIN
- SYS_NICE
environment:
TZ: Asia/Tokyo
# comment out below if you commented out `network_...
# `network_mode: host` をコメントアウトする場合は...
DOCKER_NETWORK: host
# you must set hostname if accesing by hostname (o...
# ブラウザから IP アドレス以外でアクセスする場合は...
# hostname: localhost
# --
# for debug
# LOG_LEVEL: "3"
# DEBUG: "true"
network_mode: host
# comment out `devices:` if you commented out all de...
# `devices` を全てコメントアウトした場合は `devices:...
devices:
# comment out below if you don't use card readers
# カードリーダーを使わない場合は以下をコメントアウト
- /dev/bus:/dev/bus
# comment out below if you don't use DVB devices
# DVB チューナーを使わない場合は以下をコメントアウト
- /dev/dvb:/dev/dvb
volumes:
# you can change to any location if you want.
- /opt/mirakurun/run:/var/run
- /opt/mirakurun/opt:/opt
- /opt/mirakurun/config:/app-config
- /opt/mirakurun/data:/app-data
tmpfs:
- /tmp
restart: always
logging:
driver: json-file
options:
max-file: "1"
max-size: 10m
- mirakurunディレクトリを /opt 以下に作成する
[KGB2] munakata:~$ sudo mkdir -p /opt/mirakurun/{run,opt...
[KGB2] munakata:~$ cd /opt/mirakurun/
[KGB2] munakata:/opt/mirakurun$ ls -l
total 16
drwxr-xr-x 2 root root 4096 12月 25 10:43 config
drwxr-xr-x 3 root root 4096 12月 25 11:15 data
drwxr-xr-x 4 root root 4096 12月 25 10:43 opt
drwxr-xr-x 3 root root 4096 12月 28 07:32 run
- &ref(tuners.yml,center,tuners.yml); を /opt/mirakurun/c...
[KGB2] munakata:/opt/mirakurun$ cd config/
[KGB2] munakata:/opt/mirakurun/config$ ls -l
total 12
-rw-r--r-- 1 munakata munakata 2538 8月 11 2024 channe...
-rw-rw-r-- 1 root root 278 12月 25 10:43 server...
-rw-r--r-- 1 root root 1796 12月 25 11:00 tuners...
[KGB2] munakata:/opt/mirakurun/config$ head tuners.yml
- name: adapter0
types:
- BS
- CS
dvbDevicePath: /dev/dvb/adapter0/dvr0
decoder: arib-b25-stream-test
command: >-
dvbv5-zap -a 0 -c ./config/dvbconf-for-isdb/conf/dvb...
-r -P <channel>
- name: adapter1
- latest のイメージダウンロードが失敗するので mirakurun/d...
[KGB2] munakata:~/mirakurun$ docker compose down 2>/dev/...
[KGB2] munakata:~/mirakurun$ docker image rm -f chinachu...
[KGB2] munakata:~/mirakurun$ docker image rm -f chinachu...
[KGB2] munakata:~/mirakurun$ sudo systemctl stop docker ...
[KGB2] munakata:~/mirakurun$ sudo rm -rf /var/lib/docker...
[KGB2] munakata:~/mirakurun$ sudo systemctl start contai...
[KGB2] munakata:~/mirakurun$ docker compose pull
- &color(red){Docker 化された mirakurun をマニュアル起動}...
[KGB2] munakata:~$ cd ~/mirakurun
[KGB2] munakata:~/mirakurun$ docker compose up -d
[KGB2] munakata:~/mirakurun$ docker compose ps
[KGB2] munakata:~/mirakurun$ docker logs -n 200 mirakurun
- &color(red){Docker 化された mirakurun をマニュアル再起...
[KGB2] munakata:~/mirakurun$ cd ~/mirakurun
[KGB2] munakata:~/mirakurun$ docker compose restart
- 起動確認(コマンドライン)
[KGB2] munakata:~/mirakurun$ curl -sSf http://127.0.0.1:...
{"current":"3.9.0-rc.4","latest":"4.0.0-beta.18"}
- 起動確認(ブラウザ)
-- http://<サーバIP>:40772/
*** mirakurun を ststemd のサービスに登録し、サーバー再起...
- compose一式を自動起動させる systemd (/etc/systemd/syste...
[Unit]
Description=Mirakurun (docker compose)
Requires=docker.service
After=docker.service network-online.target
Wants=network-online.target
[Service]
Type=oneshot
WorkingDirectory=/raid_vol/home/munakata/mirakurun
ExecStart=/usr/bin/docker compose up -d
ExecStop=/usr/bin/docker compose down
RemainAfterExit=yes
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target
- サービスの登録と自動起動設定
[KGB2] munakata:~$ sudo systemctl daemon-reload
[KGB2] munakata:~$ sudo systemctl enable --now mirakurun...
- サービスのマニュアル起動
[KGB2] munakata:~$ sudo systemctl status mirakurun-compo...
- サーバーを再起動し自動起動したことを確認
[KGB2] munakata:~$ systemctl status mirakurun-compose.se...
● mirakurun-compose.service - Mirakurun (docker compose)
Loaded: loaded (/etc/systemd/system/mirakurun-compo...
Active: active (exited) since Sun 2025-12-28 07:32:...
Process: 1892 ExecStart=/usr/bin/docker compose up -...
Main PID: 1892 (code=exited, status=0/SUCCESS)
CPU: 76ms
12月 28 07:32:31 kgb2 systemd[1]: Starting mirakurun-com...
12月 28 07:32:31 kgb2 docker[1915]: Container mirakurun...
12月 28 07:32:31 kgb2 docker[1915]: Container mirakurun...
12月 28 07:32:31 kgb2 docker[1915]: Container mirakurun...
12月 28 07:32:31 kgb2 docker[1915]: Container mirakurun...
12月 28 07:32:31 kgb2 systemd[1]: Finished mirakurun-com...
** [[EPGStation:https://github.com/l3tnun/EPGStation]][#d...
*** [[インストール手順(公式):https://github.com/l3tnun/...
- EPGStation のインストール場所:&color(red){munakata/git...
- config/config.yml(または config.yml)で mirakurun への...
mirakurunPath: http://127.0.0.1:40772/
*** pm2 をユーザー環境にインストール [#k02f9796]
- 今回は &color(red){非sudo 環境で EPGStation を起動}; す...
[KGB2] munakata:~$ npm install -g pm2
[KGB2] munakata:~$ pm2 -v
6.0.14
*** EPGStation のマニュアル起動/停止/再起動 [#xff33324]
- &color(red){EPGStation のマニュアル起動};
[KGB2] munakata:~$ cd git/EPGStation/
[KGB2] munakata:~/git/EPGStation$ sudo pm2 start dist/in...
- EPGStation 起動状態の確認
[KGB2] munakata:~$ pm2 status
-- &ref(pm2-status.png);
- EPGStation の停止、再起動
[KGB2] munakata:~/git/EPGStation$ pm2 stop epgstations
[KGB2] munakata:~/git/EPGStation$ pm2 restart epgstation
*** 自動起動の設定 [#n86d8aa9]
[KGB2] munakata:~$ pm2 save
終了行:
#contents();
** mirakurun (Tuner Server) のインストール [#ndceae01]
*** Docker のインストール [#c6218575]
- Docker / Compose をインストール(Ubuntu公式推奨のDocker...
sudo apt update
sudo apt install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg ...
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc...
$(. /etc/os-release && echo ${UBUNTU_CODENAME}) stable...
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.i...
- sudo なしで docker を使うための設定
sudo usermod -aG docker $USER
newgrp docker
- 動作確認
[KGB2] munakata:~$ docker run --rm hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
17eec7bbc9d7: Pull complete
ea52d2000f90: Download complete
Digest: sha256:d4aaab6242e0cace87e2ec17a2ed3d779d18fbfd0...
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be ...
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image fro...
3. The Docker daemon created a new container from that ...
4. The Docker daemon streamed that output to the Docker...
To try something more ambitious, you can run an Ubuntu c...
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free D...
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
[KGB2] munakata:~$ docker compose version
Docker Compose version v5.0.0
*** [[Mirakurun:https://github.com/Chinachu/Mirakurun]][#...
- [[プラットフォーム / 環境構築手順 ガイド(公式):https:...
- [[Setup ガイド(公式):https://github.com/Chinachu/Mira...
- カードリーダーの存在確認 [#s281615b]
[KGB2] munakata:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 ro...
Bus 001 Device 002: ID 04ca:004f Lite-On Technology Corp...
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 004: ID 26ce:01a2 ASRock LED Controller
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 ro...
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 ro...
Bus 003 Device 002: ID 174c:2074 ASMedia Technology Inc....
Bus 003 Device 003: ID 051d:0002 American Power Conversi...
Bus 003 Device 004: ID 04e6:5116 SCM Microsystems, Inc. ...
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 ro...
Bus 004 Device 002: ID 174c:3074 ASMedia Technology Inc....
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 ro...
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 ro...
- チューナの存在確認 (PT3 は /dev/dvb デバイスとして自動...
[KGB2] munakata:~$ ls -l /dev/dvb/
total 0
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter0
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter1
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter2
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter3
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter4
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter5
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter6
drwxr-xr-x 2 root root 100 12月 28 07:32 adapter7
- 既存の docker-compose.yml を利用(場所は munakata/mirak...
[KGB2] munakata:~/mirakurun$ cat docker-compose.yml
services:
mirakurun:
# `:latest` can be changed to fix the version
# `:latest` の部分を編集するとバージョンを固定できます
# available tags: https://hub.docker.com/r/chinachu/...
#image: chinachu/mirakurun:latest
image: chinachu/mirakurun:3.9.0-rc.4
container_name: mirakurun
cap_add:
- SYS_ADMIN
- SYS_NICE
environment:
TZ: Asia/Tokyo
# comment out below if you commented out `network_...
# `network_mode: host` をコメントアウトする場合は...
DOCKER_NETWORK: host
# you must set hostname if accesing by hostname (o...
# ブラウザから IP アドレス以外でアクセスする場合は...
# hostname: localhost
# --
# for debug
# LOG_LEVEL: "3"
# DEBUG: "true"
network_mode: host
# comment out `devices:` if you commented out all de...
# `devices` を全てコメントアウトした場合は `devices:...
devices:
# comment out below if you don't use card readers
# カードリーダーを使わない場合は以下をコメントアウト
- /dev/bus:/dev/bus
# comment out below if you don't use DVB devices
# DVB チューナーを使わない場合は以下をコメントアウト
- /dev/dvb:/dev/dvb
volumes:
# you can change to any location if you want.
- /opt/mirakurun/run:/var/run
- /opt/mirakurun/opt:/opt
- /opt/mirakurun/config:/app-config
- /opt/mirakurun/data:/app-data
tmpfs:
- /tmp
restart: always
logging:
driver: json-file
options:
max-file: "1"
max-size: 10m
- mirakurunディレクトリを /opt 以下に作成する
[KGB2] munakata:~$ sudo mkdir -p /opt/mirakurun/{run,opt...
[KGB2] munakata:~$ cd /opt/mirakurun/
[KGB2] munakata:/opt/mirakurun$ ls -l
total 16
drwxr-xr-x 2 root root 4096 12月 25 10:43 config
drwxr-xr-x 3 root root 4096 12月 25 11:15 data
drwxr-xr-x 4 root root 4096 12月 25 10:43 opt
drwxr-xr-x 3 root root 4096 12月 28 07:32 run
- &ref(tuners.yml,center,tuners.yml); を /opt/mirakurun/c...
[KGB2] munakata:/opt/mirakurun$ cd config/
[KGB2] munakata:/opt/mirakurun/config$ ls -l
total 12
-rw-r--r-- 1 munakata munakata 2538 8月 11 2024 channe...
-rw-rw-r-- 1 root root 278 12月 25 10:43 server...
-rw-r--r-- 1 root root 1796 12月 25 11:00 tuners...
[KGB2] munakata:/opt/mirakurun/config$ head tuners.yml
- name: adapter0
types:
- BS
- CS
dvbDevicePath: /dev/dvb/adapter0/dvr0
decoder: arib-b25-stream-test
command: >-
dvbv5-zap -a 0 -c ./config/dvbconf-for-isdb/conf/dvb...
-r -P <channel>
- name: adapter1
- latest のイメージダウンロードが失敗するので mirakurun/d...
[KGB2] munakata:~/mirakurun$ docker compose down 2>/dev/...
[KGB2] munakata:~/mirakurun$ docker image rm -f chinachu...
[KGB2] munakata:~/mirakurun$ docker image rm -f chinachu...
[KGB2] munakata:~/mirakurun$ sudo systemctl stop docker ...
[KGB2] munakata:~/mirakurun$ sudo rm -rf /var/lib/docker...
[KGB2] munakata:~/mirakurun$ sudo systemctl start contai...
[KGB2] munakata:~/mirakurun$ docker compose pull
- &color(red){Docker 化された mirakurun をマニュアル起動}...
[KGB2] munakata:~$ cd ~/mirakurun
[KGB2] munakata:~/mirakurun$ docker compose up -d
[KGB2] munakata:~/mirakurun$ docker compose ps
[KGB2] munakata:~/mirakurun$ docker logs -n 200 mirakurun
- &color(red){Docker 化された mirakurun をマニュアル再起...
[KGB2] munakata:~/mirakurun$ cd ~/mirakurun
[KGB2] munakata:~/mirakurun$ docker compose restart
- 起動確認(コマンドライン)
[KGB2] munakata:~/mirakurun$ curl -sSf http://127.0.0.1:...
{"current":"3.9.0-rc.4","latest":"4.0.0-beta.18"}
- 起動確認(ブラウザ)
-- http://<サーバIP>:40772/
*** mirakurun を ststemd のサービスに登録し、サーバー再起...
- compose一式を自動起動させる systemd (/etc/systemd/syste...
[Unit]
Description=Mirakurun (docker compose)
Requires=docker.service
After=docker.service network-online.target
Wants=network-online.target
[Service]
Type=oneshot
WorkingDirectory=/raid_vol/home/munakata/mirakurun
ExecStart=/usr/bin/docker compose up -d
ExecStop=/usr/bin/docker compose down
RemainAfterExit=yes
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target
- サービスの登録と自動起動設定
[KGB2] munakata:~$ sudo systemctl daemon-reload
[KGB2] munakata:~$ sudo systemctl enable --now mirakurun...
- サービスのマニュアル起動
[KGB2] munakata:~$ sudo systemctl status mirakurun-compo...
- サーバーを再起動し自動起動したことを確認
[KGB2] munakata:~$ systemctl status mirakurun-compose.se...
● mirakurun-compose.service - Mirakurun (docker compose)
Loaded: loaded (/etc/systemd/system/mirakurun-compo...
Active: active (exited) since Sun 2025-12-28 07:32:...
Process: 1892 ExecStart=/usr/bin/docker compose up -...
Main PID: 1892 (code=exited, status=0/SUCCESS)
CPU: 76ms
12月 28 07:32:31 kgb2 systemd[1]: Starting mirakurun-com...
12月 28 07:32:31 kgb2 docker[1915]: Container mirakurun...
12月 28 07:32:31 kgb2 docker[1915]: Container mirakurun...
12月 28 07:32:31 kgb2 docker[1915]: Container mirakurun...
12月 28 07:32:31 kgb2 docker[1915]: Container mirakurun...
12月 28 07:32:31 kgb2 systemd[1]: Finished mirakurun-com...
** [[EPGStation:https://github.com/l3tnun/EPGStation]][#d...
*** [[インストール手順(公式):https://github.com/l3tnun/...
- EPGStation のインストール場所:&color(red){munakata/git...
- config/config.yml(または config.yml)で mirakurun への...
mirakurunPath: http://127.0.0.1:40772/
*** pm2 をユーザー環境にインストール [#k02f9796]
- 今回は &color(red){非sudo 環境で EPGStation を起動}; す...
[KGB2] munakata:~$ npm install -g pm2
[KGB2] munakata:~$ pm2 -v
6.0.14
*** EPGStation のマニュアル起動/停止/再起動 [#xff33324]
- &color(red){EPGStation のマニュアル起動};
[KGB2] munakata:~$ cd git/EPGStation/
[KGB2] munakata:~/git/EPGStation$ sudo pm2 start dist/in...
- EPGStation 起動状態の確認
[KGB2] munakata:~$ pm2 status
-- &ref(pm2-status.png);
- EPGStation の停止、再起動
[KGB2] munakata:~/git/EPGStation$ pm2 stop epgstations
[KGB2] munakata:~/git/EPGStation$ pm2 restart epgstation
*** 自動起動の設定 [#n86d8aa9]
[KGB2] munakata:~$ pm2 save
ページ名: