git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

gnufm_install.txt 3.17 KB
Newer Older
mattl's avatar
mattl committed
1 2
--- Installing GNU FM ---

3 4
If for any reason you might need assistance following these instructions,
please don't hestitate to join us at #libre.fm @ freenode (IRC).
mattl's avatar
mattl committed
5

6
Dependencies:
mattl's avatar
mattl committed
7 8 9 10 11 12 13
	      - Postgresql (recommended) / MySQL / SQlite (untested?)
	      - Apache / lighttpd
	      - PHP 5
	      - AdoDB
	      - Smarty + Smarty-gettext (see footnote)
	      - Database modules for PHP

14 15 16
PHP dependencies (AdoDB, Smarty, Smarty-gettext) are managed via composer.

(This guide assumes you are capable of creating a user and database yourself.)
mattl's avatar
mattl committed
17 18 19
TODO: Write guide for creating user and database

First, grab yourself a copy of the code. It is available here:
20

mattl's avatar
mattl committed
21 22 23 24 25 26 27 28
http://gitorious.org/foocorp/gnu-fm

The checkout should contain a bunch of folders, the only ones we're
interested in at the moment are the ones called "gnukebox" and "nixtape".

GNU FM is divided into two modules: gnukebox, which receives scrobbles, and
nixtape, which is the web frontend and provides the webservices (such as radio).

29 30 31 32 33
Although gnukebox and nixtape have the same dependencies, they have separate
composer files to make separate installation easier.

--------------------------------------------------------------------------------

mattl's avatar
mattl committed
34
Gnukebox:
35

mattl's avatar
mattl committed
36
Installing gnukebox is easy:
37 38 39 40
       (1) Copy the contents of gnukebox to the root of a vhost.
       (2) Run 'composer install' in that directory.
       (3) Set up correct permissions on files and folders.
       (4) Run 'install.php' through a web browser.
mattl's avatar
mattl committed
41

42 43 44 45
Gnukebox needs to be at the root of a vhost, simply because that's where
clients expect it to be. For the rest of this document I'll assume gnukebox is
accessible through the address 'gnukebox.local'. To complete step 1, copy the
contents of the "gnukebox" folder to the root of your vhost:
mattl's avatar
mattl committed
46 47 48 49 50

$ cp -r gnukebox/* /var/www/htdocs/gnukebox/.

/var/www/htdocs/gnukebox is just where I've set up my gnukebox-vhost in Apache.

51
Install the dependencies using composer:
mattl's avatar
mattl committed
52

53 54
$ cd /var/www/htdocs/gnukebox
$ composer install
mattl's avatar
mattl committed
55

56 57
Now run these commands as root to correctly set permissions (assuming www-data
is the user your webserver runs under).
mattl's avatar
mattl committed
58 59 60 61 62

$ chown www-data:www-data -R /var/www/htdocs/gnukebox

Now point your browser to 'http://gnukebox.local/install.php'.

63 64 65
Just fill in the appropriate details and click 'Install'. This should connect
to the database, create the appropriate tables and complete the 'config.php'
file in the gnukebox-directory.
mattl's avatar
mattl committed
66

67 68 69 70 71 72 73 74
If the script was unable to create the file, it will echo the contents to the
screen and tell you to create it yourself.

Note: Some users have reported getting a Server 500-error here. If you do, see
if the tables were created and if 'config.php' has appeared in your gnukebox
folder.

--------------------------------------------------------------------------------
mattl's avatar
mattl committed
75 76 77 78 79 80 81 82 83

Nixtape:

Installing nixtape is currently a bit more work, but not much ;)

Installing the base system:
    $ cp -r nixtape/* /var/www/htdocs/nixtape/.
    $ mkdir /var/www/htdocs/nixtape/themes/gnufm/templates_c

84 85 86
Installing dependencies:
    $ cd /var/www/htdocs/nixtape/
    $ composer install
mattl's avatar
mattl committed
87 88 89 90 91

Setting the correct permissions:
    $ chown www-data:www-data -R /var/www/htdocs/nixtape

Now access your installation through a browser and follow the instructions.