gnufm_install.txt 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. --- Installing GNU FM ---
  2. If for any reason you might need assistance following these instructions,
  3. please don't hestitate to join us at #libre.fm @ freenode (IRC).
  4. Dependencies:
  5. - Postgresql (recommended) / MySQL / SQlite (untested?)
  6. - Apache / lighttpd
  7. - PHP 5
  8. - AdoDB
  9. - Smarty + Smarty-gettext (see footnote)
  10. - Database modules for PHP
  11. PHP dependencies (AdoDB, Smarty, Smarty-gettext) are managed via composer.
  12. (This guide assumes you are capable of creating a user and database yourself.)
  13. TODO: Write guide for creating user and database
  14. First, grab yourself a copy of the code. It is available here:
  15. http://gitorious.org/foocorp/gnu-fm
  16. The checkout should contain a bunch of folders, the only ones we're
  17. interested in at the moment are the ones called "gnukebox" and "nixtape".
  18. GNU FM is divided into two modules: gnukebox, which receives scrobbles, and
  19. nixtape, which is the web frontend and provides the webservices (such as radio).
  20. Although gnukebox and nixtape have the same dependencies, they have separate
  21. composer files to make separate installation easier.
  22. --------------------------------------------------------------------------------
  23. Gnukebox:
  24. Installing gnukebox is easy:
  25. (1) Copy the contents of gnukebox to the root of a vhost.
  26. (2) Run 'composer install' in that directory.
  27. (3) Set up correct permissions on files and folders.
  28. (4) Run 'install.php' through a web browser.
  29. Gnukebox needs to be at the root of a vhost, simply because that's where
  30. clients expect it to be. For the rest of this document I'll assume gnukebox is
  31. accessible through the address 'gnukebox.local'. To complete step 1, copy the
  32. contents of the "gnukebox" folder to the root of your vhost:
  33. $ cp -r gnukebox/* /var/www/htdocs/gnukebox/.
  34. /var/www/htdocs/gnukebox is just where I've set up my gnukebox-vhost in Apache.
  35. Install the dependencies using composer:
  36. $ cd /var/www/htdocs/gnukebox
  37. $ composer install
  38. Now run these commands as root to correctly set permissions (assuming www-data
  39. is the user your webserver runs under).
  40. $ chown www-data:www-data -R /var/www/htdocs/gnukebox
  41. Now point your browser to 'http://gnukebox.local/install.php'.
  42. Just fill in the appropriate details and click 'Install'. This should connect
  43. to the database, create the appropriate tables and complete the 'config.php'
  44. file in the gnukebox-directory.
  45. If the script was unable to create the file, it will echo the contents to the
  46. screen and tell you to create it yourself.
  47. Note: Some users have reported getting a Server 500-error here. If you do, see
  48. if the tables were created and if 'config.php' has appeared in your gnukebox
  49. folder.
  50. --------------------------------------------------------------------------------
  51. Nixtape:
  52. Installing nixtape is currently a bit more work, but not much ;)
  53. Installing the base system:
  54. $ cp -r nixtape/* /var/www/htdocs/nixtape/.
  55. $ mkdir /var/www/htdocs/nixtape/themes/gnufm/templates_c
  56. Installing dependencies:
  57. $ cd /var/www/htdocs/nixtape/
  58. $ composer install
  59. Setting the correct permissions:
  60. $ chown www-data:www-data -R /var/www/htdocs/nixtape
  61. Now access your installation through a browser and follow the instructions.