source: INSTALL.rst @ 06ce8dd

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

fix infos

  • Property mode set to 100644
File size: 8.3 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 database
112------------------------
113
114Telemeta needs MySQL to work well and fast. So you need to create a MySQL database before trying it.
115
116
117Configure the telemeta project
118----------------------------------
119
120Edit the file settings.py in a text editor.
121Modifiy the following variables::
122
123    ADMINS =            telemeta requires that you indicate an administrator here
124    DATABASES =         your database setting dict (don't forget to create the database if needed)
125    MEDIA_ROOT =        absolute path to the media directory you just created
126
127Set the app lists as follow::
128
129    INSTALLED_APPS = (
130    'django.contrib.auth',
131    'django.contrib.contenttypes',
132    'django.contrib.sessions',
133    'django.contrib.sites',
134    'django.contrib.messages',
135    'django.contrib.admin',
136    'telemeta',
137    'jsonrpc',
138    )
139
140Set the following languages::
141
142    LANGUAGES = [ ('fr', 'French'),
143                  ('en', 'English'),
144    ]
145
146
147Set the following Middlewares::
148
149    MIDDLEWARE_CLASSES = (
150        'django.middleware.common.CommonMiddleware',
151        'django.contrib.sessions.middleware.SessionMiddleware',
152        'django.middleware.csrf.CsrfViewMiddleware',
153        'django.contrib.auth.middleware.AuthenticationMiddleware',
154        'django.contrib.messages.middleware.MessageMiddleware',
155        'django.middleware.locale.LocaleMiddleware',
156    )
157
158Add the following variables::
159
160    TEMPLATE_CONTEXT_PROCESSORS = (
161        'django.core.context_processors.request',
162        'django.contrib.auth.context_processors.auth',)
163
164    TELEMETA_ORGANIZATION =         name of the organization which hosts this installation
165    TELEMETA_SUBJECTS =             tuple of subject keywords (used for Dublin Core), such as "Ethnology", etc...
166    TELEMETA_DESCRIPTION =          the description of the site
167    TELEMETA_CACHE_DIR =            absolute path to the cache directory that you just created
168    TELEMETA_GMAP_KEY =             your Google Map API key
169    TELEMETA_DOWNLOAD_ENABLED =     True to enable raw audio data download
170    TELEMETA_STREAMING_FORMATS =    tuple of authoized streaming formats. Ex : ('mp3', 'ogg')
171    TELEMETA_PUBLIC_ACCESS_PERIOD = number of years above which item files are automagically published
172    EMAIL_HOST =                    your default SMTP server
173    DEFAULT_FROM_EMAIL =            the default sending email address
174
175Just paste the lines below::
176
177    LOGIN_URL = '/login'
178    LOGIN_REDIRECT_URL = '/'
179    AUTH_PROFILE_MODULE = 'telemeta.userprofile'
180    TELEMETA_EXPORT_CACHE_DIR = TELEMETA_CACHE_DIR + "/export"
181    TELEMETA_DATA_CACHE_DIR = TELEMETA_CACHE_DIR + "/data"
182    CACHE_BACKEND = "file://" + TELEMETA_CACHE_DIR + "/data"
183
184If you want some personal templates, for example::
185
186    TEMPLATE_DIRS = (
187    '/home/dev/telemeta/sandboxes/sandbox_generic/templates/',
188    )
189
190You can find an example for settings.py there::
191
192    example/sandbox/settings.py
193
194
195Initialize the database
196--------------------------
197
198This synchronizes the DB with the model::
199
200    python manage.py syncdb
201
202
203Configure your urls
204----------------------
205
206Add this dictionary to get Javascript translation::
207
208    js_info_dict = {
209        'packages': ('telemeta',),
210    }
211
212The simplest case is to have telemeta running at public root. To do so, add this url in urls.py::
213
214    # Telemeta
215    (r'^', include('telemeta.urls')),
216
217    # Languages
218    (r'^i18n/', include('django.conf.urls.i18n')),
219    (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
220
221You should also bring the django admin::
222
223    (r'^admin/django/', include(admin.site.urls)),
224
225Please also uncomment::
226
227    from django.contrib import admin
228    admin.autodiscover()
229
230You can find an example for url.py there::
231
232    example/sandbox/urls.py
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
246To get it on your network interface::
247
248    python manage.py runserver 192.168.0.10:9000
249
250
251Test it
252-----------
253
254Go to this URL with your browser::
255
256    http://localhost:8000
257
258or::
259
260    http://localhost:9000
261
262or::
263
264    http://192.168.0.10:9000
265
266
267Configure the site domain name in admin > general admin > sites
268
269Test it and enjoy it !
270
271
272--------------------------
273Template customization
274--------------------------
275
276Please see ::
277
278    http://telemeta.org/wiki/InterfaceCustomization
279
280
281--------------------------
282Deploy it with Apache 2
283--------------------------
284
285If you want to use Telemeta through a web server, it is highly recommended to use Apache 2
286with the mod_wsgi module as explained in the following page ::
287
288    http://docs.djangoproject.com/en/1.1/howto/deployment/modwsgi/#howto-deployment-modwsgi
289
290This will prevent Apache to put some audio data in the cache memory as it is usually the case with mod_python.
291
292You can find an example of an Apache2 VirtualHost conf file there::
293
294    example/apache2/telemeta.conf
295
296
297-------------------------
298IP based authorization
299-------------------------
300
301It is possible to login automatically an IP range of machines to Telemeta thanks to the django-ipauth module::
302
303    sudo pip install django-ipauth
304
305See http://pypi.python.org/pypi/django-ipauth/ for setup.
306
307
308-------------------------
309Contact / More infos
310-------------------------
311
312See README.rst and http://telemeta.org.
313
Note: See TracBrowser for help on using the repository browser.