]> git.tuebingen.mpg.de Git - paraslash.git/blob - INSTALL
add dbtool hooks
[paraslash.git] / INSTALL
1 Paraslash install notes
2 =======================
3
4 Any knowledge of how to work with mouse and icons is not required.
5
6 Install all needed packages
7 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 See README for a list of required software. Don't be afraid of the long
9 list of unusal libraries: Most of them are only needed for optional
10 programs. Autoconf will detect what is installed on your system and
11 will only build those executables that can be built with your setup.
12
13
14 Install server and client
15 ~~~~~~~~~~~~~~~~~~~~~~~~~
16 Install the package on all machines, you'd like this software to run on:
17
18         (./configure && make) > /dev/null
19
20 There should be no errors (but probably many warnings about missing
21 software). Then, as root,
22
23         make install
24
25
26 Setup user list and create rsa keys
27 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28 If you already have your rsa keys, skip this step. If you are new
29 to paraslash, you have to generate an rsa key pair for each user you
30 want to allow to connect. You need at least one user.
31
32 Let's assume that you'd like to run the server on host server_host
33 as user foo, and that you want to connect from client_host as user bar.
34
35 As foo@server_host, create ~/.paraslash/server.users:
36
37         target=~/.paraslash/server.users
38         key=~/.paraslash/key.pub.bar
39         perms=DB_READ,DB_WRITE,AFS_READ,AFS_WRITE
40         mkdir -p ~/.paraslash
41         echo "user bar $key $perms" >> $target
42
43 This gives bar full privileges.
44
45 Change to the bar account on client_host and generate the key-pair
46 with the commands
47
48         key=~/.paraslash/key.bar
49         mkdir -p ~/.paraslash
50         (umask 077 && openssl genrsa -out $key)
51
52 Next, extract its public part:
53
54         pubkey=~/.paraslash/key.pub.bar
55         openssl rsa -in $key -pubout -out $pubkey
56
57 and copy the public key just created to server_host:
58
59         scp $pubkey foo@server_host:.paraslash/
60
61 Finally, tell para_client to connect to server_host:
62
63         echo 'hostname server_host' > ~/.paraslash/client.conf
64
65 Start para_server
66 ~~~~~~~~~~~~~~~~~
67         para_server
68
69 Now you can use para_client to connect to the server and issue
70 commands. Open a new shell (as "bar" on "client_host" in the above
71 example) and try
72
73         para_client help
74         para_client si
75
76 to retrieve the list of available commands and some server info.
77
78
79 Choose your database tool (dbtool)
80 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81 You have three options:
82
83         1. Use the mysql dbtool which comes with paraslash and requires
84         mysql. This is recommended.
85
86         2. Use your own database tool. If you have that already,
87         skip this step.
88
89         3. If you can not use the mysql dbtool and you just want
90         to quickly make paraslash working, use the dopey dbtool.
91         The directory which is searched for audio files can be given
92         via the server option --dopey_dir.
93
94         Note, however, that dopey is _really_ dopey. It scans
95         $dopey_dir on every audio file change and chooses one
96         randomly. You get the idea. Have a look at its source code
97         and feel free to modify.
98
99
100 The current database tool can be changed at runtime via
101
102         para_client cdt new_dbtool
103
104 If you have choosen 1. above, read README.mysql and follow the
105 instructions given there.  Return to this document when ready.
106
107
108 Start streaming manually
109 ~~~~~~~~~~~~~~~~~~~~~~~~
110
111         para_client play
112         para_client stat 2
113
114 This starts streaming and dumps some information on the current song
115 to stdout.
116
117 You should now be able to listen to the stream with any player
118 capable of reading from stdin. To check this, try the following
119 on client_host:
120
121         mp3:
122
123                 para_recv -r http:-i:server_host | para_filter -f mp3 -f wav | para_play
124                 or
125                 mpg123 http://server_host:8000/
126                 or
127                 xmms http://server_host:8000/
128
129         ogg:
130
131                 para_recv -r http:-i:server_host | para_filter -f ogg -f wav | para_play
132
133 If this works, proceede. Otherwise doublecheck what is logged by
134 para_server and use the --loglevel option of para_recv to increase
135 verbosity.
136
137 Configure para_audiod
138 ~~~~~~~~~~~~~~~~~~~~~
139 In order to automatically start the right decoder at the right time
140 and to offer to the clients some information on the current audio
141 stream and on paraslash's internal state, you should run the local
142 audio daemon, para_audiod, on every machine that is supposed to play
143 the audio stream. Try
144
145         para_audiod -h
146
147 for help. Usually you have to specify at least server_host as the
148 receiver specifier, like this:
149
150         -r http:-i:server_host
151
152 The prefered way to use para_audiod is to run it once at system start
153 as an unprivileged user. para_audiod needs to create a "well-known"
154 socket for the clients to connect to. If you want to change the
155 default socket (e.g. because you do not have write access for the
156 directory where the socket resides), use the -s option or the config
157 file to change the default. Note that in this case you'll also have
158 to specify the same value for para_audioc's -s option.
159
160 If para_server is playing, you should be able to listen to the audio
161 stream as soon as para_audiod is started.  Once it is running, try
162
163         para_audioc stat
164
165 That should dump some information to stdout. Other commands include
166
167         para_audioc off
168         para_audioc on
169         para_audioc sb
170         para_audioc term
171         para_audioc cycle
172
173
174 Start para_gui
175 ~~~~~~~~~~~~~~
176 para_gui reads the output of "para_audioc stat" and displays that
177 information in a curses window. It also allows you to bind keys to
178 arbitrary commands. There are several flavours of key-bindings:
179
180         o internal: These are the built-in commands that can not be
181           changed (help, quit, loglevel, version...).
182
183         o external: Shutdown curses before launching the given command.
184           Useful for starting other ncurses programs from within
185           para_gui, e.g. aumix or para_dbadm. Or, use
186
187                 para_client mbox
188
189           to write a mailbox containing one mail for each file
190           in the mysql database and start mutt from within para_gui
191           to browse your collection!
192
193         o display: Launch the command and display its stdout in
194           para_gui's bottom window.
195
196         o para: Like display, but start "para_client <specified
197           command>" instead of "<specified command>".
198
199
200 That's all, congratulations. Check out all the other optional gimmics!
201
202 Troubles?
203 ~~~~~~~~~
204 If something went wrong, look at the output. If that does not give
205 you a clue, use loglevel one (option -l 1 for most commands) to show
206 debugging info. Almost all paraslash executables have a brief online
207 help which is displayed by using the -h switch.
208
209 Still not working? Mail the author Andre Noll <maan@systemlinux.org>
210 (english, german, or spanish language). Please provide enough info
211 such as the version of paraslash you are using and relevant parts of
212 the logs.