Wikia

Music Player Daemon Community Wiki

Install

Talk1
522pages on
this wiki

Installing from source should work for all *nix distributions. In many cases it is better to go below to look for specific installation instructions for your distribution if you're in a *nix distribution.

General Installing From Source Edit

  • First check that you have all the dependencies that you want from Dependencies
  • Retrieving the sources
    • First, do you want to install from the latest development sources? If so, follow the guide.
    • Otherwise you can download the latest sources
  • Follow the procedure at linuxquestions.org going straight to the ./configure step if you downloaded from subversion. A hint that that link doesn't give is there are specific options that you can look through by typing ./configure --help, then adding those to your ./configure will make your MPD turn out differently, although the defaults will do just fine. See the Configure section to see the ./configure options.

Debian Install Procedure Edit

If you are running any supported Debian version (stable, testing, unstable), you can simply install the mpd package:

aptitude update
aptitude install mpd

Note: Due to patent concerns, LAME (mp3 encoding for HTTP streaming) support wasn't available in Debian for a long time. MP3 encoding is available from Debian wheezy (7.0?) onwards (mpd package version 0.16.7-2 or newer).

Ubuntu Install Procedure Edit

  • First, edit /etc/apt/sources.list and enable the 'universe' repository. After you make this change, you will have to run apt-get update.
  • You can use Synaptic. If for some reason this installation fails, this howto on the Ubuntu Forums may help.
sudo apt-get update      
sudo apt-get install mpd

OR

If you just need only MP3 and FLAC support through ALSA, then you can compile it from source:

  • download the latest sources
  • extract them to some directory (for example mpd-x-x-x)
  • go to this directory (for example cd mpd-x-x-x)
  • install the dependencies, compile and install:
sudo apt-get update
sudo apt-get install libasound2-dev libmad0-dev libid3tag0-dev libflac-dev libflac++-dev libglib2.0-dev
./configure
make
sudo make install

Gentoo Install Procedure Edit

To install from the mpd-portage overlay see the mpd-overlay guide.

  • Check that you have all the USE flags you want supported for MPD, for questions about specific dependencies see the Dependencies page.
  • Install MPD:
# emerge mpd
  • Edit the /etc/mpd.conf file as a superuser:
# {your text editor here} /etc/mpd.conf


    • The log files you specified in /etc/mpd.conf must exist before running MPD.
      • The log files must also have the permissions set so that they can be edited by the default user (normally user: mpd).


    • Put your music/playlists in the directories defined in /etc/mpd.conf (symlinks are fine).


    • Setup MPD to start in the init scripts:
# rc-update add mpd default
  • Finally start MPD:
# /etc/init.d/mpd start

Arch Linux Install Procedure Edit

  • Install with pacman
pacman -S mpd
  • Configure MPD
cp /usr/share/doc/mpd/mpd.conf.example /etc/mpd.conf 
{your editor} /etc/mpd.conf
  • Create these two directories if they don't exist: ~/.mpd and ~/.mpd/playlists
mkdir -p ~/.mpd/playlists
  • Start MPD and activate start at boot
systemctl start mpd && systemctl enable mpd
  • Install a client - this will give you every client in pacman
pacman -S ncmpc ncmpcpp mpc gmpc glurp sonata

Fedora/RHEL/CentOS Install Procedure Edit

Fedora Edit

# yum install mpd
  • Edit the /etc/mpd.conf file as a superuser:
# $EDITOR /etc/mpd.conf
  • Finally start MPD and activate start at boot
# systemctl start mpd
  • Make it come on when you reboot:
# systemctl enable mpd
  • The clients (mpc, ncmpc, gmpc, sonata, xfmpc, xfce4-mpc-plugin, gimmix, pympdtouchgui) are available from fedora (official repo). Install them with:
# yum install mpc

Substitute "mpc" in the command above with the client you want.

RHEL/CentOS Edit

# yum install mpd

or

# apt-get install mpd

if you prefer apt.

  • Edit the /etc/mpd.conf file as a superuser:
# $EDITOR /etc/mpd.conf
  • Start mpd as a non-privileged user:
$ mpd
  • The mpc client is also available from RPMforge. Install it with:
# yum install mpc

Foresight Install Procedure Edit

  • MPD is available through conary, install with:
# sudo conary update mpd
  • Edit the /etc/mpd.conf file as a superuser:
# {your text editor here} /etc/mpd.conf
  • Finally start MPD:
# service mpd start
  • Make it come on when you reboot:
# chkconfig mpd on

Mandrake Install Procedure Edit

  • MPD is available through urpmi, to install:
urpmi mpd

Slitaz Install Procedure Edit

Slitaz is a compact linux distro (around 100MB after install) with a nice package manager. This makes it easy to install mpd on a really compact distro.

  • Install Slitaz on your system (Slitaz by default is a live CD) Slitaz HD Install, make sure you use the default user tux on install
  • MPD is available through Tazpkg
# tazpkg recharge
# tazpkg get-install mpd


FreeBSD Install Procedure Edit

Installing with Ports Edit

    • you may need to update your ports tree (use SVN or portsnap, see the FreeBSD handbook)
    • make sure internet works, or put the source file in /usr/ports/distfiles
cd /usr/ports/audio/musicpd 
make install clean
      • note: if you want support for AAC or MOD files, then put OPTIONS_SET= AAC MOD in /etc/make.conf before you compile

Installing with Packages Edit

  • you may need to set some options, otherwise you will probably get an outdated MPD release (see the FreeBSD handbook)
  • make sure internet works, then do a
pkg_add -r musicpd
pkg_add /path/to/package.tgz

Configure MPD Edit

  • for general configuration: edit /usr/local/etc/mpd.conf (see Configuration for details)
  • to start MPD at boot time: edit /etc/rc.conf and include musicpd_enable=YES

Kernel compilers beware Edit

  • MPD needs System V shared memory; make sure 'SYSVSHM' is included in your kernel!

Mac OS X 10.6, 10.5 Install Procedure Edit

  • Install mxcl's homebrew
  • Open Terminal.app (inside Applications/Utilities)
    • brew install mpd

Mac OS X 10.3, 10.4 Install Procedure Edit

See the osx page for details.


NetBSD Install Procedure Edit

  • First select all the dependencies that you want from Dependencies and put the appropriate indications in the PKG_OPTIONS.musicpd variable. Possibilities are: aac, audiofile, flac, iconv, id3, and ogg.
  • install MPD through pkgsrc
    • you may need to update your pkgsrc tree (2004Q2 and up have it) (see the documentation for more information on updating)
cd /usr/pkgsrc/audio/musicpd 
make install
  • configure MPD:
    • for general configuration edit /usr/pkg/etc/mpd.conf (see Configuration for details) (example is in /usr/pkg/share/examples/mpd/mpd.conf)

SPARC/SPARC64 notes Edit

Since libmad is integer only, performance isn't the best on NetBSD/sparc{,64}. In case you don't want MPD to use 15% CPU on a 440 MHz UltraSPARC-IIi, you might consider adding these lines to your /usr/pkgsrc/audio/libmad/Makefile:

CONFIGURE_ARGS+= --enable-fpm=sparc 
CONFIGURE_ARGS+= --enable-speed

and then run

cd /usr/pkgsrc/audio/libmad 
make clean all replace

OpenBSD Install Procedure Edit

From packages:

  • Make sure your PKG_PATH variable is properly set
pkg_add -i mpd

From ports:

cd /usr/ports/audio/mpd
make install clean

Windows Install Procedure Edit

This may not work yet, but if it does the instructions are at Windows Compatibility

OpenWRT Install procedure Edit

Full details on how to setup mpd and phpMp2 on OpenWRT are available here


Software Appliance Availability Edit

If you have a spare machine (virtual or real) and you don't want to deal with configuration and setup yourself, there is a software appliance based on MusicPD available at http://www.rpath.org/rbuilder/project/musicpd/ -- it's currently shipped as a VMware virtual machine image, and comes with a minimal version of rPath Linux, MusicPD installed and configured, phpMp, and the beginnings of a web-based configuration tool. It also supports music shares over NFS and Samba. Word of warning: the appliance does not include MP3 support.

www

Around Wikia's network

Random Wiki