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.

* 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

* 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.

```
apt-get update
apt-get install mpd

```

* 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:*

```
$ 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.)

# Gentoo Install Procedure

***If you want to install a subversion ebuild, replace mpd when emerging with mpd-svn***

* Check that you have all the USE flags you want supported for MPD, a hint is checking out the Dependencies page.

```
# emerge -pv mpd
[ebuild  N    ] media-sound/mpd-0.11.5-r2
USE="aac alsa audiofile flac mad unicode -ipv6 -mikmod -vorbis" 1,101 kB

```

* 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
	+ 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

```

* Create the MPD database:

```
# /usr/bin/mpd --create-db

```

* Finally start MPD:

```

# Arch Linux Install Procedure

* Sync and install with pacman

```
pacman -Sy mpd

```

* Configure MPD.

```
cp /etc/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 ~/.mpd ~/.mpd/playlists

```

* Create the MPD database (this can take a while depending on the size of your collection):

```
/etc/rc.d/mpd create-db

```

* Start MPD

```
/etc/rc.d/mpd start

```

* Install a client - this will give you every client in pacman

```
pacman -Sy ncmpc mpc gmpc glurp

```

# Fedora Install Procedure

* MPD is available through rpm.livna.org for patents reason. Just add the repository and install with:

```
# yum install mpd

```

or

```
# apt-get install mpd

```

if you prefer apt.

* Edit the /etc/mpd.conf file as a superuser:

```
# {your text editor here} /etc/mpd.conf

```

* Create the MPD database:

```
# mpd --create-db

```

* Finally start MPD:

```
# service mpd start

```

* Make it come on when you reboot:

```
# chkconfig mpd on

```

* The clients are available from Fedora Extras. Install them with:

```
# yum install mpc gmpc

```

ncmpc is pending...

# Mandrake Install Procedure

* MPD is available through urpmi, to install:

```
urpmi mpd

```

# FreeBSD Install Procedure

## Installing with Ports

* + 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

```
portinstall musicpd

```

otherwise

```
cd /usr/ports/audio/musicpd
make install clean

```

* + - 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

* 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 install musicpd

```

* without internet download the package from http://www.freebsd.org/ or http://www.freshports.org/, then do

```
pkg add /path/to/package.txz

```

## Configure MPD

* 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:

```
/usr/local/bin/mpd --create-db /usr/local/etc/mpd.conf

```

# 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

* 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)
	+ initial database creation:

```
/usr/pkg/bin/mpd --create-db /usr/pkg/etc/mpd.conf

```

# OpenBSD Install Procedure

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

MPD 0.11:

* ./configure --with-ao-includes=/usr/local/include --with-ao=/usr/local/lib --disable-ipv6

MPD 0.12:

* ./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.