Skip to content
Joshua Brown-Williams edited this page Aug 10, 2016 · 56 revisions

WikiInstallation

Welcome to the slimpd wiki!

###REQUIREMENTS

  • MPD music player daemon
  • PHP
  • MySQL
  • Webserver (Apache, Nginx, Lighttpd, ...)
    • read-access to MPD-database-file (plain-text or gzip supported)
    • read-access to filesystem configured in 'mpd.conf:music_directory'
    • optional: enable module mod_rewrite
  • Python2.X
  • Lame (for displaying waveforms)
    • optional:
      • FAAD2 (for displaying waveforms for .m4a, .mp4, and, .aac)
      • Flac and Metaflac(usually included within the Flac package) (for displaying waveforms for .flac)
      • Mplayer (for displaying waveforms for .wma and .ac3)
      • Vorbis-Tools (for displaying waveforms for .ogg)
  • Sphinx 1

###SETUP

  • Create a virtual-host which points to your filesystem
  • Create a MySQL user and database
  • Copy '/slimpd/config/config_local.sample.ini' to '/slimpd/config/config_local.ini'
    and check values
  • Make sure that your web-server has write access to these directories:
    • '/slimpd/cache/'
    • '/slimpd/embedded/'
    • '/slimpd/peakfiles/'

#####CONFIGURE MySQL

  • Install MySQL/MariaDB and initialize the server. As superuser run (check your distributions instructions, they may vary): mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

    • Now the MySQL or MariaDB service may be started and/or enabled (systemctl or init-scripts). As superuser run the following command to secure your installation (follow the prompts. Remember there is no 'password' connected to the installation at this point):

      <code>mysql_secure_installation</code> 
      
    • Configuration options are read from the following files in the given order: '/etc/my.cnf' '/etc/mysql/my.cnf' '~/.my.cnf'.

    • Create the MySQL user and password, we'll call our user 'slimpduser' and password 'mypassword'. And create the MySQL database, we'll call it 'slimpddb'. Select your 'hostname'. 'Hostname' tells MySQL what hosts the user can connect from. If you only want it from the same machine you are on/using, use 'localhost'.

    • First start MySQL in terminal at the command prompt:

      mysql -u user -p

    • User is the default admin user name that you created during initialization (probably 'root'), and the '-p' will ask you for your password after you hit 'enter'. After correctly entering the password you are in the MySQL/MariaDB shell ('mysql>' or 'MariaDB>'). Next create your sliMpd user,password, database, and select your hostname (omit the ' from the front and end of names):

      MariaDB> CREATE USER 'slimpduser'@'localhost' IDENTIFIED BY 'mypassword';
      MariaDB> CREATE DATABASE 'slimpddb';
      MariaDB> GRANT ALL PRIVILEGES ON 'slimpddb'.* TO 'slimpduser'@'localhost';
      MariaDB> FLUSH PRIVILEGES;
      MariaDB> quit
  • Create database tables and begin the import of your music from your Mpd-database:

    php '*/slimpd/slimpd' hard-reset

#####CREATE SPHINX DATABASE

  • Add sphinx-configuration to:
    '/etc/sphinx/sphinx.conf' based on '/slimpd/config/sphinx.example.conf'
  • Update sphinx-index
    • The first time after setting up sphinx you must run:
      'sudo indexer slimpdmain slimpdsuggest'
    • For all future sphinx updates run:
      'sudo /slimpd/scripts/sphinx-rotate.sh'

#####SYSTEMCHECK

  • After completing setup, run systemcheck. Either type in sliMpd's web-address and at */index.php/*,change it to */index.php/systemcheck, or simply press the 'Gear Icon' on the sliMpd web-page.
  • Scroll down the page and check for 'Success' or 'Error' messages. This is how to debug your installation.
    • Filesystem: make certain it says 'Success' for every subheading. All 'Error' messages under this heading must be fixed!
      • READ-PERMISSION TO ACCESS MPD'S MUSIC-DIRECTORY - Your [MPD music-directory](https://github.com/othmar52/slimpd/wiki/Configuration/#mpd ""config_local.ini [mpd]") and its children must be read accessible to your webserver-user.
      • WRITE-PERMISSION FOR CACHE-DIRECTORY - Your webserver-user must have write permission to the '/slimpd/cache/' directory.
      • WRITE-PERMISSION FOR EMBEDDED-DIRECTORY - Your webserver-user must have write permission to the '/slimpd/embedded/' directory.
      • WRITE-PERMISSION FOR PEAKFILES-DIRECTORY - Your webserver-user must have write permission to the '/slimpd/peakfiles/' directory.
    • Database: MySQL-database, make certain it says 'Success' for every subheading. All 'Error' messages under this heading must be fixed!
      • CONNECTION - You must be able to successfully connect to the MySQL-database created for sliMpd at http://localhost, by having the correct dbusername, dbpassword, and dbdatabase information added to your '/slimpd/config/config_local.ini'.
      • PERMISSIONS OF DATABASE-USER - MySQL database user has permission to create databases.
      • SCHEMA
      • DATABASE CONTENT
    • MPD: make certain it says 'Success' for every subheading. All 'Error' messages under this heading must be fixed!
      • CONNECTION
      • READ ACCESS TO DATABASE FILE
    • Sphinx: 1 ↵ make certain it says 'Success' for every subheading. All 'Error' messages under this heading must be fixed!
      • CONNECTION
      • SCHEMA
      • INDEXED DATA
    • Waveform: The 'Success' or 'Error' messages are for the codecs installed. Only the codecs required for your music collection are necessary to have installed. The 'Show More' buttons, when pressed give detailed information for the creation of the test music file 'Fingerprint' with result comparison. It also provides details for the executed command used to create the test music file 'Waveform' and states whether the test failed or succeeded. These may prove helpful to debug should a codec you have installed not show as successfully creating the 'Fingerprint' and 'Waveform'.
      • MP3 EXTRACT FINGERPRINT and MP3 EXTRACT PEAKS FOR WAVEFORM These are the only exception. They must be successfully installed with a green 'Check'!
      • FLAC EXTRACT FINGERPRINT and FLAC EXTRACT PEAKS FOR WAVEFORM
      • WAV EXTRACT FINGERPRINT and WAV EXTRACT PEAKS FOR WAVEFORM
      • M4A EXTRACT FINGERPRINT and M4A EXTRACT PEAKS FOR WAVEFORM
      • AIF EXTRACT FINGERPRINT and AIF EXTRACT PEAKS FOR WAVEFORM
      • AAC EXTRACT FINGERPRINT and AAC EXTRACT PEAKS FOR WAVEFORM
      • OGG EXTRACT FINGERPRINT and OGG EXTRACT PEAKS FOR WAVEFORM
      • WMA EXTRACT FINGERPRINT and WMA EXTRACT PEAKS FOR WAVEFORM
      • AC3 EXTRACT FINGERPRINT and AC3 EXTRACT PEAKS FOR WAVEFORM
    • Enviroment: Currently unimplemented.
      • check if php-pdo is enabled Unimplemented
      • check locale settings to avoid errors caused by special chars Unimplemented
    • Xwax: Currently unimpliimented.
      • check connection Unimplemented

1. Sphinx will be optional in the future