2020年初夏版『自宅録画サーバー(全録)』の作り方
01)OSのインストールと前準備
追記(2020年8月14日)
CentOS8.2(2004)が2020年6月16日にリリースされました。
ソフトウェアの自動更新機能があるので、CentOS8.1も簡単にCentOS8.2にアップデートできます。
これから、インストールする方は、CentOS8.2ではじめた方がいいでしょう。
CentOS8.2のインストーラーは8GBを越えているので、SDメモリは16GBを用意してください。
su gedit /etc/sudoers
euser ALL=(ALL) ALL
dnf -y install libkkc libkkc-data ibus-kkc
# 010-config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of three two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted
1 2 3 4 5 6 7 8 9 10 11 12 | #!/bin/sh# 011-preset.shsudo systemctl stop firewalldsudo systemctl disable firewalldsudo cp ./010-config /etc/selinux/configsudo dnf -y install epel-releasesudo dnf -y install dkmssudo dnf -y --enablerepo=PowerTools install nkfmkdir ~/srcmkdir ~/gitmkdir ~/testsudo reboot |
/etc/selinux │ ├── config │ └── targeted
/home │ └── euser │ ├── git │ ├── src │ ├── temp │ ├── test │ ├── thinclient_drives
02)ffmpegのインストール
1 2 3 4 5 6 | #!/bin/sh# 021-ffmpeginstall.shsudo dnf config-manager --set-enabled PowerToolssudo dnf config-manager --set-enabled epel-playgroundsudo rpm -ivh https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpmsudo dnf install ffmpeg |
$ ffmpeg -version ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 8 (GCC) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsrt --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100
/usr │ └── bin │ └── ffmpeg
03)カードリーダーのインストール
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #!/bin/sh# 031-installcardreader.shsudo dnf -y install ccid pcsc-lite-develsudo dnf -y install perl-ExtUtils-MakeMakercd ~/srcwget http://search.cpan.org/CPAN/authors/id/W/WH/WHOM/pcsc-perl-1.4.14.tar.bz2tar xvjf pcsc-perl-1.4.14.tar.bz2cd pcsc-perl-1.4.14perl Makefile.PLmakesudo make installcd ~/srcwget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/pcsc-tools/1.5.5-1/pcsc-tools_1.5.5.orig.tar.bz2tar xvjf pcsc-tools_1.5.5.orig.tar.bz2cd pcsc-tools-1.5.5/./configuremakesudo make installsudo systemctl enable pcscdsudo systemctl start pcscdpcsc_scan |
04)ARIB25のインストール
1 2 3 4 5 6 7 8 9 10 11 | #!/bin/sh# 041-installarib25.shsudo dnf -y install cmakecd ~/gitgit clone https://github.com/stz2012/libarib25.gitcd libarib25/cmake .makesudo make installsudo sh -c 'echo /usr/local/lib64 > /etc/ld.so.conf.d/usr-local-lib.conf'sudo ldconfig |
05)TVチューナー用ドライバと録画コマンドrecpt1のインストール
1 2 3 4 5 6 7 8 9 10 | #!/bin/sh# 051-px4driver-1.shcd ~/gitgit clone https://github.com/nns779/px4_drvcd px4_drv/fwtool/makewget http://plex-net.co.jp/plex/pxw3u4/pxw3u4_BDA_ver1x64.zipunzip pxw3u4_BDA_ver1x64.zipsudo ./fwtool pxw3u4_BDA_ver1x64/PXW3U4.sys it930x-firmware.binsudo cp -p it930x-firmware.bin /lib/firmware/ |
. ./dkms.conf cp -a `pwd` /usr/src/$PACKAGE_NAME-$PACKAGE_VERSION dkms add -m $PACKAGE_NAME -v $PACKAGE_VERSION dkms build -m $PACKAGE_NAME -v $PACKAGE_VERSION dkms install -m $PACKAGE_NAME -v $PACKAGE_VERSION
. ./dkms.conf dkms remove -m $PACKAGE_NAME -v $PACKAGE_VERSION --all rm -vrf /usr/src/$PACKAGE_NAME-$PACKAGE_VERSION
1 2 3 4 5 6 | #!/bin/sh# 052-px4driver-2.shcp ./050-dkms.install ~/git/px4_drv/dkms.installcp ./050-dkms.uninstall ~/git/px4_drv/dkms.uninstallcd ~/git/px4_drvsudo bash dkms.install |
/dev │ ├── px4video0 │ ├── px4video1 │ ├── px4video2 │ ├── px4video3 │ ├── px4video4 │ ├── px4video5 │ ├── px4video6 │ ├── px4video7 │ ├── px4video8 │ ├── px4video9 │ ├── px4video10 │ └── px4video11
1 2 3 4 5 6 7 | #!/bin/sh# 053-recpt-1.shcd ~/srcwget http://plex-net.co.jp/download/linux/Linux_Driver.zipunzip Linux_Driver.zipcd Linux_Driver/MyRecpt1/MyRecpt1/recpt1sed -i".org" 's/-DTV/video/g' pt1_dev.h |
DESTDIR = prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ CC = @CC@ TARGET = recpt1_px4 TARGET2 = recpt1ctl_px4 TARGET3 = checksignal_px4 TARGETS = $(TARGET) $(TARGET2) $(TARGET3) RELEASE_VERSION = "c8688d7d6382_with_http_server_RC4 by stz2012" CPPFLAGS = -I../driver -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 CFLAGS = -O2 -g -pthread LIBS = @LIBS@ LIBS2 = -lm LIBS3 = -lpthread -lm LDFLAGS = OBJS = recpt1.o decoder.o mkpath.o tssplitter_lite.o recpt1core.o asicen_dtv.o OBJS2 = recpt1ctl.o recpt1core.o asicen_dtv.o OBJS3 = checksignal.o recpt1core.o asicen_dtv.o OBJALL = $(OBJS) $(OBJS2) $(OBJS3) DEPEND = .deps all: $(TARGETS) clean: rm -f $(OBJALL) $(TARGETS) $(DEPEND) version.h distclean: clean rm -f Makefile config.h config.log config.status maintainer-clean: distclean rm -fr configure config.h.in aclocal.m4 autom4te.cache *~ $(TARGET): $(OBJS) $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(TARGET2): $(OBJS2) $(CC) $(LDFLAGS) -o $@ $(OBJS2) $(LIBS2) $(TARGET3): $(OBJS3) $(CC) $(LDFLAGS) -o $@ $(OBJS3) $(LIBS3) $(DEPEND): version.h $(CC) -MM $(OBJS:.o=.c) $(OBJS2:.o=.c) $(CPPFLAGS) > $@ version.h: revh="`git rev-list HEAD | wc -l 2> /dev/null`"; \ if [ -n "$$revh" ] && [ "$$revh" != "0" ] ; then \ echo "const char *version = \"rev.$$revh by stz2012\";" > $@; \ else \ echo "const char *version = \"$(RELEASE_VERSION)\";" > $@; \ fi install: $(TARGET) install -m 755 $(TARGETS) $(DESTDIR)$(bindir) -include .deps
1 2 3 4 5 6 7 8 | #!/bin/sh# 054-recpt-2.shcp ./050-Makefile.in ~/src/Linux_Driver/MyRecpt1/MyRecpt1/recpt1/Makefile.incd ~/src/Linux_Driver/MyRecpt1/MyRecpt1/recpt1/make cleansh ./configure --enable-b25makesudo make install |
1 2 3 4 5 | #!/bin/sh# 055-rectest.shcd ~/testrecpt1_px4 --b25 --strip 27 10 test1.tsrecpt1_px4 --b25 --strip BS15_0 10 test2.ts |
/usr/local ├── bin │ └── recpt1
06)録画ディスクの作成
/mnt ├── data1 │ ├── nhk │ ├── ntv │ ├── tbs │ ├── temp │ └── tv └── data2 │ ├── asahi │ ├── fuji │ └── tokyo
1 2 3 4 5 6 | #!/bin/sh# 061-makefolderdata1.shfor x in "$@"dosudo mkdir /mnt/data1/$xdone |
1 2 3 4 5 6 | #!/bin/sh# 062-makefolderdata2.shfor x in "$@"dosudo mkdir /mnt/data2/$xdone |
sh 061-makefolderdata1.sh nhk ntv tbs sh 062-makefolderdata2.sh asahi fuji tokyo
1 2 3 4 5 6 7 8 9 10 11 | #!/bin/sh# 063-makefolderset.shsudo mkdir /mnt/data1/tvsudo mkdir /mnt/data1/tempsudo chmod -R 777 /mnt/data1sudo chown -R euser:euser /mnt/data1sudo chmod -R 777 /mnt/data2sudo chown -R euser:euser /mnt/data2ln -s /mnt/data2/fuji /mnt/data1/fujiln -s /mnt/data2/asahi /mnt/data1/asahiln -s /mnt/data2/tokyo /mnt/data1/tokyo |
07)mirakurunのインストール
1 2 3 4 5 6 7 8 9 10 | #!/bin/sh# 071-installmirakurun.shsudo curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -sudo dnf -y install nodejssudo node -vsudo npm install pm2 -gsudo npm install mirakurun -g --unsafe --productionsudo npm install rivarun -gsudo npm install arib-b25-stream-test -g --unsafesudo pm2 status |
/usr/local ├── etc │ └── mirakurun │ ├── channels.yml │ ├── server.yml │ └── tuners.yml
su gedit tuners.yml gedit channels.yml exit
- name: PX4-S1 types: - BS - CS command: /usr/local/bin/recpt1_px4 --device /dev/px4video0 --lnb 15 <channel> - - decoder: arib-b25-stream-test isDisabled: false - name: PX4-S2 types: - BS - CS command: /usr/local/bin/recpt1_px4 --device /dev/px4video1 --lnb 15 <channel> - - decoder: arib-b25-stream-test isDisabled: false - name: PX4-T1 types: - GR command: /usr/local/bin/recpt1_px4 --device /dev/px4video2 <channel> - - decoder: arib-b25-stream-test isDisabled: false - name: PX4-T2 types: - GR command: /usr/local/bin/recpt1_px4 --device /dev/px4video3 <channel> - - decoder: arib-b25-stream-test isDisabled: false - name: PX4-S3 types: - BS - CS command: /usr/local/bin/recpt1_px4 --device /dev/px4video4 --lnb 15 <channel> - - decoder: arib-b25-stream-test isDisabled: false - name: PX4-S4 types: - BS - CS command: /usr/local/bin/recpt1_px4 --device /dev/px4video5 --lnb 15 <channel> - - decoder: arib-b25-stream-test isDisabled: false - name: PX4-T3 types: - GR command: /usr/local/bin/recpt1_px4 --device /dev/px4video6 <channel> - - decoder: arib-b25-stream-test isDisabled: false - name: PX4-T4 types: - GR command: /usr/local/bin/recpt1_px4 --device /dev/px4video7 <channel> - - decoder: arib-b25-stream-test isDisabled: false - name: PX4-S5 types: - BS - CS command: /usr/local/bin/recpt1_px4 --device /dev/px4video8 --lnb 15 <channel> - - decoder: arib-b25-stream-test isDisabled: false - name: PX4-S6 types: - BS - CS command: /usr/local/bin/recpt1_px4 --device /dev/px4video9 --lnb 15 <channel> - - decoder: arib-b25-stream-test isDisabled: false - name: PX4-T5 types: - GR command: /usr/local/bin/recpt1_px4 --device /dev/px4video10 <channel> - - decoder: arib-b25-stream-test isDisabled: false - name: PX4-T6 types: - GR command: /usr/local/bin/recpt1_px4 --device /dev/px4video11 <channel> - - decoder: arib-b25-stream-test isDisabled: false
- name: NHK総合・東京 type: GR channel: '27' - name: NHK Eテレ東京 type: GR channel: '26' - name: 日本テレビ type: GR channel: '25' - name: テレビ朝日 type: GR channel: '24' - name: TBS type: GR channel: '22' - name: テレビ東京 type: GR channel: '23' - name: フジテレビジョン type: GR channel: '21' - name: TOKYO MX type: GR channel: '20' - name: 放送大学 type: GR channel: '28' isDisabled: true - name: NHK BS1 type: BS channel: BS15_0 serviceId: 101 - name: NHK BS1 (サブ) type: BS channel: BS15_0 serviceId: 102 - name: NHK BSプレミアム type: BS channel: BS3_1 serviceId: 103 - name: NHK BSプレミアム (サブ) type: BS channel: BS3_1 serviceId: 104 - name: BS日テレ type: BS channel: BS13_0 serviceId: 141 - name: BS日テレ (サブ) type: BS channel: BS13_0 serviceId: 142 - name: BS朝日 type: BS channel: BS01_0 serviceId: 151 - name: BS朝日 (サブ) type: BS channel: BS01_0 serviceId: 152 - name: BS-TBS type: BS channel: BS01_1 serviceId: 161 - name: BSテレ東 type: BS channel: BS1_2 serviceId: 171 - name: BSフジ type: BS channel: BS13_1 serviceId: 181 - name: WOWOWプライム type: BS channel: BS03_0 serviceId: 191 isDisabled: false - name: WOWOWライブ type: BS channel: BS05_0 serviceId: 192 isDisabled: false - name: WOWOWシネマ type: BS channel: BS05_1 serviceId: 193 isDisabled: false - name: スター・チャンネル1 type: BS channel: BS09_1 serviceId: 200 isDisabled: true - name: スター・チャンネル2 type: BS channel: BS15_1 serviceId: 201 isDisabled: true - name: スター・チャンネル3 type: BS channel: BS15_1 serviceId: 202 isDisabled: true - name: BS11 type: BS channel: BS09_0 serviceId: 211 - name: BS12トゥエルビ type: BS channel: BS09_2 serviceId: 222 - name: 放送大学BS1 type: BS channel: BS11_2 serviceId: 231 - name: 放送大学BS2 type: BS channel: BS11_2 serviceId: 232 - name: 放送大学BS3 type: BS channel: BS11_2 serviceId: 233
/usr/local/var/log/mirakurun.stdout.log
/usr/local/var/log/mirakurun.stderr.log
/{
daily
compress
rotate 7
missingok
notifempty
}
1 2 3 4 5 6 7 8 | #!/bin/sh# 072-setmirakurun.shsudo pm2 install pm2-logrotatesudo cp ./070-mirakurun /etc/logrotate.d/mirakurunsudo mirakurun stopsudo npm update rivarun -gsudo npm install mirakurun@latest -g --unsafe --productionsudo mirakurun start |
1 2 3 4 5 6 | #!/bin/sh# 073-testmirakurun.shrivarun --list | sed 's/},/},\n/g'rivarun --list | sed 's/},/},\n/g' | grep -v serviceIdrivarun --b25 --sid 1024 --ch GR/27 15 ~/test/test11.tsrivarun --b25 --mirakurun localhost:40772 --sid 1024 --ch GR/27 15 ~/test/test12.ts |
08)EPGStationのインストール
1 2 3 4 5 6 7 | #!/bin/sh# 081-installmariadb.shsudo dnf -y install mariadb mariadb-serversudo systemctl enable mariadb.servicesudo systemctl start mariadb.servicemysql_secure_installationmysql -u root -p |
[euser]$ mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n]
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n]
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n]
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n]
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
[euser]$mysql -u root -p MariaDB [(none)]> CREATE DATABASE epgstation CHARACTER SET utf8; MariaDB [(none)]> GRANT ALL ON epgstation.* TO epgstation@localhost IDENTIFIED BY 'mirakurun'; MariaDB [(none)]> SET GLOBAL expire_logs_days = 1;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #!/bin/sh# 082-installepgstation.shcd ~git clone https://github.com/l3tnun/EPGStation.gitcd EPGStationnpm installnpm run buildcp config/config.sample.json config/config.jsoncp config/operatorLogConfig.sample.json config/operatorLogConfig.jsoncp config/serviceLogConfig.sample.json config/serviceLogConfig.jsonsudo npm install pm2 -gsudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u euser --hp /home/euserpm2 start dist/server/index.js --name "epgstation"pm2 save |
{
"readOnlyOnce": false,
"serverPort": "8888",
"mirakurunPath": "http+unix://%2Fvar%2Frun%2Fmirakurun.sock/",
"dbType": "mysql",
"mysql": {
"host": "localhost",
"port": 3306,
"user": "epgstation",
"password": "mirakurun",
"database": "epgstation",
"connectTimeout": 20000,
"connectionLimit": 10
},
"ffmpeg": "/usr/bin/ffmpeg",
"ffprobe": "/usr/bin/ffprobe",
"recorded": "/mnt/data1",
"recordedTSDefaultDirectory": "/tv/",
"recordedEncodeDefaultDirectory": "/temp/",
"recordedFormat": "%TITLE%_%YEAR%-%MONTH%-%DAY%_%HOUR%%MIN%",
"maxEncode": 3,
"encode": [
{
"name": "crf22",
"cmd": "/bin/bash %ROOT%/config/enc-libx-crf.sh 22 veryfast",
"suffix": "-crf22.mp4",
"default": true
},
{
"name": "crf25s",
"cmd": "/bin/bash %ROOT%/config/enc-libx-crf.sh 25 superfast",
"suffix": "-crf25s.mp4"
}
],
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | #!/bin/sh# 080-enc-libx-crf.sh# version 3.1 created on 2020-07-24 by simplelife0530###時間測定サブプログラムfunction setStartTime() {start_time=`date +%s`}function getEndTime() {end_time=`date +%s`process_time=`expr ${end_time} - ${start_time}`}##ファイル名file=${INPUT##*/}filename1=${file%.*}filename2=`echo "$filename1" | sed 's/ / /g'`##パラメーターの設定if [ $# = 2 ]thencrfValue=${1}presetValue=${2}elsecrfValue="23"presetValue="veryfast"fi#ログファイルの設定mkdir -p "./logs/transcode"today=$(date "+%Y%m%d")logExt=".log"logFile="./logs/transcode/"$today$logExtif [ ! -e $logFile ]; then{echo "ファイル名,CRF値,preset値,録画時間,圧縮時間,圧縮速度,ファイルサイズ,圧縮サイズ,圧縮率"} &gt;&gt; $logFilefi##エンコード設定inputPara=" -y -i "videoCodec=" -preset ${presetValue} -c:v libx264"videoOpt=" -crf ${crfValue} -f mp4"audioCodec=" -c:a aac"audioOpt=" -strict -2 -ar 48000 -ab 192k -ac 2"advancedOpt=" -loglevel error "#command="$FFMPEG$inputPara\"$INPUT\"$videoCodec$videoOpt$audioCodec$audioOpt$advancedOpt\"$OUTPUT\""##エンコード開始setStartTimeeval ${command}getEndTime##エンコード終了{duration=`/usr/bin/ffprobe "$OUTPUT" -hide_banner -show_entries format=duration | sed -n 2p`recordingTime=${duration#duration=}compressSpeed=`echo "scale=2; ${recordingTime}/${process_time}" | bc`inputFileSize=`ls -l "$INPUT" | awk '{ print $5; }'`outputFileSize=`ls -l "$OUTPUT" | awk '{ print $5; }'`compressionRate=`echo "scale=3; ${outputFileSize}/${inputFileSize}" | bc`echo "${filename2},${crfValue},${presetValue},${recordingTime},${process_time},${compressSpeed},${inputFileSize},${outputFileSize},${compressionRate}"} &gt;&gt; $logFileexit |
1 2 3 4 | #!/bin/sh# 083-setepgstation.shcp 080-config.json ~/EPGStation/config/config.jsoncp 080-enc-libx-crf.sh ~/EPGStation/config/enc-libx-crf.sh |
/home/euser/EPGStation ├── config ├── data │ ├── streamfiles │ └── upload ├── dist │ ├── client │ ├── css │ └── server ├── doc ├── html ├── icon ├── img ├── logs │ ├── Operator │ ├── Service │ └── transcode
1 2 3 4 5 6 7 | #!/bin/sh# 084-updateepgstation.shcd ~/EPGStationgit pullnpm updatenpm update -Dnpm run build |
http://localhost:8888
09)muninのインストール
1 2 3 4 | #!/bin/sh# 091-installmunin.shsudo dnf -y install httpdsudo dnf -y install munin |
/etc
└── munin
├── munin-node.conf
├── munin.conf
├── plugin-conf.d
│ └── munin-node
(修正前) #host_name localhost.localdomain (修正後) host_name tvserver
1 2 3 4 5 6 | #!/bin/sh# 092-setmunin.shsudo systemctl start munin-nodesudo systemctl enable munin-nodesudo systemctl start httpdsudo systemctl enable httpd |
http://localhost/munin/
2020年8月23日追記 CentOS 8では、muninがきちんとインストールできません。
以下の対処をする必要があります。
/etc/cron.d の中にmuninというファイルを作り、以下の内容を記述します。
# Collect Munin data every five minutes, clean up once a day
MAILTO=root
*/5 * * * * munin /usr/bin/munin-cron
21 5 * * * root /usr/sbin/tmpwatch --ctime 24h /var/lib/munin/cgi-tmp
25 5 * * * root /usr/sbin/tmpwatch --ctime 30d /var/lib/munin --exclude /var/lib/munin/.ssh --exclude /var/lib/munin/cgi-tmp --exclude /var/lib/munin/plugin-state --exclude /var/lib/munin/rrdcached
10)sambaのインストール
[global] workgroup = workgroup security = user passdb backend = tdbsam printing = cups printcap name = cups load printers = no disable spoolss = yes [tv] comment = tv folder path = /mnt/data1/tv guest ok = yes guest only = yes writable = yes create mode = 0777 directory mode = 0777 [nhk] comment = nhk folder path = /mnt/data1/nhk guest ok = yes guest only = yes writable = yes create mode = 0777 directory mode = 0777 [ntv] comment = ntv folder path = /mnt/data1/ntv guest ok = yes guest only = yes writable = yes create mode = 0777 [tbs] comment = tbs folder path = /mnt/data1/tbs guest ok = yes guest only = yes writable = yes create mode = 0777 [fuji] comment = fuji folder path = /mnt/data2/fuji guest ok = yes guest only = yes writable = yes create mode = 0777 directory mode = 0777 [asahi] comment = asahi folder path = /mnt/data2/asahi guest ok = yes guest only = yes writable = yes create mode = 0777 [tokyo] comment = tokyo folder path = /mnt/data2/tokyo guest ok = yes guest only = yes writable = yes create mode = 0777 [temp] comment = temp folder path = /mnt/data1/temp guest ok = yes guest only = yes writable = yes create mode = 0777
上記ファイルができたら、sambaをインストールします。
1 2 3 4 5 6 7 8 | #!/bin/sh# 101-installsamba.shsudo dnf -y install sambasudo cp ./100-smb.config /etc/samba/smb.confsudo testparmsudo pdbedit -a eusersudo systemctl enable smb nmbsudo systemctl start smb nmb |
11)リモートデスクトップのインストール
1 2 3 4 5 | #!/bin/sh# 111-installxrdp.shsudo dnf -y install xrdp tigervnc-serversudo systemctl enable xrdpsudo systemctl start xrdp |
12)plexmediaserverのインストール
http://localhost:32400/web/index.html#
13)cockpitのインストール
1 2 3 4 5 | #!/bin/sh# 131-installcockpit.shsudo dnf -y install cockpitsudo systemctl start cockpitsudo systemctl enable cockpit.socket |
https://PC名:9090
コメントを残す