Install

=Install=

From Music Player Daemon Community 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. {| id="toc" summary="Contents"

Contents

 * 1 General Installing From Source
 * 2 Debian Install Procedure
 * 3 Ubuntu Install Procedure
 * 4 Gentoo Install Procedure
 * 5 Arch Linux Install Procedure
 * 6 Fedora Install Procedure
 * 7 Mandrake Install Procedure
 * 8 FreeBSD Install Procedure
 * 8.1 Installing with Ports
 * 8.2 Installing with Packages
 * 8.3 Configure MPD
 * 9 Mac OS X 10.3, 10.4 Install Procedure
 * 10 NetBSD Install Procedure
 * 11 OpenBSD Install Procedure
 * 12 Windows Install Procedure
 * 13 OpenWRT Install procedure
 * 14 Software Appliance Availability
 * }

=General Installing From Source=
 * 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 sources in subversion? 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.

=Debian Install Procedure= If you are using Debian Sarge or Sid, then simply do: apt-get update apt-get install mpd

=Ubuntu Install Procedure= apt-get update apt-get install mpd $ dpkg -L mpd | grep example /usr/share/doc/mpd/examples /usr/share/doc/mpd/examples/mpdconf.example.gz (You may wish to zcat the gz file to your favorite target.)
 * 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.
 * With this debian package, you don't get the sample config file. You can get it from the regular mpd tarball from the mpd distribution site. Are you sure about that? Here's Ubuntu 6.06:

=Gentoo Install Procedure= If you want to install a subversion ebuild, replace mpd when emerging with mpd-svn [ebuild N    ] media-sound/mpd-0.11.5-r2 USE="aac alsa audiofile flac mad unicode -ipv6 -mikmod -vorbis" 1,101 kB
 * Check that you have all the USE flags you want supported for MPD, a hint is checking out the Dependencies page.
 * 1) emerge -pv mpd
 * Install MPD:
 * 1) emerge mpd
 * Edit the /etc/mpd.conf file as a superuser:
 * 1) {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
 * Put your music/playlists in the directories defined in /etc/mpd.conf (symlinks are fine).
 * Setup MPD to start in the init scripts:
 * 1) rc-update add mpd default
 * Create the MPD database:
 * 1) /usr/bin/mpd --create-db
 * Finally start MPD:
 * 1) /etc/init.d/mpd start

=Arch Linux Install Procedure= pacman -Sy mpd cp /etc/mpd.conf.example /etc/mpd.conf {your editor} /etc/mpd.conf mkdir ~/.mpd ~/.mpd/playlists /etc/rc.d/mpd create-db /etc/rc.d/mpd start pacman -Sy ncmpc mpc gmpc glurp
 * Sync and install with pacman
 * Configure MPD.
 * Create these two directories if they don't exist: ~/.mpd and ~/.mpd/playlists
 * Create the MPD database (this can take a while depending on the size of your collection):
 * Start MPD
 * Install a client - this will give you every client in pacman

=Fedora Install Procedure= or if you prefer apt. ncmpc is pending...
 * MPD is available through rpm.livna.org for patents reason. Just add the repository and install with:
 * 1) yum install mpd
 * 1) apt-get install mpd
 * Edit the /etc/mpd.conf file as a superuser:
 * 1) {your text editor here} /etc/mpd.conf
 * Create the MPD database:
 * 1) mpd --create-db
 * Finally start MPD:
 * 1) service mpd start
 * Make it come on when you reboot:
 * 1) chkconfig mpd on
 * The clients are available from Fedora Extras. Install them with:
 * 1) yum install mpc gmpc

=Mandrake Install Procedure= urpmi mpd
 * MPD is available through urpmi, to install:

=FreeBSD Install Procedure=

Installing with Ports
portinstall musicpd otherwise cd /usr/ports/audio/musicpd make install clean
 * you may need to update your ports tree (use CVSup, see the FreeBSD handbook)
 * make sure internet works, or put the source file in /usr/ports/distfiles
 * if portupgrade is installed
 * note: if you want support for AAC or MOD files, then put WITH_AAC=true and WITH_MOD=true in /etc/make.conf before you compile

Installing with Packages
pkg install musicpd pkg add /path/to/package.txz
 * 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
 * without internet download the package from http://www.freebsd.org/ or http://www.freshports.org/, then do

Configure MPD
/usr/local/bin/mpd --create-db /usr/local/etc/mpd.conf
 * 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
 * initial database creation:

=Mac OS X 10.3, 10.4 Install Procedure=
 * install darwinports http://svn.macosforge.org/repository/macports/downloads/
 * You may need to have a look at http://trac.macports.org/projects/macports/wiki/GettingStarted to use MacPorts/Darwinports.
 * port install faad2 (optional)
 * port install faac (optional)
 * port install mpd

=NetBSD Install Procedure= cd /usr/pkgsrc/audio/musicpd make install
 * 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)

/usr/pkg/bin/mpd --create-db /usr/pkg/etc/mpd.conf
 * 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)
 * initial database creation:

=OpenBSD Install Procedure= These are the configure script flags I found helpful for getting mpd running on Openbsd 3.8 i386.

MPD 0.11: MPD 0.12:
 * ./configure --with-ao-includes=/usr/local/include --with-ao=/usr/local/lib --disable-ipv6
 * ./configure --enable-ao --with-ao-includes=/usr/local/include --with-ao=/usr/local/lib

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

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

=Software Appliance Availability= 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.