Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # how to install tryton on ubuntu 12.04
- sudo apt-get install tryton-server tryton-client postgresql postgresql-contrib
- sudo ufw allow 5432
- sudo service tryton-server restart && sudo service postgresql restart
- sudo su - postgres
- psql -U postgres
- sudo su - postgres -c "createuser --createdb --no-createrole --no-superuser --pwprompt tryton"
- tryton-server for Debian
- ========================
- Setup
- =====
- Preparing the database
- ----------------------
- Tryton uses a Relational Database Management System (RDBMS) to store data. The
- preferred RDBMS for Tryton is PostgreSQL.
- You have to setup this database manually. Here is a short explanation how to
- achieve this (you need to execute all commands as root):
- * Making sure, PostgreSQL is running:
- # /etc/init.d/postgresql* restart
- Note: If PostgreSQL runs on another machine than the Tryton server, make sure
- you have setup database password authentication. Please refer to the
- PostgreSQL manual how to do this. If they run on the same machine, connection
- via local sockets is preferred and you are done with the default configuration
- of the PostgreSQL package.
- * Creating the database user:
- # su - postgres -c "createuser --createdb --no-createrole --no-superuser \
- --pwprompt tryton"
- You have to enter
- * a password for the future database user (this will be used later in the
- setup of /etc/trytond.conf as db_password)
- * confirm it
- * and finally enter the password of the postgres superuser.
- Note: If you want to run the database as another user than 'tryton', you
- need to replace 'tryton' above with the user you want to use instead.
- You need to adjust in the same way 'db_user = tryton' in /etc/trytond.conf.
- Preparing the Tryton server
- ---------------------------
- * Setting up the Tryton server (trytond):
- Adjust /etc/trytond.conf to reflect the setup of your system and use the
- database user and password from step 1 for db_user and db_password.
- In case, that the PostgreSQL database runs on another machine (i.e. not
- localhost), also edit db_host and db_port to point to your PostgreSQL
- database server.
- * If the Tryton server shall listen on some external interface (i.e. be
- available for clients connecting from other machines), change the jsonrpc
- protocol to listen accordingly.
- Examples (listening on alll interfaces):
- jsonrpc = 0.0.0.0:8000 (for IPv4)
- jsonrpc = *:8000 (for IPv6)
- jsonrpc = 0.0.0.0:8000,*:8000 (for both)
- * If the Tryton server is listening on external interfaces, it is highly
- recommended to enable SSL for the connection:
- ssl_jsonrpc = True
- Note: The package is prepared to use the snakeoil certfifcates from
- the ssl-cert package. If you are installing the ssl-cert package after
- the tryton-server package, take care to add the tryton user to the
- ssl-cert group.
- # adduser tryton ssl-cert
- * Restarting trytond:
- # /etc/init.d/tryton-server restart
- Now you are ready to connect with a client, e.g. tryton-client.
- Creating the database
- ---------------------
- Note: The following steps can also be performed easily from the Tryton
- Client and are not mandatory to be done on the command line.
- * Creating the database:
- # su - postgres -c "createdb --encoding=UNICODE --owner=tryton tryton"
- Note: Use your database user for tryton as owner of the database, and enter
- a name for the database (here as default: tryton).
- * Initializing the database:
- # /usr/bin/trytond -i all -d tryton
- Note: Use the database name you chose in the previous step (here as default: tryton).
- You will be asked for the admin password for this database.
- As result you will have a bare Tryton database with the base modules installed.
- Upgrade
- -------
- * Once you have upgraded to a new major version (second number of the
- version string) you have to update your database(s).
- After the categorically recommended backup do:
- # /usr/bin/trytond -u all -d tryton
- Remember to replace tryton with the name of your database.
- Notes
- -----
- Now, you're finished. Please be aware of the following things:
- * trytond has one default account for server administration:
- - User: admin; password: admin (or the one you have configured in
- trytond.conf)
- Note: Each Tryton database will have its own admin with login password
- stored in the database itself (not to be confound with the admin of the
- Tryton Server).
- * trytond must have read access to its configuration file, otherwise it will
- start with internal defaults. The postinst script will (re)set ownership to
- the system user running trytond and correct the permissions on the standard
- configuration file (/etc/tryond.conf), if not otherwise stated by means of
- dpkg-statoverride.
- * trytond listens by default on port 8000 (jsonrpc). If you need to change
- this, edit /etc/trytond.conf and replace 'jsonrpc = <interface>:8000' with
- 'jsonrpc = <interface>:<your port>'.
- * trytond in its upstream configuration listens by default to the localhost
- interface. If you want to change this default to listen on all interfaces,
- edit /etc/trytond.conf and change the listening interface to something like
- 'jsonrpc = *:<port>' (IPv6) or 'jsonrpc = 0.0.0.0:<port>' (IPv4)
- according to your needs.
- * Installation of modules into the database can be done from the
- Administration Panel of the client. Under Modules you can select from the
- modules packages (trytond-modules*) you have installed on your system.
- To install just all from command line, run a second time:
- # /usr/bin/trytond -i all -d tryton
- Remember to replace tryton with the name of your database.
- * Only the same major version of Tryton client and Tryton server can connect.
- -- Mathias Behrle <[email protected]> Tue, 10 Jun 2014 16:45:00 +0200
Advertisement
Add Comment
Please, Sign In to add comment