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