Add Russian translation provided by Валерий Крувялис <valkru@mail.ru>
[xiph-mirror.git] / icecast2yp / README
blob0c933e890af9a2cc77260349d0e0b27db3dc219f
1 The is the readme for the icecast2 yp directory cgi script.
2 ----------------------------------------------------------
4 currently this is a work in-progress...
7 Dependencies :
9 - libxml2
10 - mysql client libs
11 - libcgi
13 Please make sure you have these libraries installed before building the code.
16 Cron Jobs :
18 There are 3 cron jobs that need to run.
20 1. yp_clean - this should run every 5 minutes.  It goes through the DB and 
21 will purge any hanging entries.
22 2. yp_random - I had this running every 30 or 60 mins..It will go through 
23 the DB and randomize the rankings.  This will effectively rotate those 
24 streams that are listed on the main page.
25 3. yp_cachegen - This generates the file yp.xml which needs to be placed in 
26 the root of dir.xiph.org.  This is what many app-based stream browsers are 
27 using to access the directory data.  Back on MF, this was running every 
28 minute.  Currently, the location of the output yp.xml is specified in the 
29 source code (right now it's "yp.xml", so it will dump it wherever your CWD 
30 happens to be when you run it).  You can change it in the source code by 
31 looking for the line : xmlSaveFormatFileEnc("yp.xml", doc, encoding, 
32 1);  You could alternatively create a wrapper script that chdirs to the 
33 webroot of dir.xiph.org, then runs yp_cachegen.  Your choice.
35 In all 3 cases, the db connection info is specified in the source code 
36 itself, and is set to connect to database "oddsock", using username 
37 "oddsock" with NO password.  This has the nice effect of not having to make 
38 sure the password to the DB is not committed to SVN.
41 Recreating the DB :
43 In some cases (on MF) the Mysql DB would get horribly corrupted and the yp 
44 database needed to be completly rebuilt.  I have a simple SQL script 
45 (icecast2yp/sql/reset_db.sql) that can be run like :
47 % mysql -uoddsock < icecast2yp/sql/reset_db.sql
49 This will drop and recreate all the tables in the DB, which will usually 
50 clear up any corruption issues.  All the icecast servers are configured to 
51 automatically relist in the case that you rip out their listing from 
52 underneath them.
54 You can also use this to create the database schema on a fresh install.
56 In general, with the 3 cronjobs running, the YP pretty much runs without 
57 any intervention....It's run for months on end without a single activity on 
58 my part.  And the only things I've had to do maintenance-wise is 
59 occasionally run the "reset_db.sql" SQL when Mysql would corrupt the 
60 datafiles... ;)