24 сентября, 2009

Tryton Server ERP на Debian

Долго мучался с установкой Тритона (wikipedia)
оказалось всё до ужаса просто
$ less /usr/share/doc/tryton-server/README.Debian
tryton-server for Debian

Tryton in its first generation uses a PostgreSQL database to store data.
You have to setup this database manually. Here is a short explanation
how to achieve this (you need to execute all commands as root):

0. Making sure, PostgreSQL is running

# /etc/init.d/postgresql* restart

Note: Make sure you have setup database password authentication.
Please refer to the PostgreSQL manual how to do this.

1. Creating the database user

# su - postgres -c "createuser -q --createdb --no-createrole \
--no-superuser --pwprompt tryton"

You have to enter a password for the future database user, confirm it (to
be used later in the setup of /etc/trytond.conf as db_password) 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, and
you need to adjust 'db_user = tryton' in /etc/trytond.conf, too.

2. Setting up the server

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

Also edit db_host and db_port to point to your PostgreSQL database server,
if not running on localhost and/or on non standard port (5432).

3. Restarting trytond

# /etc/init.d/trytond restart

Note: The following steps can also be performed easily from the Tryton
Client and are not mandatory to do here.

4. Creating the database

# su - postgres -c "createdb -q --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).

5. Initialize the database

# /usr/bin/trytond -i all -d tryton

Note: Use the database name you chose in step 4 (here as default: tryton).

Now, you're finished. Please be aware of the following things:

* trytond has one default account:
- User: admin; password: admin (or the one you have set)

* trytond must have read access to its configuration file, otherwise it will
start with internal defaults. The postinst script will (re)set correct
permissions on the standard configuration file (0644 on /etc/tyond.conf).

* trytond listens by default on port 8070 (netrpc). If you need to change
this, edit /etc/trytond.conf and replace 'port = 8070' with
'port = '.

* trytond in its upstream configuration listens by default to *all*
interfaces. For security reasons, we do restrict it in the Debian packages
to listen only on localhost. If you need to change this, edit
/etc/trytond.conf and replace 'interface = localhost' with
'interface = ' or just comment it out to listen to all.

* 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, run a second time

# /usr/bin/trytond -i all -d tryton

Remember to replace tryton with the name of your database.

* Once you have upgraded to a new major version 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.

-- Mathias Behrle Sat, 28 Mar 2009 12:00:00 +0200

Комментариев нет: