Advertisement
Guest User

Untitled

a guest
Nov 17th, 2016
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. This installation instrucion describes how to install Tryton Server and Client from scratch for development purposes.
  2.  
  3. #. Create virtualenv with virtualenvwrapper::
  4.  
  5. mkvirtualenv -p /usr/bin/python2.7 trytond
  6.  
  7. #. Install Tryton Server::
  8.  
  9. pip install trytond==4.0.4
  10.  
  11. #. Install optional dependencies::
  12.  
  13. pip install psycopg2==2.6.2
  14.  
  15. #. Create PostgreSQL database::
  16.  
  17. sudo -u postgres psql << EOF
  18. CREATE USER tryton WITH SUPERUSER UNENCRYPTED PASSWORD 'tryton';
  19. CREATE DATABASE tryton OWNER tryton TEMPLATE=template0 ENCODING='utf-8' LC_COLLATE='en_US.UTF-8' LC_CTYPE='en_US.UTF-8';
  20. EOF
  21.  
  22. #. Create configurationo file for Tryton Server::
  23.  
  24. cat << EOF > ./tryton.conf
  25. [web]
  26. listen=127.0.0.1:8000
  27.  
  28. [database]
  29. # uri = database://username:password@host:port/
  30. uri=postgresql://tryton:tryton@127.0.0.1:5432/tryton
  31.  
  32. [jsonrpc]
  33. # Settings for the JSON-RPC network interface
  34. listen=127.0.0.1:8000
  35. data=/tryton/sao
  36. EOF
  37.  
  38. #. Initialize database and update all installed modules::
  39.  
  40. # TODO(dmu) LOW: Why should I have `-d tryton` option although database name is already configured in ./tryton.conf ?
  41. trytond-admin -c ./tryton.conf -v -d tryton --all
  42. # Type admin password when prompted
  43. # TODO(dmu) LOW: Use TRYTONPASSFILE to avoid typing password?
  44.  
  45. #. Run server in development mode::
  46.  
  47. trytond -c ./tryton.conf -v -d tryton --dev
  48.  
  49. #. Create virtualenv with virtualenvwrapper::
  50.  
  51. mkvirtualenv -p /usr/bin/python2.7 tryton-client
  52.  
  53. #. Install Tryton Client::
  54.  
  55. pip install tryton==4.0.4
  56.  
  57. #. Fix pygtk installation for virtualenv::
  58.  
  59. pushd $(dirname `which python`)/../lib/python2.7/site-packages
  60. ln -s /usr/lib/python2.7/dist-packages/pygtk.py
  61. ln -s /usr/lib/python2.7/dist-packages/pygtk.pth
  62. ln -s /usr/lib/python2.7/dist-packages/gtk-2.0/
  63. ln -s /usr/lib/python2.7/dist-packages/gobject/
  64. ln -s /usr/lib/python2.7/dist-packages/glib/
  65. ln -s /usr/lib/python2.7/dist-packages/cairo/
  66. popd
  67.  
  68. #. Run Tryton Client::
  69.  
  70. tryton
  71. # Host: 127.0.0.1:8000
  72. # Database: tryton
  73. # User name: admin
  74. # Password: admin
  75.  
  76. #. [Optional] Install simple module for testing installation::
  77.  
  78. workon trytond
  79. pip install trytond_party
  80. trytond-admin -c ./tryton.conf -v -d tryton --all
  81. # Restart Tryton Server:
  82. trytond -c ./tryton.conf -v -d tryton --dev
  83. # Restart Tryton Client
  84. tryton
  85. # 1. In Tryton Client open by double click: Administration -> Modules -> Modules
  86. # 2. Click at "Mark for installation" for "party" module
  87. # 3. In tool bar click "Launch action" -> "Perform Pending Installation/Upgrade"
  88. # 4. Click "Start Upgrade"
  89. # 5. Wait until upgrad finishes and click "OK"
  90. # 6. Cancel all wizards
  91. # 7. Find "Part" item in the left bar above "Administration" item
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement