Installing Ampache on FreeBSD

Success may vary, but this should get you started!

  • Install FreeBSD (8, and 8.1 also have been successfully tested with stable release. It was also successfully tested with 8.2)
  • Install www/apache (ampache2, and ampache22 have been tested with stable release)
  • Install databases/MySQL (5+ server and client)
  • Install lang/php5 ( make sure to check APACHE in the config, also CLI if you want to make use of the command line tools )
  • Install lang/php5-extensions (First do a 'make config' with the following modules configured: MySQL, GD, Session, iconv, hash, gettext)
  • Install devel/pcre

Download Ampache (will use 3.5.4 for guide)

Setup Apache

vi /usr/local/etc/apache22/httpd.conf

(add the following lines to the listed section)

* LoadModule php5_module libexec/apache22/libphp5.so
* Under <IfModule dir_modlule>: DirectoryIndex index.html index.php
* Under <IfModule mime_module>: AddType   application/x-httpd-php .php

Change to destination directory.

cd /usr/local/www 

Get and Uncompress Ampache.

fetch http://ampache.org/downloads/stable.tar.gz && tar zxvf stable.tar.gz

Rename extracted folder to whatever you want (If you choose something other than ampache make sure to note that when continuing going forward)

mv ampache-3.5.4 ampache

Chown to the Proper User/Group for Apache

chown -R www:www ampache 

Add Alias

Add the following to /usr/local/etc/apache22/Includes/ampache.conf

Alias /ampache	"/usr/local/www/ampache/"

<Directory "/usr/local/www/ampache/">
    DirectoryIndex index.php
    Order deny,allow
    Deny from All
    Allow from All
</Directory>

Restart Apache.

/usr/local/etc/rc.d/apache22 reload

If you made it this far, you should be able to point your browser to http://yourhost/ampache/

That's all the FreeBSD specific setup. You should now be able to follow the normal install instructions without a problem. http://ampache.org/wiki/install


A Note on transcoding:

If you install the transcoding apps from the ports tree you will need to either add /usr/local/bin to the PATH of the user that runs your webserver or define the absolute path to the commands (eg. /usr/local/bin/faad ) in the transcoding section of your config/ampache.cfg.php

Also 'transcode_cmd_mp3 = ”/usr/local/bin/lame -q 3 -b %SAMPLE% -S %FILE% - -”' seems to work better on default installs of FreeBSD rather than the default transcode_cmd_mp3.


A Note about 3.6:

As of right now MySQL port in FreeBSD's ports tree DOES NOT work with Ampache 3.6 svn. If you want to run 3.6 svn on a FreeBSD host you must either build MySQL from source, from the MySQL site, or run MySQL on a seperate OS. Once again not a separate FreeBSD server, but another OS all together.


Troubleshooting with FreeBSD 8.2:

If you encounter the following message on the top of the page at http://yourhost/ampache/: ”[possible-problem] Deprecated: Call-time pass-by-reference has been deprecated in /usr/local/www/ampache/lib/class/vauth.class.php on line 580”

You can simply ignore this warning. More about it here.

install/freebsd.txt · Last modified: 2011/11/28 07:18 by frojnd
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki