source: INSTALL.rst @ d706933

cremcrem2crem3devdev2diademsdj1.6feature/breadcrumbsfeature/ts-0.5feature/ts-0.5.4feature/writecacheformagenericinstru_searchlamlam2mapsv3mergenlivemultiproductionrelease/1.4.4sabiodsearchsecurityserversocialstoragetelecastertestvideo
Last change on this file since d706933 was d706933, checked in by yomguy <yomguy@…>, 3 years ago

cleanup, fix doc, fix a CSS bug

  • Property mode set to 100644
File size: 7.6 KB
Line 
1==================
2Telemeta - INSTALL
3==================
4
5-----------------
6Requirements
7-----------------
8
9Telemeta is designed to run on Linux and other UNIX based architectures.
10It depends on several python librairies like Django (version >= 1.1.1).
11See http://djangoproject.com.
12
13Other needed librairies are listed below.
14
15-----------------------
16Install the software
17-----------------------
18
19Install 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-django python-xml python-mysqldb mysql-server \
27                              python-ctypes python-setuptools python-support python-docutils \
28                              python-libxml2 python-django-registration
29
30    To get MP3 reading and writing, just add these lines to your /etc/apt/sources-list::
31
32        deb http://www.debian-multimedia.org stable main
33
34    Then::
35
36        sudo apt-get update
37        sudo aptitude install gstreamer0.10-fluendo-mp3 gstreamer0.10-lame
38
39* On other linux platforms:
40
41    Please install all dependencies thanks to your application manager.
42
43
44Install TimeSide
45-----------------
46
47Telemeta needs the audio processing library named TimeSide (>= 0.3)
48You have to download and install it from source.
49
50So, download the last archive at :
51http://code.google.com/p/timeside/downloads/list
52
53Uncompress it and see README and INSTALL to install the dependencies
54and then the module.
55
56
57Install JSON-RPC server
58------------------------
59
60In order to use markers on the player, you will need a JSON-RPC server for django::
61   
62    git clone git://github.com/samuraisam/django-json-rpc.git
63    cd django-json-rpc
64    python setup.py install
65
66
67Install Telemeta
68------------------
69
70* On Debian style systems, if you have added our repositories::
71
72    sudo apt-get install telemeta
73
74* Else:
75
76    Download the latest release of telemeta at
77    http://telemeta.org
78
79    Uncompress the archive like::
80
81        tar xzvf telemeta_0.9.6.tar.gz
82
83    Go to the main folder of telemeta and run this command
84    in a shell as root::
85
86        sudo python setup.py install
87
88
89--------------------------
90Create a Django project
91--------------------------
92
93If you haven't already done it, start a new django project::
94
95    cd ~/my_projects
96    django-admin startproject mysite
97
98
99-----------------------------------------
100Create the media and cache directories
101-----------------------------------------
102
103We need 2 directories for media and caching::
104
105    cd mysite
106    mkdir media cache cache/data cache/export
107
108
109You might want to place these data directories somewhere else, no pb.
110
111
112----------------------------------
113Configure the telemeta project
114----------------------------------
115
116Edit the file settings.py in a text editor.
117Modifiy the following variables:
118
119    ADMINS =            telemeta requires that you indicate an administrator here
120    DATABASES =         your database setting dict (don't forget to create the database if needed)
121    MEDIA_ROOT =        absolute path to the media directory you just created
122
123Set the app lists as follow::
124   
125    INSTALLED_APPS = (
126    'django.contrib.auth',
127    'django.contrib.contenttypes',
128    'django.contrib.sessions',
129    'django.contrib.sites',
130    'django.contrib.messages',
131    'django.contrib.admin',
132    'telemeta',
133    'jsonrpc',
134    )
135
136Set the following languages:
137   
138    LANGUAGES = [ ('fr', 'French'),
139                  ('en', 'English'),
140    ]
141
142
143Set the following Middlewares:
144   
145    MIDDLEWARE_CLASSES = (
146        'django.middleware.common.CommonMiddleware',
147        'django.contrib.sessions.middleware.SessionMiddleware',
148        'django.middleware.csrf.CsrfViewMiddleware',
149        'django.contrib.auth.middleware.AuthenticationMiddleware',
150        'django.contrib.messages.middleware.MessageMiddleware',
151        'django.middleware.locale.LocaleMiddleware',
152    )
153
154Add the following variables:
155   
156    TEMPLATE_CONTEXT_PROCESSORS = (
157        'django.core.context_processors.request',
158        'django.contrib.auth.context_processors.auth',)
159
160    TELEMETA_ORGANIZATION =         name of the organization which hosts this installation
161    TELEMETA_SUBJECTS =             tuple of subject keywords (used for Dublin Core), such as "Ethnology", etc...
162    TELEMETA_CACHE_DIR =            absolute path to the cache directory that you just created
163    TELEMETA_GMAP_KEY =             your Google Map API key
164    TELEMETA_DOWNLOAD_ENABLED =     True to enable raw audio data download
165    TELEMETA_STREAMING_FORMATS =    tuple of authoized streaming formats. Ex : ('mp3', 'ogg')
166    TELEMETA_PUBLIC_ACCESS_PERIOD = number of years above which item files are automagically published
167    EMAIL_HOST =                    your default SMTP server
168    DEFAULT_FROM_EMAIL =            the default sending email address
169    TELEMETA_OAI_REPOSITORY_NAME =  the description of the OAI data provider
170   
171Just paste the lines below::
172
173    LOGIN_URL = '/login'
174    LOGIN_REDIRECT_URL = '/'
175    AUTH_PROFILE_MODULE = 'telemeta.userprofile'
176    TELEMETA_EXPORT_CACHE_DIR = TELEMETA_CACHE_DIR + "/export"
177    TELEMETA_DATA_CACHE_DIR = TELEMETA_CACHE_DIR + "/data"
178    CACHE_BACKEND = "file://" + TELEMETA_CACHE_DIR + "/data"
179
180If you want some personal templates, for example::
181   
182    TEMPLATE_DIRS = (
183    '/home/dev/telemeta/sandboxes/sandbox_generic/templates/',
184    )
185
186
187You can find an example for settings.py there::
188   
189    conf/examples/django/settings.py
190
191
192--------------------------
193Initialize the database
194--------------------------
195
196This synchronizes the DB with the model::
197
198    python manage.py syncdb
199
200
201----------------------
202Configure your urls
203----------------------
204
205Add this dictionary to get Javascript translation::
206   
207    js_info_dict = {
208        'packages': ('telemeta',),
209    }
210
211The simplest case is to have telemeta running at public root. To do so, add this url in urls.py::
212
213    # Telemeta
214    (r'^', include('telemeta.urls')),
215   
216    # Languages
217    (r'^i18n/', include('django.conf.urls.i18n')),   
218    (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
219   
220You should also bring the django admin::
221   
222    (r'^admin/django/', include(admin.site.urls)),
223   
224Please also uncomment::
225   
226    from django.contrib import admin
227    admin.autodiscover()
228
229You can find an example for url.py there::
230   
231    conf/examples/django/urls.py
232
233
234--------------------
235Start the project
236--------------------
237
238We are ready to start the telemeta server::
239
240    python manage.py runserver
241
242By default, the server starts on the port 8000. You can override this with, for example::
243
244    python manage.py runserver 9000
245
246
247-----------
248Test it
249-----------
250
251Go to this URL with your browser::
252
253    http://localhost:8000
254
255or::
256
257    http://localhost:9000
258
259
260Configure the site domain name in admin > general admin > sites
261
262Test it and enjoy it !
263
264--------------------------
265Template customization
266--------------------------
267
268Please see ::
269   
270    http://telemeta.org/wiki/InterfaceCustomization
271   
272   
273--------------------------
274Deploy it with Apache 2
275--------------------------
276
277If you want to use Telemeta through a web server, it is highly recommended to use Apache 2
278with the mod_wsgi module as explained in the following page :
279
280    http://docs.djangoproject.com/en/1.1/howto/deployment/modwsgi/#howto-deployment-modwsgi
281
282This will prevent Apache to put some audio data in the cache memory as it is usually the case with mod_python.
283
284You can find an example of an Apache2 VirtualHost conf file there::
285
286    example/apache2/telemeta.conf
287
288
289-------------------------
290Contact / More infos
291-------------------------
292
293See README and http://telemeta.org.
294
Note: See TracBrowser for help on using the repository browser.