jmunsch

tryton docs

Sep 16th, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.96 KB | None | 0 0
  1. # how to install tryton on ubuntu 12.04
  2.  
  3. sudo apt-get install tryton-server tryton-client postgresql postgresql-contrib
  4. sudo ufw allow 5432
  5. sudo service tryton-server restart && sudo service postgresql restart
  6. sudo su - postgres
  7. psql -U postgres
  8. sudo su - postgres -c "createuser --createdb --no-createrole --no-superuser --pwprompt tryton"
  9.  
  10.  
  11. tryton-server for Debian
  12. ========================
  13.  
  14. Setup
  15. =====
  16.  
  17. Preparing the database
  18. ----------------------
  19.  
  20. Tryton uses a Relational Database Management System (RDBMS) to store data. The
  21. preferred RDBMS for Tryton is PostgreSQL.
  22.  
  23. You have to setup this database manually. Here is a short explanation how to
  24. achieve this (you need to execute all commands as root):
  25.  
  26. * Making sure, PostgreSQL is running:
  27.  
  28. # /etc/init.d/postgresql* restart
  29.  
  30. Note: If PostgreSQL runs on another machine than the Tryton server, make sure
  31. you have setup database password authentication. Please refer to the
  32. PostgreSQL manual how to do this. If they run on the same machine, connection
  33. via local sockets is preferred and you are done with the default configuration
  34. of the PostgreSQL package.
  35.  
  36. * Creating the database user:
  37.  
  38. # su - postgres -c "createuser --createdb --no-createrole --no-superuser \
  39. --pwprompt tryton"
  40.  
  41. You have to enter
  42. * a password for the future database user (this will be used later in the
  43. setup of /etc/trytond.conf as db_password)
  44. * confirm it
  45. * and finally enter the password of the postgres superuser.
  46.  
  47. Note: If you want to run the database as another user than 'tryton', you
  48. need to replace 'tryton' above with the user you want to use instead.
  49. You need to adjust in the same way 'db_user = tryton' in /etc/trytond.conf.
  50.  
  51. Preparing the Tryton server
  52. ---------------------------
  53.  
  54. * Setting up the Tryton server (trytond):
  55.  
  56. Adjust /etc/trytond.conf to reflect the setup of your system and use the
  57. database user and password from step 1 for db_user and db_password.
  58.  
  59. In case, that the PostgreSQL database runs on another machine (i.e. not
  60. localhost), also edit db_host and db_port to point to your PostgreSQL
  61. database server.
  62.  
  63. * If the Tryton server shall listen on some external interface (i.e. be
  64. available for clients connecting from other machines), change the jsonrpc
  65. protocol to listen accordingly.
  66.  
  67. Examples (listening on alll interfaces):
  68. jsonrpc = 0.0.0.0:8000 (for IPv4)
  69. jsonrpc = *:8000 (for IPv6)
  70. jsonrpc = 0.0.0.0:8000,*:8000 (for both)
  71.  
  72. * If the Tryton server is listening on external interfaces, it is highly
  73. recommended to enable SSL for the connection:
  74. ssl_jsonrpc = True
  75.  
  76. Note: The package is prepared to use the snakeoil certfifcates from
  77. the ssl-cert package. If you are installing the ssl-cert package after
  78. the tryton-server package, take care to add the tryton user to the
  79. ssl-cert group.
  80.  
  81. # adduser tryton ssl-cert
  82.  
  83. * Restarting trytond:
  84.  
  85. # /etc/init.d/tryton-server restart
  86.  
  87. Now you are ready to connect with a client, e.g. tryton-client.
  88.  
  89.  
  90. Creating the database
  91. ---------------------
  92.  
  93. Note: The following steps can also be performed easily from the Tryton
  94. Client and are not mandatory to be done on the command line.
  95.  
  96. * Creating the database:
  97.  
  98. # su - postgres -c "createdb --encoding=UNICODE --owner=tryton tryton"
  99.  
  100. Note: Use your database user for tryton as owner of the database, and enter
  101. a name for the database (here as default: tryton).
  102.  
  103. * Initializing the database:
  104.  
  105. # /usr/bin/trytond -i all -d tryton
  106.  
  107. Note: Use the database name you chose in the previous step (here as default: tryton).
  108. You will be asked for the admin password for this database.
  109.  
  110. As result you will have a bare Tryton database with the base modules installed.
  111.  
  112. Upgrade
  113. -------
  114.  
  115. * Once you have upgraded to a new major version (second number of the
  116. version string) you have to update your database(s).
  117. After the categorically recommended backup do:
  118.  
  119. # /usr/bin/trytond -u all -d tryton
  120.  
  121. Remember to replace tryton with the name of your database.
  122.  
  123.  
  124. Notes
  125. -----
  126.  
  127. Now, you're finished. Please be aware of the following things:
  128.  
  129. * trytond has one default account for server administration:
  130. - User: admin; password: admin (or the one you have configured in
  131. trytond.conf)
  132.  
  133. Note: Each Tryton database will have its own admin with login password
  134. stored in the database itself (not to be confound with the admin of the
  135. Tryton Server).
  136.  
  137. * trytond must have read access to its configuration file, otherwise it will
  138. start with internal defaults. The postinst script will (re)set ownership to
  139. the system user running trytond and correct the permissions on the standard
  140. configuration file (/etc/tryond.conf), if not otherwise stated by means of
  141. dpkg-statoverride.
  142.  
  143. * trytond listens by default on port 8000 (jsonrpc). If you need to change
  144. this, edit /etc/trytond.conf and replace 'jsonrpc = <interface>:8000' with
  145. 'jsonrpc = <interface>:<your port>'.
  146.  
  147. * trytond in its upstream configuration listens by default to the localhost
  148. interface. If you want to change this default to listen on all interfaces,
  149. edit /etc/trytond.conf and change the listening interface to something like
  150. 'jsonrpc = *:<port>' (IPv6) or 'jsonrpc = 0.0.0.0:<port>' (IPv4)
  151. according to your needs.
  152.  
  153. * Installation of modules into the database can be done from the
  154. Administration Panel of the client. Under Modules you can select from the
  155. modules packages (trytond-modules*) you have installed on your system.
  156.  
  157. To install just all from command line, run a second time:
  158.  
  159. # /usr/bin/trytond -i all -d tryton
  160.  
  161. Remember to replace tryton with the name of your database.
  162.  
  163. * Only the same major version of Tryton client and Tryton server can connect.
  164.  
  165. -- Mathias Behrle <[email protected]> Tue, 10 Jun 2014 16:45:00 +0200
Advertisement
Add Comment
Please, Sign In to add comment