
Currently the Tryton client is not part of the FreeBSD ports collection.
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:
PostgreSQL database may run on the same or another machine. Installation for FreeBSD is described here.
Install the PostgreSQL client version corresponding to your server via ports collection before installing trytond.
SQLite support is new since version 1.4 of tryton and can be installed equivalent.
portupgrade will come in handy, so make sure it is installed.
cd /usr/ports/ports-mgmt/portupgrade make install rehash
portinstall trytond
pkg_deinstall trytond pkg_deinstall py26-openssl
portinstall mercurial
mkdir -p ~/workspace/tryton/dev/disabled_modules mkdir -p ~/workspace/tryton/1.4/disabled_modules
chmod +x ~/workspace/tryton-dev.py
cd ~/workspace/tryton/dev ~/workspace/tryton-get.py
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
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
cp ~workspace/tryton/dev/trytond/etc/trytond.conf /usr/local/etc/trytond/trytond.conf
db_type = postgresql db_user = trytondbuser admin_passwd = secretadminpassword
~/workspace/tryton/dev/trytond/bin/trytond
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.
It is important to take first the decision, if
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.
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.
$ 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
The following instructions are meant for developers, who need to satisfy the dependencies for Tryton manually.
$ 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
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.
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.
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