Music streaming: Ampache installation

Music streaming: Ampache installation

Music streaming: Ampache installation 150 150 Roderick Derks
R71 Always wanted to create your own music database that you can connect to from all over the world? Well, then Ampache is the right tool for you. What you need is a webserver, MySQL database, and music files like MP3's. That's about it.
 

Ampache will use the information found in the tags of your music files to fill it's database. So, if you want a perfect and clean database you first have to edit you files using a tag editor. This can take a lot of time, even months if you have thousands of mp3's on your server. It certainly is rewarding (if you create a good backup.. dough!), but not a nessecity. Ampache can also show album covers. Very slick.

After installation and configuration you can connect to your webserver from any webbrowser and download a m3u file. This file is imported in you local music player like winamp. And now you can listen to your favorite music at work!

 

Place the downloaded tar.gz file to the /tmp dir using ftp or another protocol.

# mkdir /var/www/music
# cd /var/www/music
# tar xvzf /tmp/ampache…tar.gz .
# chown – R apache:apache /var/www/music

# vi /etc/httpd/conf/httpd.conf

<VirtualHost 10.0.2.3:80>
    ServerAdmin roderick@r71.nl
   
DocumentRoot /var/www/music
   
ServerName music.r71.nl
</VirtualHost>

 Alias /radio "/var/www/music"
   
<Directory "/var/www/music">
       
Options Indexes FollowSymlinks MultiViews
       
AllowOverride None
       
Order allow,deny
       
Allow from all
   
</Directory>

 

 

With the more recent Ampache installation procedures you can use the webbrowser to set up the database. You can go to the website. If that doesn't work: 

# mysql -u root –p

mysql> create database ampache

mysql> GRANT USAGE ON * . * TO 'ampache'@'localhost' IDENTIFIED BY 'ampache_passw' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 ;
Query OK, 0 rows affected (0.01 sec)

mysql> SET PASSWORD FOR 'ampache'@'localhost' = OLD_PASSWORD('ampache_passw');
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT SELECT ,
    -> INSERT ,
    -> UPDATE ,
    -> DELETE ,
    -> CREATE ,
    -> DROP ,
    -> INDEX ,
    -> ALTER ON `ampache` . * TO 'ampache'@'localhost';
Query OK, 0 rows affected (0.00 sec)

 

Goto website and do this:

Insert database 

Desired database name ampache
MySQL Hostname Ampache
MySQL Administrative Username Ampache
MySQL Administrative Password Ampache_password

 

Werkt bovenstaande niet:
#  mysql -u root -p ampache </var/www/html/ampache/sql/ampache.sql

 

Generate config file:

Web path  /radio
 Desired database name ampache
MySQL hostname localhost
MySQL username ampache
MySQL password ampache_password

 

 

 

Ampache configfiles aanpassen na installatie:

../templates/header.inc om de weblink boven in beeld op de pagina nadat je bent ingelogd aan te passen.
../themes/classic/templates/default.css aanpassen :
td {
        padding: 0px 8px 0px 8px;
        color: #000000;
        font-family: Verdana, Helvetica, sans-serif;
        font-size: 10px; /*RRD*/
}
#Header h1 {
        background: transparent url("../images/bg_login_0.jpg") no-repeat top center; /*RRD*/
}
#container h1{
        background:url("../images/bg_login_0.jpg") no-repeat center; /*RRD*/
}

../config/ampache.cfg.php
local_username = ampache
local_pass =password

Kan handig zijn: zoeken naar een bepaalde string:
find . -type f -exec egrep -i "http://www.ampache.org/index.php" /dev/null {} ;

————————————————

# ls /etc/init.d/
nagios
nagios_grapher

# ls /usr/src/redhat/RPMS/i386/
perl-rrdtool-1.2.23-3.i386.rpm    rrdtool-1.2.23-3.i386.rpm            rrdtool-devel-1.2.23-3.i386.rpm
python-rrdtool-1.2.23-3.i386.rpm  rrdtool-debuginfo-1.2.23-3.i386.rpm  rrdtool-doc-1.2.23-3.i386.rpm

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message