Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: Craig Cabrey on February 08, 2009, 06:50:08 PM

Title: [Announce] How-to install Ampache 3.4.4 on SME Server 7.4
Post by: Craig Cabrey on February 08, 2009, 06:50:08 PM
This is a guide on how to install and setup Ampache 3.4.4 (latest stable version) as of 2/8/2009.

Ampache's website is: www.ampache.org

1. Please install the PHP5 contrib available here: http://wiki.contribs.org/PHP5 (http://wiki.contribs.org/PHP5)

2. Create an ibay with a meaningful name such as media. Put all of your music files under the files part of the ibay.

   NOTE: If you plan on creating a subdomain just for ampache (i.e. http://  music.domain.com/), you may have to modify part of the installation procedure, specifically while creating the config file, but I have not tried this.

3. Make sure PHP5 is enabled for the media ibay (as root):

   
Code: [Select]
   db accounts setprop media php5 yes
   

4. Download the ampache tarball from here: http://ampache.org/downloads/stable.tar.gz (http://ampache.org/downloads/stable.tar.gz) and extract it into the html folder of the media ibay.
   
Code: [Select]
   tar xzvf stable.tar.gz
   mv ampache-3.4.4/* /home/e-smith/files/ibays/media/html
   

5. You can now start the installation at http://yourserver.yourdomian.com/media (http://yourserver.yourdomian.com/media)

6. When you get to the part about the database, you can find the root password by (as root):
   
Code: [Select]
   cat /var/service/set.password
   
 
   It will be the long string of random letters and numbers; make sure you copy ALL of it.

   Before you start jumping down my throat about using the root password, it only needs that to create the ampache user and database. Then it no longer uses root, so it is safe.

7. Continue along the installation and then when it prompts you, download the ampache.cfg.php file to your desktop or some other place. Somehow get that into
   
Code: [Select]
   /home/e-smith/files/ibays/media/html/config
   
using ftp, scp, samba, afp, or any other method.

8. Pick an administration password; I just used the admin password of the SME server for this.

You will then be brought to the Ampache login screen. Log in with the password created earlier. Now you will need to add some music.

9. On the left side of the page, there is a section labeled Menu. Under that there are a few icons. Click the one second from the right (If you hover over the correct one, the tooltip will be Admin).

10. Click "Add a catalog." The default settings should be fine; all you need to do is give it a title (I did iTunes Music, heh) and give the full path to the music files. If you are using the media ibay, that path should be:
   
Code: [Select]
    /home/e-smith/files/ibays/media/files
   

11. Check Gather Album artwork if you so desire.

    WARNING: The import process is CPU intensive as it is scanning your whole library and then fetching artwork. It is not recommended to do this while other people are using the server (unless you have a multiprocessor server, which I don't :( ).

12. Finished! You should be able to create a playlist and either download a m3u file or stream with the built in flash player.

The interface for Ampache is self-explanatory and in my opinion is much better than Jinzora (which I can't even get working properly).

Please report any problems right here, as I don't have wiki access or a bugzilla page for this, but I will be monitoring this thread.

Thanks!
Title: Re: [Announce] How-to install Ampache 3.4.4 on SME Server 7.4
Post by: WayneJVM on March 24, 2009, 06:02:06 AM
The installation instructions worked well - with only one small problem. The set.password file wasn't in the location indicated. Once I ran a find was able to get the correct MySQL password and everything is up an running. I found the file here:

/etc/e-smith/templates/var/service/mysqld/set.password

Also, remember PHP4 is native to SME 7.x so you have to install PHP5 as described at http://wiki.contribs.org/PHP5 (http://wiki.contribs.org/PHP5)

I highly recommend Ampache. I tried Jinzora and had it up and running despite some initial problems, but it crashed shortly after installation. I tried correcting the problem but decided to abandon it in favor of Ampache. Ampache was easy to install and works flawlessly! Thanks for the instructions!
Title: Re: [Announce] How-to install Ampache 3.4.4 on SME Server 7.4
Post by: cactus on March 24, 2009, 11:01:18 AM
Please take the time to document your HowTo in the wiki (as that is the preffered location) for such instructions. TIA.
Title: Re: [Announce] How-to install Ampache 3.4.4 on SME Server 7.4
Post by: Craig Cabrey on March 24, 2009, 11:41:59 AM
WayneJVM: For the PHP5, look at step #1.

Please take the time to document your HowTo in the wiki (as that is the preffered location) for such instructions. TIA.

Should I submit a bug for it? I have no access unless you can put it up.

Thanks! (http://Smileys/default/smile.gif) (http://javascript:void%280%29;)
Title: Re: [Announce] How-to install Ampache 3.4.4 on SME Server 7.4
Post by: David Harper on March 24, 2009, 01:10:21 PM
You can request wiki access from your profile page. See http://wiki.contribs.org/Help:Contents
Title: Re: [Announce] How-to install Ampache 3.4.4 on SME Server 7.4
Post by: glenhugn on March 30, 2010, 12:25:34 AM
Hello everyone. I recently tried this add-on to organize the endless amount of media files in my collection, and was having trouble with the root password and db access.

However, I found a work around for this, and that is to create a new mysql user with global privileges using phpmyadmin (command line can be use for this purpose as well). And you will not need to search through the cat for the root user password for mysql. Instead, phpmyadmin can create a user and a db in one instance for the ampache db and mysql administrator.

Now, all you need to do now is follow the rest of the install steps, and enter the mysql db user and password you just created in phpmyadmin, when prompted.

I also found that when prompted to download the "ampche.cfg.php", a carefull inspection is required, as IE changed the filename to "ampache_cfg" instead. Just change the name back to the original and upload it to the config folder and check to be sure it is correct.

et voila. your done.
Title: Re: [Announce] How-to install Ampache 3.4.4 on SME Server 7.4
Post by: cactus on March 30, 2010, 04:49:30 PM
However, I found a work around for this, and that is to create a new mysql user with global privileges using phpmyadmin (command line can be use for this purpose as well). And you will not need to search through the cat for the root user password for mysql. Instead, phpmyadmin can create a user and a db in one instance for the ampache db and mysql administrator.
You don't have to know the root password, please read the MySQL FAQ section: http://wiki.contribs.org/MySQL
Title: Re: [Announce] How-to install Ampache 3.4.4 on SME Server 7.4
Post by: glenhugn on March 31, 2010, 04:10:49 AM
Thanks cactus, I know mysql root user is authenticated once logged in by root. That is not what my post is about. It is a work around for a step #6 in the ampache installation procedure.

"Step 6. When you get to the part about the database, you can find the root password by (as root): cat /var/service/set.password
   
   It will be the long string of random letters and numbers; make sure you copy ALL of it.

   Before you start jumping down my throat about using the root password, it only needs that to create the ampache user and database. Then it no longer uses root, so it is safe. "

I notice most people are having problem with this step, so I gave them a work around. this is better as root users should not have access to any db anyways. And phpmyadmin can help to create the ampache db and user for completing the installation setup.
Title: Re: [Announce] How-to install Ampache 3.4.4 on SME Server 7.4
Post by: cactus on March 31, 2010, 07:45:53 AM
Thanks cactus, I know mysql root user is authenticated once logged in by root. That is not what my post is about. It is a work around for a step #6 in the ampache installation procedure.

"Step 6. When you get to the part about the database, you can find the root password by (as root): cat /var/service/set.password
   
   It will be the long string of random letters and numbers; make sure you copy ALL of it.

   Before you start jumping down my throat about using the root password, it only needs that to create the ampache user and database. Then it no longer uses root, so it is safe. "

I notice most people are having problem with this step, so I gave them a work around. this is better as root users should not have access to any db anyways. And phpmyadmin can help to create the ampache db and user for completing the installation setup.
Is is still not the proper instruction. If the installer needs an account to do so you should create a separate account to do so, or even better create the database through the CLI or some other tool yourself. Using the root password is the worst solution you can possible choose.

Although most likely ampache will not use the root account to access it's database, but running applications with root user database access is a big security issue as it has all privileges. You are far better of instructing people to create the proper user with the proper privileges to runt this step instead of quickly using the root account. (Even though it comes from the ampache installation instruction, it does not need to be root, it needs the proper privileges. It is a bad thing the ampache installer is made like this, but that is not your fault).

Please remember that and create separate accounts with the proper privileges for your application database access.
Title: Re: [Announce] How-to install Ampache 3.4.4 on SME Server 7.4
Post by: glenhugn on March 31, 2010, 12:09:28 PM
Thanks for your reply cactus, and for clarifying what I've bee saying. Root user access to any db is a no no on SME. That is exactly what my point is...which is why I posted the work around for step 6 of the ampache installation in the first place.

The work around I suggested is to create the ampache db + user through terminal access or if possible through phpmyadmin - Then follow the rest of the ampache installation steps to complete the installation process.
Title: Re: [Announce] How-to install Ampache 3.4.4 on SME Server 7.4
Post by: johnp on April 01, 2010, 06:56:13 AM
From what I've seen this now require mysql 5, maybe not the older version. Did anyone try using the site maker contrib to do an install?
Title: Re: [Announce] How-to install Ampache 3.4.4 on SME Server 7.4
Post by: glenhugn on April 01, 2010, 09:38:12 AM
From what I've seen this now require mysql 5, maybe not the older version. Did anyone try using the site maker contrib to do an install?

I have no problem so far with the lastest build of ampache and mysql 4, and I have no plan to upgrade mysql. Waiting on SME 8, am sure it will have most of the updates precompiled.