source: INSTALL.rst @ 5e733ab3

cremcrem2devdev2diademsfeature/breadcrumbsfeature/ts-0.5feature/ts-0.5.4feature/writecacheformagenericinstru_searchlamlam2mapsv3mergenlivemultiproductionrelease/1.4.4sabiodsecurityserversocialstoragetelecastertestvideo
Last change on this file since 5e733ab3 was 5e733ab3, checked in by yomguy <yomguy@…>, 2 years ago

fix install doc and deps

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