tatami @Wiki
mediatomb
最終更新:
tatami
-
view
mediatombのインストール
apt-getでとってこれるように、source.list設定
# vi /etc/apt/source.list
以下を追加
db http://apt.mediatomb.cc/ sarge main
(source.listの更新にえらく時間がかかった。
あとで、dpkg -i でやればよかったと気が付いた)
あとで、dpkg -i でやればよかったと気が付いた)
インストール
# apt-get install mediatomb
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mediatomb: Depends: libid3-3.8.3 but it is not installable
Depends: libmysqlclient12 but it is not installable
E: Broken packages
libid3-3.8.3, libmysqlclient12を入れようとするもうまくいかない。
- ソースコンパイルに切り替える。
# cd ~/mediatomb-0.10.0/ # ./configure ~ CONFIGURATION SUMMARY ---- sqlite3 : missing mysql : yes libjs : missing libmagic : missing inotify : yes libexif : missing id3lib : yes taglib : disabled libextractor : disabled ~ # ./make # .make install
INSTALLに書かれていたことに従った。
mediatombを実行するも途中で止まってしまう。
MySQLがないためのようだ。
MySQLがないためのようだ。
MySQLインストール
# apt-get install mysql-server
# mysql -uroot -pパスワード Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 5.0.32-Debian_7etch1-log Debian etch distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
無事立ち上がる
データベース作成
データベース作成
mysql> create database mediatomb; Query OK, 1 row affected (0.00 sec)
ユーザー作成、作成したデータベースに対して全権を持つことになるようだ。
mysql> grant all privileges on mediatomb.* to mediatomb@localhost; Query OK, 0 rows affected (0.00 sec)
終了
mysql> \q Bye
config.xmlの編集
iTunesのACCを認識するようにする(ただ、mediatomb経由ではWA1で再生できない)
~/.mediatomb/config.xmlを編集.以下を追加
~/.mediatomb/config.xmlを編集.以下を追加
<map from="m4a" to="audio/mp4"/>
続いて日本語表示の設定
~/.mediatomb/config.xmlを編集してimportの部分の最後に以下の2行を追加します。
~/.mediatomb/config.xmlを編集してimportの部分の最後に以下の2行を追加します。
<import hidden-files="no"> <metadata-charset>CP932</metadata-charset> <filesystem-charset>CP932</filesystem-charset> </import>
daemonに登録
http://amecoro.seesaa.net/article/40235755.html と
http://surf.ap.seikei.ac.jp/~nakano/linux/init.d.html を参考にinit.dスクリプトを作成
http://surf.ap.seikei.ac.jp/~nakano/linux/init.d.html を参考にinit.dスクリプトを作成
/etc/init.d/上にある skelton をもとに起動スクリプトを作成する
# /etc/init.d/skeleton /etc/init.d/mediatomb # vi /etc/init.d/mediatomb
変更点は以下。
# diff /etc/init.d/skeleton /etc/init.d/mediatomb 20,21c20,21 < NAME=daemon < DAEMON=/usr/sbin/$NAME --- > NAME=mediatomb > DAEMON=/usr/local/bin/$NAME 61,62c61,62 < d_start < echo "." --- > $DAEMON --daemon > echo "Starting mediatomb" 66,67c66,67 < d_stop < echo "." --- > killall $NAME > echo "Stopping mediatomb"
起動スクリプトの設定
# update-rc.d mediatomb defaults 92 1 Adding system startup for /etc/init.d/mediatomb ... /etc/rc0.d/K01mediatomb -> ../init.d/mediatomb /etc/rc1.d/K01mediatomb -> ../init.d/mediatomb /etc/rc6.d/K01mediatomb -> ../init.d/mediatomb /etc/rc2.d/S99mediatomb -> ../init.d/mediatomb /etc/rc3.d/S99mediatomb -> ../init.d/mediatomb /etc/rc4.d/S99mediatomb -> ../init.d/mediatomb /etc/rc5.d/S99mediatomb -> ../init.d/mediatomb
設定ファイルを/etc/にコピー
# cp ~/.mediatomb /etc/mediatomb -r
開始
# /etc/init.d/mediatomb start
参考にしたサイト
- daemonの設定
- 起動スクリプトの設定