Installing MP3db on your Linux/BSD/OSX Computer

NOTE: In this document /path_to_your_mp3s means just that: the filesystem path to the root directory of your mp3 files. Replace it whenever used with YOUR path.

Install the Scripts

Run the following commands as (root, any superuser) Note: To upgrade to future releases just do the first 3 steps, and nothing else in this document.

Create the MP3db Database

Run the following command as (root, any superuser). The -p assumes you have set up MySQL with a password for the user account you're using. Edit /usr/bin/ with whatever text editor you prefer and find the section at the top labled "YOUR ATTENTION PLEASE!!!!". Below this line, configure your SQL username and password. Here's an example:
my $sqluser = 'my_username';
my $sqlpass = 'sqlpassword111';
Run the following commands as (root, any superuser) That last command may take some time to scan all of your mp3s, depending on the size of your collection and the speed of your computer. A time of 10 minutes or more would not be unreasonable.

NOTE: As you make changes to your MP3 collection such as adding or deleting mp3s or changing the info inside the tags, these changes will not appear in the database until you re-scan your collection. I recommend setting up a cron job to run the backend script on a nightly basis.

Configure Apache

Please follow the section below that corresponds to the version of Apache you have installed.

Apache 1.3.x

Apache 2.x


Browse to http://yoursite.dom/path_to_your_mp3s and if the MP3db main page loads, you're all done! If not, read the directions again and check your error log for details on where you may have gone astray.

Appendix A: Requirements

Appendix B: Optional Compression

Some of the pages and playlists generated by the script contain a lot of data, sometimes totaling half a meg just to browse a list of all your artists. Over slower connections the size of the pages can cause long wait times as well as buffering problems if you load a large page while streaming a song. The solution is to implement compression in Apache. Below are solutions for both Apache versions.

Apache 1.3.x

Apache 2.x

Appendix C: Alternate Configurations

The apache set up can be done in many ways, using <Directory, <Location or even <VirtualHost configurations. If you know how to set them up, use whichever suits you best. I prefer a virtual host myself.

Appendix D: Acknowledgements

This program uses code or software from the following authors