Changeset 1081 in main


Ignore:
Timestamp:
05/04/12 14:46:25 (7 years ago)
Author:
alefebvre
Message:

docs: add new doc How To install openPLM from openPLM-1.0.tar.gz

Location:
trunk/docs/admin
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/admin/ht_1_install_server.rst

    r1066 r1081  
    1111This HowTo is based on: 
    1212 
    13     * Ubuntu 10.04 LTS server edition (also tested on Debian Squeeze) 
    14     * Apache Server version: Apache/2.2.14 (Ubuntu) 
    15     * PostgreSQL 8.4.4 
    16     * Python 2.6.X 
    17     * Django 1.2.X 
    18     * Celery 2.3.X 
    19     * Haystack 1.2.X 
    20     * Xapian 1.2.X 
    21     * Lepl 5.0 
     13    * Ubuntu 12.04 LTS server edition 
     14    * Apache Server version: Apache/2.2.22 (Ubuntu) 
     15    * PostgreSQL 9.1 
     16    * Python 2.7.3 
     17    * Django 1.3.1 
     18    * Celery 2.4.6 
     19    * Haystack 1.2.7 
     20    * Xapian 1.2.8 
     21    * Lepl 5.1.1 
    2222    * South 0.7.3 
    2323  
     
    3737    #. ``apt-get install apache2 libapache2-mod-wsgi`` 
    3838    #. ``apt-get install python-pip python-dev python-imaging python-kjbuckets python-pypdf ipython`` 
    39     #. ``pip install odfpy`` 
    40     #. ``apt-get install graphviz graphviz-dev`` 
    41     #. ``pip install 'pygraphviz>=1.1'`` 
    42     #. ``apt-get install python-xapian rabbitmq-server`` 
    43     #. ``apt-get install python-django python-docutils`` 
    44     #. ``pip install 'south>=0.7'`` 
    45     #. ``pip install celery`` 
    46     #. ``pip install django-celery`` 
    47     #. ``pip install 'django-haystack<2'`` 
     39    #. ``apt-get install graphviz graphviz-dev python-pygraphviz`` 
     40    #. ``apt-get install python-xapian rabbitmq-server python-django python-docutils`` 
     41    #. ``apt-get install python-django-celery python-django-south python-pisa`` 
    4842    #. ``apt-get install postgresql python-psycopg2`` 
    49     #. ``pip install lepl`` 
    50     #. ``apt-get install python-pisa`` 
     43    #. ``pip install odfpy 'django-haystack<2' lepl`` 
     44    #. ``pip install --upgrade docutils`` 
    5145 
    5246To enable plain text search on files, you need to install the following 
     
    5650    #. ``pip install openxmllib`` 
    5751 
    58 Get code using Subversion 
    59 ========================== 
    60  
    61     * ``apt-get install subversion`` 
    62      
    63     * ``mkdir /var/django`` 
     52Get the tarball containing the code 
     53=================================== 
     54 
     55    * ``wget -O openplm-1.0.tar.gz http://wiki.openplm.org/trac/downloads/3`` 
     56 
     57Extract the code in /var and rename the directory to django 
     58 
     59    * ``tar xzf openplm-1.0.tar.gz /var/`` 
     60     
     61    * ``mv /var/openplm /var/django`` 
    6462     
    6563All files used for a new django site will be stored in this directory. 
    6664     
    67     * ``cd /var/django`` 
    68      
    69     * ``svn co svn://openplm.org/openPLM`` 
    70      
    71 The directory ./openPLM is created and all codes are downloaded. 
    72      
    7365    * ``cd /var/django/openPLM`` 
     66 
     67Configure a valid PATH 
     68====================== 
     69 
     70The files are configured to work after a svn checkout, so you need to change a 
     71few PATH (basically, you need to delete the **trunk/openPLM/** part). Grab your favorite editor and change the followings files : 
     72 
     73    * ``settings.py`` change **MEDIA_ROOT** and **TEMPLATE_DIRS** : 
     74 
     75        .. code-block:: python 
     76 
     77            MEDIA_ROOT = '/var/django/openPLM/media/' 
     78            ... 
     79            TEMPLATE_DIRS = (  
     80                # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". 
     81                # Always use forward slashes, even on Windows. 
     82                # Don't forget to use absolute paths, not relative paths. 
     83                "/var/django/openPLM/templates", 
     84            ) 
     85 
     86   * ``apache/django.wsgi`` change the three **sys.path.append** 
     87 
     88        .. code-block:: python 
     89 
     90                sys.path.append('/var/django/') 
     91                sys.path.append('/var/django/openPLM') 
     92                ... 
     93                sys.path.append('/var/django/%s' % app.replace("openplm.", "openPLM/")) 
     94 
     95   * ``etc/default/celeryd`` change **CELERYD_CHDIR** 
     96 
     97        ::  
     98                CELERYD_CHDIR="/var/django/openPLM" 
     99 
    74100 
    75101 
     
    79105    * ``mkdir /var/postgres`` 
    80106    * ``chown postgres:postgres /var/postgres/`` 
    81     * ``find / -name initdb`` :: 
    82      
    83         /usr/lib/postgresql/8.4/bin/initdb 
    84          
    85107    * ``locale-gen fr_FR.UTF-8`` 
    86108      (replace ``fr_FR.UTF-8`` with your locale)  
    87109    * ``su postgres`` 
    88     * ``/usr/lib/postgresql/8.4/bin/initdb --encoding=UTF-8 --locale=fr_FR.UTF-8 --pgdata=/var/postgres/`` 
    89     * ``/usr/lib/postgresql/8.4/bin/postgres -D /var/postgres &`` 
     110    * ``export PATH=/usr/lib/postgresql/9.1/bin:$PATH`` 
     111    .. note:: You'll have to change the path according to your postgresql version number 
     112    * ``initdb --encoding=UTF-8 --locale=fr_FR.UTF-8 --pgdata=/var/postgres/`` 
     113    * ``postgres -D /var/postgres &`` 
    90114      (it is not a problem if postgres is already running, you do not have to restart it) 
    91115    * ``psql``: 
     
    102126===================== 
    103127 
    104     * ``cd /var/django/openPLM/trunk/openPLM/`` 
    105128    * ``python bin/change_secret_key.py`` 
     129    .. note:: Most commands supposed that you are in /var/django/openPLM and 
     130              you should be if you are following this how to. If a command doesn't work, 
     131              check your working directory and change back to /var/django/openPLM if 
     132              needed 
    106133 
    107134Create the database 
    108135=================== 
    109136 
    110 Edit the file :file:`/var/django/openPLM/trunk/openPLM/settings.py`  
     137Edit the file :file:`/var/django/openPLM/settings.py`  
    111138and set the database password ('MyPassword') 
    112139It must be the one set with the command ``create role django with password 'MyPassword' login;`` 
     
    136163Then execute the following commands: 
    137164 
    138     * ``cd /var/django/openPLM/trunk/openPLM/`` 
    139165    * ``./manage.py syncdb --all`` 
    140166    * ``./manage.py migrate --all --fake`` 
     
    169195Change rights for the directory where thumbnails will be stored: 
    170196     
    171     * ``chown www-data:www-data /var/django/openPLM/trunk/openPLM/media/thumbnails`` 
     197    * ``chown www-data:www-data /var/django/openPLM/media/thumbnails`` 
    172198  
    173199.. _search-engine: 
     
    219245:command:`celeryd`, celery's daemon must be run. openPLM ships with an init script: 
    220246 
    221     * ``cp /var/django/openPLM/trunk/openPLM/etc/init.d/celeryd /etc/init.d/celeryd`` 
    222     * ``cp /var/django/openPLM/trunk/openPLM/etc/default/celeryd /etc/default/celeryd`` 
     247    * ``cp /var/django/openPLM/etc/init.d/celeryd /etc/init.d/celeryd`` 
     248    * ``cp /var/django/openPLM/etc/default/celeryd /etc/default/celeryd`` 
    223249    * ``chmod +x /etc/init.d/celeryd`` 
    224     * ``mkdir /var/log/celery`` 
    225     * ``mkdir /var/run/celery`` 
    226     * ``chown www-data:www-data /var/log/celery /var/run/celery`` 
     250    * ``mkdir /var/{log,run}/celery`` 
     251    * ``chown www-data:www-data /var/{log,run}/celery`` 
    227252 
    228253To launch :command:`celeryd`, run ``/etc/init.d/celeryd start``. 
     
    234259    * ``./bin/check_modules.py`` :: 
    235260     
    236         /usr/local/lib/python2.6/dist-packages/pyPdf-1.12-py2.6.egg/pyPdf/pdf.py:52: DeprecationWarning: the sets module is deprecated 
    237         from sets import ImmutableSet 
    238261        All is ok 
    239262 
     
    246269.. code-block:: apache 
    247270 
    248     WSGIScriptAlias / /var/django/openPLM/trunk/openPLM/apache/django.wsgi 
    249     Alias /media /var/django/openPLM/trunk/openPLM/media 
    250     <Directory /var/django/openPLM/trunk/openPLM/media> 
     271    WSGIScriptAlias / /var/django/openPLM/apache/django.wsgi 
     272    Alias /media /var/django/openPLM/media 
     273    <Directory /var/django/openPLM/media> 
    251274        Order deny,allow 
    252275        Allow from all 
     
    312335    <VirtualHost *:80> 
    313336 
    314         WSGIScriptAlias / /var/django/openPLM/trunk/openPLM/apache/django.wsgi 
     337        WSGIScriptAlias / /var/django/openPLM/apache/django.wsgi 
    315338        <Location "/admin"> 
    316339            RewriteEngine On 
     
    332355        SSLVerifyClient none 
    333356 
    334         WSGIScriptAlias / /var/django/openPLM/trunk/openPLM/apache/django.wsgi 
    335         Alias /media /var/django/openPLM/trunk/openPLM/media 
    336         <Directory /var/django/openPLM/trunk/openPLM/media> 
     357        WSGIScriptAlias / /var/django/openPLM/apache/django.wsgi 
     358        Alias /media /var/django/openPLM/media 
     359        <Directory /var/django/openPLM/media> 
    337360            Order deny,allow 
    338361            Allow from all 
     
    364387To fix this link, run the following command: 
    365388``ln -s `python -c 'import django; print django.__path__[0]'`/contrib/admin/media 
    366 /var/django/openPLM/trunk/openPLM/media/admin`` 
     389/var/django/openPLM/media/admin`` 
    367390 
    368391 
Note: See TracChangeset for help on using the changeset viewer.