#summary How to install Tryton Client and server on Windows #labels Phase-Deploy
The best way for installing the Tryton client on Window$ is: download the client from the download page. There you find a self-contained package and nothing to worry about.
(works for Win$ 7 and tryton 3.4)
- Create a folder for the downloaded sources. Ex: C:\TrytDwn
- Download PostgreSQL (mirror)
- Download Python
- Download PyGTK (all-in-one msi)
- Download python-dateutil (from PyPI)
- Download python-sql
- Download simplejson
- Download cdecimal
- Download Pycparser
- Download bcrypt
- Download cffi
- Download psycopg 2
- Download GooCalendar
- Download lxml
- Download relatorio
- Download polib
- Download fcrypt (why fcrypt?)
- Download LibreOffice (for the UNO libraries)
- Download Visual Studio C++ (for msvcr90.dll) (source)
- Download tryton server (trytond)
- Download tryton client (tryton)
- Download 7-zip (or equivalent)
- Start the Registry Editor (run regedit from start menu)
- Look for the following path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
- Create a dword named RealTimeIsUniversal and set the value to 1
- Restart your computer
- Open time and date settings
- Change to UTC
- Double-click on the MSI or EXE file of PostgreSQL
- Select the following optiions
- pgAgent
- pgBouncer
- Apache/PHP
- phpPgAdmin
- Make sure to set and remember a safe password
- Allow strange characters by adding the following line in postgresql.conf (source; optional?):
bytea_output == 'escape' - Restart the server
- Go to Start Menu --> PostgreSQL --> Reload configuration
This guide was prepared using LibreOffice 4.3 Double click the EXE or MSI files
- Install Python (double click EXE or MSI files)
- Add a variable called PythonPath to the environment
- META KEY + PAUSE --> Advanced system configuration --> Environment variables --> New
- Set the value to C:\Python27;C:\Python27\Lib\site-packages;C:\Python27\Scripts;C:\Python27\DLLs
- (restart?)
(It is convenient to decompress to the same directory)
- Go to the download folder
- select all the tar.gz files
- Right click on the files
- 7-zip --> Extract here
* If a
distdirectory is created, open it. 1. Select all tar files 1. Right click on the files 1. 7-zip --> Extract here
- You should end up with a list of folders with the names of the packages to install
- Go to the download folder again
- Right click on the zip files
- Extract files to
distdirectory
Start menu --> Accesories --> Right click on System console --> Run as administrator
(source)
Install Visual Studio C++ to fix error: Unable to find vcvarsall.bat
SQL express is not necessary
For each package, go to their directory (Ex: cd C:\TrytDwn\dist<package>) and install by typing (python setup.py install, unless otherwise noted)
- python-dateutil
- python-sql
- simplejson
- cdecimal
- Pycparser
- bcrypt
- cffi
- psycopg 2 with the win32 EXE
- GooCalendar
- lxml with
pip install lxmlin the console
- relatorio
- polib
- tryton server (trytond)
- (tryton) with the EXE (tryton-setup-last.exe)
Open the PostgreSQL server on pgAdmin III
- Start menu --> PostgreSQL --> pgAdmin III --> Double click on the PostgreSQL server (below Servers) --> Type password --> Create a role for tryton
- Right click on Login Roles --> New login role
- Set role for your tryton database user
- Set role name
- Set and remember a safe password for the
- Role Privileges
- Can login
- Inherits rights
- NO superuser
- Can create databases
- NO create roles
- NO initiate streaming replication and backups
- Can login
- Role Privileges
- Set role name
- Set role for your tryton database user
- Open the PostgreSQL server on pgAdmin III
- Create a new database for which tryton is the owner
- Right click on Database --> New Database -->
- Set the name of the database
- Pick your as owner
After creating the user and database, you can close pgAdmin III
- Set the name of the database
- Right click on Database --> New Database -->
- Get the encrypted version of the password:
- Run the following command in a console:
python -c 'import getpass,fcrypt,random,string; print fcrypt.crypt(getpass.getpass(), "".join(random.sample(string.ascii_letters + string.digits, 8)))'- Copy the resulting code
- Run the following command in a console:
- Open a notepad window
- Paste the following (replace passwords):
[jsonrpc]
listen == localhost:8000
hostname == localhost
[database]
uri == postgresql://tryton:<tryton password in pgAdmin>@localhost:5432/
[session]
timeout == 600
super_pwd == << CTRL + V (to paste the resulting code of password) >>
[report]
unoconv == "C:\Program Files\LibreOffice 4\program\python.exe" unoconv
- Save as trytond.conf in a directory (preferably the c:\python27\scripts)
Double click on the MSI installer (check that the installation directory is the same as the one in the line of unoconv in trytond.conf)
(source)
Type the following in a console:
python <path to Python scripts> -c <path to trytond.conf> -d <name of database> --allEx:pytyon c:\Python27\Scripts\trytond -c c:\Python27\Scripts\trytond.conf -d test --allSet and remember a password for the admin user of the database (it can be different than the password of the tryton user set before)
Type the following in a console:
pytyon <path to Python scripts> -c <path to trytond.conf>Ex:pytyon c:\Python27\Scripts\trytond -c c:\Python27\Scripts\trytond.conf}
In the openning window, set the server to localhost:8000 (that is, server localhost and port 8000), the user to admin and password to the one used when the database was initialised.