(frontend:10029): dbind-WARNING **: 13:54:52.794: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
debconf: unable to initialize frontend: Gnome
debconf: (Can’t locate Gtk3.pm in @INC (you may need to install the Gtk3 module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/arm-linux-gnueabihf/perl5/5.28 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Gnome.pm line 151, <> line 3.)
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName wiki.dasomoli.org
ServerAdmin dasomoli@gmail.com
DocumentRoot /var/lib/mediawiki
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/wiki_error.log
CustomLog ${APACHE_LOG_DIR}/wiki.access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
Include conf-available/serve-cgi-bin.conf
</VirtualHost>
이제 mediawiki configuration을 enable 하자
sudo a2enconf mediawiki
wiki.dasomoli.org site도 enable하자
sudo a2ensite wiki.dasomoli.org.conf
apache2도 reload하자
sudo service apache2 reload
이제 wiki.dasomoli.org에 접속해서 mediawiki 설치를 시작한다.
설치가 끝나면 LocalSettings.php 파일을 저장할 수 있는데, 이 파일을 /etc/mediawiki/LocalSettings.php 로 저장한다.
minidlnad-upnphttp.o: In function `SendResp_dlnafile':
/home/pi/src/readymedia-transcode/upnphttp.c:2041: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
tmpnam()이 위험하니까 mkstemp()를 이용하라는 거니까 찾아서 바꿔준다.
$ vi upnphttp.c
char tmp[L_tmpnam];
mkdtemp(tmp);
다시 컴파일하면 잘 된다. 설치를 sudo make install로 해줘도 되는데(사실 이렇게 한 후에 checkinstall을 사용했다-_-), 패키지를 만들어 설치하면 나중에 제거가 편하다. checkinstall이 없으면 설치(sudo apt-get install checkinstall)한 후에 아래 명령을 준다.
$ sudo checkinstall
아래와 같은 게 나오면 ‘Y’
아래와 같은게 나오면 난 MiniDLNA Version 2015-06-18 Compiled June 18, 2017 라고 입력했다.
그럼 아래와 같은게 나오는데, 여기서 3번, 버전만 숫자로 시작해야해서 아래처럼 2015-06-18 로 입력했다.
“audio_codecs”나 “video_codecs” 에 적혀있는 코덱에 해당하는 미디어 파일이 재생되면, 그 아래의 “transcode_audio_transcoder”혹은 “transcode_video_transcoder” 에 적혀 있는 스크립트를 실행한다. 원하는 코덱을 transcoding하고 싶다면 해당 코덱을 적어주자. 어떤 것을 적어야 하는지는 avconv -formats 라고 입력하면 찾아볼 수 있다.
transcoding 스크립트는 /usr/local/share/minidlna/transcodescripts/ 아래에 있다. 옵션을 변경하고 싶다면 해당 스크립트를 수정한다. 옵션을 변경하지 않더라도 수정을 해주어야 하는데 ffmpeg 대신 avconv를 사용해야 하기 때문이다.
# vi /usr/local/share/minidlna/transcodescripts/transcode_audio
매번 위처럼 실행하긴 귀찮으니까, 부팅될 때마다 자동 실행 되도록 하자. /etc/init.d/안에 minidlna 파일을 새로 생성해서 아래와 같이 내용을 채운다. Process가 2개 되는 경우가 보여서 참고로 보았던 글에 있는 스크립트를 좀 수정했다. 잘안되면, 뭐 또 수정해야지..
# vi /etc/init.d/minidlna
#!/bin/bash
# Mini DLNA
### BEGIN INIT INFO
# Provides: scriptname
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
case "$1" in
'start')
/usr/local/sbin/minidlnad -f /etc/minidlna.conf
echo Started
;;
'stop')
PIDS=`/bin/pidof minidlnad`
if [ "${PIDS}" != "" ];
then
for PID in ${PIDS};
do
kill -SIGTERM ${PID}
done
else
echo Already Stopped
fi
;;
'restart')
PIDS=`/bin/pidof minidlnad`
if [ "${PIDS}" != "" ];
then
for PID in ${PIDS};
do
kill -SIGTERM ${PID}
done
fi
/usr/local/sbin/minidlnad -f /etc/minidlna.conf
echo Restarted
;;
'status')
PID=`/bin/pidof minidlnad`
if [ "${PID}" != "" ];
then
echo Running. Process ${PID}
else
echo Stopped
fi
;;
'rescan')
PIDS=`/bin/pidof minidlnad`
if [ "${PIDS}" != "" ];
then
for PID in ${PIDS};
do
kill -SIGTERM ${PID}
done
fi
/usr/local/sbin/minidlnad -R -f /etc/minidlna.conf
echo Rescanning
;;
*)
echo "Usage: $0 { start | stop | restart | status | rescan }"
;;
esac
exit 0