English فارسی Suomi
Français Nederlands Translate
EDIT

Tryton ERP

FreeBSD

Installing the Client

Currently the Tryton client is not part of the FreeBSD ports collection.

Installing the Server

The server trytond is part of the FreeBSD ports collection. Installing it via ports will give you the advantage of resolving and installing all dependencies, but leaves you without tryton modules (and their dependencies). To get full advantage of Tryton several extra steps are recommended:

Database

PostreSQL Server

PostgreSQL database may run on the same or another machine. Installation for FreeBSD is described here.

PostreSQL Client

Install the PostgreSQL client version corresponding to your server via ports collection before installing trytond.

SQLite

SQLite support is new since version 1.4 of tryton and can be installed equivalent.

trytond

portupgrade will come in handy, so make sure it is installed.

cd /usr/ports/ports-mgmt/portupgrade
make install
rehash
  1. Install trytond via ports collection to get all dependencies installed.
  2. portinstall trytond
  3. deinstall trytond and Python Openssl package.
  4. pkg_deinstall trytond
    pkg_deinstall py26-openssl
  5. Install mercurial
  6. portinstall mercurial
  7. Create a workspace with directories for the branches you want. for example 1.4 and development branch.
  8. mkdir -p ~/workspace/tryton/dev/disabled_modules
    mkdir -p ~/workspace/tryton/1.4/disabled_modules
  9. Get tryton-dev.py script, save it to your workspace and make it executable.
  10. chmod +x ~/workspace/tryton-dev.py
  11. Fetch the development branch.
  12. cd ~/workspace/tryton/dev
    ~/workspace/tryton-get.py
  13. Install some python dependencies and extra functionality.
  14. easy_install BeautifulSoup
    easy_install vobject
    easy_install pyWebDav
    easy_install -U pyWebDav
    easy_install pyOpenSSL
    easy_install vatnumber
    portinstall py26-soappy
Since i did not manage to install python ldap i moved these modules away for now (help welcome).
mv trytond/trytond/modules/*ldap* disabled_modules
  1. repeat the last steps for 1.4 branch
  2. cd ~/workspace/tryton/1.4
    ~/workspace/tryton-get --branch 1.4
    easy_install BeautifulSoup
    easy_install vobject
    easy_install pyWebDav
    easy_install -U pyWebDav
    easy_install pyOpenSSL
    easy_install vatnumber
    portinstall py26-soappy
    mv trytond/trytond/modules/*ldap* disabled_modules

Initial configuration and server start

  1. Copy the configuration file to /usr/local/etc
  2. cp ~workspace/tryton/dev/trytond/etc/trytond.conf /usr/local/etc/trytond/trytond.conf
  3. These options are important:
  4. db_type = postgresql
    db_user = trytondbuser
    admin_passwd = secretadminpassword
  5. Start the server
  6. ~/workspace/tryton/dev/trytond/bin/trytond
    

Linux Installation

Linux installation instructions vary, both depending on your Linux distribution, and on whether you choose to install from source or via your distribution's package manager.

Debian

It is important to take first the decision, if

  • Option 1: you want just run the latest release of Tryton (for testing, usage or production) on your Debian system
  • Option 2: you plan to develop with Tryton (therefore intending probably to run some versions in parallel resp. to run the trunk version (tip))

Hint:

One time you have packages installed in the system, they will be in PYTHONPATH. This will result in conflicts, if you try to run any other version of Tryton different from the installed one.

Option 1: Installation from package management

Tryton packages are available in squeeze/testing and as backports for lenny/stable.

A synopsis of the available sources can be found at http://tryton.debian-maintainers.org/

As usual dependencies will be automatically resolved by the package management.

Hint:

If you want to install all available Tryton modules at once, search for package tryton-modules-all.

After installation have a look at /usr/share/doc/tryton-server/README.Debian to complete the configuration of your system and you are done.

Running the server with SSL support

$ sudo apt-get install python-openssl ssl-cert
$ sudo adduser tryton ssl-cert

Edit /etc/trytond.conf to enable SSL for the protocols to be secured and point to the snake-oil-certificates

secure_netrpc = True
secure_xmlrpc = True
secure_jsonrpc = True
secure_webdav = True
privatekey = /etc/ssl/private/ssl-cert-snakeoil.key
certificate = /etc/ssl/certs/ssl-cert-snakeoil.pem

Option 2: Running from sources

The following instructions are meant for developers, who need to satisfy the dependencies for Tryton manually.

Preparation

Mercurial

$ sudo apt-get install mercurial

if you want to use the hgnested extension (recommended) HgNested (Using Extensions) you can enable it for the user the following way (until a hgnested package for Debian will be available):

$ sudo apt-get install python-pip
$ pip install --install-option="--user" hgnested
$ echo -e "[extensions]\nhgnested=" >> ~/.hgrc

Get the sources

Just proceed as described in Installation.

When downloading and running from sources, do NOT install those packages with setup.py! Just run the binaries from the sources as described later.

Installation of dependencies

Generally all dependencies for Tryton are packaged for Debian and can be installed with the package management.

Take a look at the dependencies of the client and of the server, that can easily be installed with 'apt-get install package_name'

Note:

Optional dependencies are listed under Recommends.

Modules can require additional dependencies.

Preparing the system for running the server

Note: This is NOT the standard Debian way to install a package via the package management with apt. It is shown as an example to do a setup for a development environment.

Only recommended to experienced users

Tryton sources are supposed to be downloaded to /usr/local/tryton

directory structure:
  usr --- local --- tryton --- trytond --- bin
                            |           | --- modules    
                            |           | --- etc
                            |           | ...
                            |
                            |--- tryton --- bin
                                         | ...

add the system user to run trytond

# adduser --no-create-home --system --group tryton

set ownership

# chown -R tryton:tryton /usr/local/tryton
Note: if you want to update the installation with mercurial, the owner should be replaced by another user running hg fpull etc.
i.e. chown -R mercurial_user:tryton /usr/local/tryton
in this case you have to give write permissions for the directories to group tryton
# find /usr/local/tryton/ -type d -exec chmod 775 {} \;

copy init scripts (can be downloaded from here)

# cp trytond /etc/init.d/trytond
# chmod +x /etc/init.d/trytond
# mkdir /usr/local/etc/default/
# cp trytond_default /usr/local/etc/default/trytond

if you want start trytond automatically at system startup

# update-rc.d trytond defaults 21

if you want to store attachments with the server

# mkdir /var/lib/trytond
# chown tryton:tryton /var/lib/trytond

configure and start the server

adapt /usr/local/etc/default/trytond and /usr/local/tryton/trytond/etc/trytond.conf to your needs
and start the server with
# /etc/init.d/trytond start

EDIT