Server/mpd_index

Aus C3D2
Wechseln zu: Navigation, Suche

Host

Jail (FreeBSD) auf Server/storage

Einhängen fremder Datasets (vom Server/storage)
  • Server/storage
    /mnt/zroot/storage/rpool/Music
    (Jail) Server/mpd_index (/mnt/zroot/iocage/jails/mpd_index/root)
    var/mpd/music
    Read-Only

Zweck

Bereitstellen der Datenbank für den Dienst mpd mit den Daten von Storage im Verzeichnis Music (sodass Instanzen für den Dienst mpd die Datenbank nicht selbst erstellen müssen)

Dienste

mpd

aka #musicpd (bei FreeBSD)

musicpd

Installieren vom Paket musicpd (als untypische Bezeichnung für #mpd)
pkg ins -y musicpd
Konfigurieren vom Dienst musicpd (als untypische Bezeichnung für #mpd)
$EDITOR /usr/local/etc/musicpd.conf

bind_to_address         "any"

#bind_to_address                "/var/mpd/.mpd/socket"

$EDITOR /usr/local/etc/musicpd.conf

#audio_output {
#    type            "oss"
#    name            "My OSS Device"
#

#}

audio_output {
        type            "null"
        name            "My Null Output"
        mixer_type      "none"                  # optional
}

diff /usr/local/etc/musicpd.conf.sample /usr/local/etc/musicpd.conf
82c82
< #bind_to_address              "any"
---
> bind_to_address               "any"
85c85
< bind_to_address               "/var/mpd/.mpd/socket"
---
> #bind_to_address              "/var/mpd/.mpd/socket"
218,220c218,220
< audio_output {
<       type            "oss"
<       name            "My OSS Device"
---
> #audio_output {
> #     type            "oss"
> #     name            "My OSS Device"
225c225
< }
---
> #}
323c323
< #audio_output {
---
> {
336,340c336,340
< #audio_output {
< #     type            "null"
< #     name            "My Null Output"
< #     mixer_type      "none"                  # optional
< #}
---
> audio_output {
>       type            "null"
>       name            "My Null Output"
>       mixer_type      "none"                  # optional
> }
grep music_directory /usr/local/etc/musicpd.conf
music_directory		"/var/mpd/music"

mkdir -p /var/mpd/music
chown -R mpd:mpd /var/mpd/
grep playlist_directory /usr/local/etc/musicpd.conf
playlist_directory		"/var/mpd/.mpd/playlists"
mkdir -p /var/mpd/.mpd/playlists
grep db_file /usr/local/etc/musicpd.conf
db_file			"/var/mpd/.mpd/database"
touch /var/mpd/.mpd/database"
grep log_file /usr/local/etc/musicpd.conf
log_file                        "/var/mpd/.mpd/log"

touch /var/mpd/.mpd/log"
grep pid_file /usr/local/etc/musicpd.conf
pid_file                        "/var/mpd/.mpd/pid"
touch /var/mpd/.mpd/pid"
grep state_file /usr/local/etc/musicpd.conf
state_file                      "/var/mpd/.mpd/state"
touch /var/mpd/.mpd/state"
grep state_file /usr/local/etc/musicpd.conf
sticker_file                    "/var/mpd/.mpd/sticker.sql"

touch /var/mpd/.mpd/state"

(testweises) einmaliges Starten und Stoppen vom Dienst musicpd (als untypische Bezeichnung für #mpd)
service musicpd onestart
service musicpd onestop
Starten vom Dienst musicpd (als untypische Bezeichnung für #mpd), auch bei jedem Start des Systems
sysrc musicpd_enable="YES"
grep musicpd /etc/rc.conf
service musicpd start

Anmeldung

ssh ssh root@storage.hq.c3d2.de

hostname
storage.hq.c3d2.de
iocage console mpd_index

hostname
mpd_index