source: INSTALL.rst @ 571bd79

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

fix more urls, add install infos

  • Property mode set to 100644
File size: 7.5 KB
Line 
1==================
2Telemeta - INSTALL
3==================
4
5-----------------
60. Requirements
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-----------------------
161. Install 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--------------------------
902. Create 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-----------------------------------------
1003. Create 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----------------------------------
1134. Configure 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   
170    TELEMETA_OAI_HOST =             the default host name to provide dublin core identifier through the OAI data provider
171    TELEMETA_OAI_REPOSITORY_NAME =  the description of the OAI data provider
172   
173Just paste the lines below::
174
175    LOGIN_URL = '/login'
176    LOGIN_REDIRECT_URL = '/'
177    AUTH_PROFILE_MODULE = 'telemeta.userprofile'
178    TELEMETA_EXPORT_CACHE_DIR = TELEMETA_CACHE_DIR + "/export"
179    TELEMETA_DATA_CACHE_DIR = TELEMETA_CACHE_DIR + "/data"
180    CACHE_BACKEND = "file://" + TELEMETA_CACHE_DIR + "/data"
181
182If you want some personal templates, for example::
183   
184    TEMPLATE_DIRS = (
185    '/home/dev/telemeta/sandboxes/sandbox_generic/templates/',
186    )
187
188
189You can find an example for settings.py there::
190   
191    conf/examples/django/settings.py
192
193
194--------------------------
1955. Initialize the database
196--------------------------
197
198This synchronizes the DB with the model::
199
200    python manage.py syncdb
201
202
203----------------------
2046. Configure your urls
205----------------------
206
207Add this dictionary to get Javascript translation::
208   
209    js_info_dict = {
210        'packages': ('telemeta',),
211    }
212
213The simplest case is to have telemeta running at public root. To do so, add this url in urls.py::
214
215    # Telemeta
216    (r'^', include('telemeta.urls')),
217   
218    # Languages
219    (r'^i18n/', include('django.conf.urls.i18n')),   
220    (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
221   
222You should also bring the django admin::
223   
224    (r'^admin/django/', include(admin.site.urls)),
225   
226Please also uncomment::
227   
228    from django.contrib import admin
229    admin.autodiscover()
230
231You can find an example for url.py there::
232   
233    conf/examples/django/urls.py
234
235
236--------------------
2377. Start the project
238--------------------
239
240We are ready to start the telemeta server::
241
242    python manage.py runserver
243
244By default, the server starts on the port 8000. You can override this with, for example::
245
246    python manage.py runserver 9000
247
248
249-----------
2508. Test it
251-----------
252
253Go to this URL with your browser::
254
255    http://localhost:8000
256
257or::
258
259    http://localhost:9000
260
261Test it and enjoy it !
262
263
264--------------------------
2659. Deploy it with Apache
266--------------------------
267
268If you want to use Telemeta through a web server, it is highly recommended to use Apache 2
269with the mod_wsgi module as explained in the following page :
270
271    http://docs.djangoproject.com/en/1.1/howto/deployment/modwsgi/#howto-deployment-modwsgi
272
273This will prevent Apache to put some audio data in the cache memory as it is usually the case with mod_python.
274
275You can find an example of an Apache2 VirtualHost conf file there::
276
277    conf/examples/apache2/telemeta.conf
278
279
280-------------------------
28110. Contact / More infos
282-------------------------
283
284See README and http://telemeta.org.
285
Note: See TracBrowser for help on using the repository browser.