| 1 | ================== |
|---|
| 2 | Telemeta - INSTALL |
|---|
| 3 | ================== |
|---|
| 4 | |
|---|
| 5 | Requirements |
|---|
| 6 | ============ |
|---|
| 7 | |
|---|
| 8 | Telemeta is designed to run on Linux and other UNIX based architectures. |
|---|
| 9 | The following third party applications or libraries are required: |
|---|
| 10 | |
|---|
| 11 | :dependencies: python (>= 2.3.5-7), python-xml, python-mutagen, python-django (>= 1.0-1), |
|---|
| 12 | python-imaging (>= 1.1.6), sox (>= 14.2), vorbis-tools, flac, normalize-audio, |
|---|
| 13 | python-mysqldb, mysql-server, python-timeside (>= 0.2), python-numpy, python-scipy |
|---|
| 14 | python-ctypes (>= 1.0.1), python-setuptools (>= 0.6b3), |
|---|
| 15 | python-support (>= 0.3), python-docutils (>= 0.5) |
|---|
| 16 | |
|---|
| 17 | :optional: ecasound, festival, par2 |
|---|
| 18 | |
|---|
| 19 | Here, package names are taken from the Debian OS and could be different on other platforms. |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | Install |
|---|
| 23 | ======= |
|---|
| 24 | |
|---|
| 25 | ----------------------- |
|---|
| 26 | 1. Install the software |
|---|
| 27 | ----------------------- |
|---|
| 28 | |
|---|
| 29 | 1.1 Install Telemeta |
|---|
| 30 | -------------------- |
|---|
| 31 | |
|---|
| 32 | * On Debian (Testing recommended) or Ubuntu Hoary |
|---|
| 33 | |
|---|
| 34 | Just add these lines to your /etc/apt/sources-list:: |
|---|
| 35 | |
|---|
| 36 | deb http://debian.parisson.org/ binary/ |
|---|
| 37 | deb-src http://debian.parisson.org/ source/ |
|---|
| 38 | deb http://www.debian-multimedia.org etch main |
|---|
| 39 | |
|---|
| 40 | Then:: |
|---|
| 41 | |
|---|
| 42 | $ sudo apt-get update |
|---|
| 43 | $ sudo apt-get install telemeta |
|---|
| 44 | |
|---|
| 45 | This method provides the installation of all needed packages |
|---|
| 46 | thanks to the Debian dependency system. |
|---|
| 47 | Go to 1.2. |
|---|
| 48 | |
|---|
| 49 | * On other linux platforms |
|---|
| 50 | |
|---|
| 51 | Install all dependencies. |
|---|
| 52 | |
|---|
| 53 | Download the latest release of telemeta at |
|---|
| 54 | http://telemeta.org |
|---|
| 55 | |
|---|
| 56 | Uncompress the archive like:: |
|---|
| 57 | |
|---|
| 58 | $ tar xzvf telemeta_0.3.2.tar.gz |
|---|
| 59 | |
|---|
| 60 | Go to the main folder of telemeta and run this command |
|---|
| 61 | in a shell as root:: |
|---|
| 62 | |
|---|
| 63 | $ sudo python setup.py install |
|---|
| 64 | |
|---|
| 65 | |
|---|
| 66 | 1.2. Install TimeSide |
|---|
| 67 | --------------------- |
|---|
| 68 | |
|---|
| 69 | In order to get all the Web Audio Components from TimeSide, |
|---|
| 70 | you have to download and install it from source. |
|---|
| 71 | |
|---|
| 72 | So, checkout the last archives at : |
|---|
| 73 | http://code.google.com/p/timeside/downloads/list |
|---|
| 74 | |
|---|
| 75 | Install it like in the following example:: |
|---|
| 76 | |
|---|
| 77 | $ tar xzf timeside-0.2.tar.gz |
|---|
| 78 | $ cd timeside-0.2 |
|---|
| 79 | |
|---|
| 80 | Read the README and INSTALL file, install dependencies and then:: |
|---|
| 81 | |
|---|
| 82 | $ sudo python setup.py install |
|---|
| 83 | |
|---|
| 84 | |
|---|
| 85 | 1.3. Install the Django framework version 1.0 |
|---|
| 86 | --------------------------------------------- |
|---|
| 87 | |
|---|
| 88 | * On Debian (Lenny recommended) or Ubuntu Hoary:: |
|---|
| 89 | |
|---|
| 90 | $ sudo apt-get install python-django |
|---|
| 91 | |
|---|
| 92 | * On other linux platforms, download and install it from: |
|---|
| 93 | |
|---|
| 94 | http://www.djangoproject.com/download/ |
|---|
| 95 | |
|---|
| 96 | |
|---|
| 97 | -------------------------- |
|---|
| 98 | 2. Create a Django project |
|---|
| 99 | -------------------------- |
|---|
| 100 | |
|---|
| 101 | If you haven't already done it, start a new django project:: |
|---|
| 102 | |
|---|
| 103 | $ cd ~/my_projects |
|---|
| 104 | $ django-admin startproject mysite |
|---|
| 105 | |
|---|
| 106 | |
|---|
| 107 | ----------------------------------------- |
|---|
| 108 | 3. Create the media and cache directories |
|---|
| 109 | ----------------------------------------- |
|---|
| 110 | |
|---|
| 111 | We need 2 directories for media and caching:: |
|---|
| 112 | |
|---|
| 113 | $ cd mysite |
|---|
| 114 | $ mkdir media cache |
|---|
| 115 | |
|---|
| 116 | You might want to place these somewhere else... |
|---|
| 117 | |
|---|
| 118 | |
|---|
| 119 | ---------------------------------- |
|---|
| 120 | 4. Configure the telemeta project |
|---|
| 121 | ---------------------------------- |
|---|
| 122 | |
|---|
| 123 | Edit the file settings.py in a text editor. |
|---|
| 124 | Modifiy the following variables: |
|---|
| 125 | |
|---|
| 126 | :ADMINS: telemeta requires that you indicate an administrator here |
|---|
| 127 | :DATABASE_*: your database settings (don't forget to create the database if needed) |
|---|
| 128 | :MEDIA_ROOT: absolute path to the media directory you just created |
|---|
| 129 | :INSTALLED_APPS: add 'telemeta' |
|---|
| 130 | :TEMPLATE_CONTEXT_PROCESSORS: include 'django.core.context_processors.request' and |
|---|
| 131 | 'django.core.context_processors.auth' in this tuple |
|---|
| 132 | |
|---|
| 133 | Add the following variables: |
|---|
| 134 | |
|---|
| 135 | :TELEMETA_ORGANIZATION: name of the organization which hosts this installation |
|---|
| 136 | :TELEMETA_SUBJECTS: tuple of subject keywords (used for Dublin Core), such |
|---|
| 137 | as "Ethnology", etc... |
|---|
| 138 | :TELEMETA_CACHE_DIR: absolute path to the cache directory that you just created |
|---|
| 139 | :TELEMETA_GMAP_KEY: your Google Map API key |
|---|
| 140 | :TELEMETA_DOWNLOAD_ENABLED: True to enable audio data download |
|---|
| 141 | |
|---|
| 142 | Just paste the lines below:: |
|---|
| 143 | |
|---|
| 144 | LOGIN_URL = '/login' |
|---|
| 145 | LOGIN_REDIRECT_URL = '/' |
|---|
| 146 | TELEMETA_EXPORT_CACHE_DIR = TELEMETA_CACHE_DIR + "/export" |
|---|
| 147 | TELEMETA_DATA_CACHE_DIR = TELEMETA_CACHE_DIR + "/data" |
|---|
| 148 | CACHE_BACKEND = "file://" + TELEMETA_CACHE_DIR + "/data" |
|---|
| 149 | |
|---|
| 150 | |
|---|
| 151 | -------------------------- |
|---|
| 152 | 5. Initialize the database |
|---|
| 153 | -------------------------- |
|---|
| 154 | |
|---|
| 155 | This synchronizes the DB with the model:: |
|---|
| 156 | |
|---|
| 157 | $ python manage.py syncdb |
|---|
| 158 | |
|---|
| 159 | |
|---|
| 160 | ---------------------- |
|---|
| 161 | 6. Configure your urls |
|---|
| 162 | ---------------------- |
|---|
| 163 | |
|---|
| 164 | The simplest case is to have telemeta running at public root. To do so, add this url in urls.py:: |
|---|
| 165 | |
|---|
| 166 | (r'^', include('telemeta.urls')), |
|---|
| 167 | |
|---|
| 168 | |
|---|
| 169 | -------------------- |
|---|
| 170 | 7. Start the project |
|---|
| 171 | -------------------- |
|---|
| 172 | |
|---|
| 173 | We are ready to start the telemeta server:: |
|---|
| 174 | |
|---|
| 175 | $ python manage.py runserver |
|---|
| 176 | |
|---|
| 177 | By default, the server starts on the port 8000. You can override this with, for example:: |
|---|
| 178 | |
|---|
| 179 | $ python manage.py runserver 9000 |
|---|
| 180 | |
|---|
| 181 | |
|---|
| 182 | ------------------------------------ |
|---|
| 183 | 8. Go the web page with your browser |
|---|
| 184 | ------------------------------------ |
|---|
| 185 | |
|---|
| 186 | http://localhost:8000 |
|---|
| 187 | |
|---|
| 188 | or |
|---|
| 189 | |
|---|
| 190 | http://localhost:9000 |
|---|
| 191 | |
|---|
| 192 | |
|---|
| 193 | See README and http://telemeta.org for more informations. |
|---|
| 194 | |
|---|
| 195 | |
|---|
| 196 | ------------------- |
|---|
| 197 | 9. Configure Apache |
|---|
| 198 | ------------------- |
|---|
| 199 | |
|---|
| 200 | If you want to use Telemeta through a web server, it is highly recommended to use Apache 2 |
|---|
| 201 | with the mod_wsgi module as explained in the following page : |
|---|
| 202 | |
|---|
| 203 | http://docs.djangoproject.com/en/1.1/howto/deployment/modwsgi/#howto-deployment-modwsgi |
|---|
| 204 | |
|---|
| 205 | This will prevent Apache to put some audio data in the cache memory as it is usually the case with mod_python. |
|---|