Installing Tiny ERP under Windows 2000/XP

Chapter content

  System requirements
  Dependencies

  Install PostgreSQL
    Download PostgreSQL
    Install PostgreSQL 8

  Create a new database for Tiny ERP Server

  Install Tiny ERP Server
    Dowload Tiny ERP Server
    Install Tiny ERP Server
  Preparing the server to the first launch
    Tiny ERP Prompt

  Deciding how to use the server
    First launch with demonstration data
    First launch with an empty database
    First launch whith an updated Tiny ERP Server version

  Launching the server
    From the command prompt
    From the main menu
    From the Windows Services Management

  Monitoring the Tiny ERP Server
  Configuring the Tiny ERP Server

  Installing the Tiny ERP Client
    Downloading the Tiny ERP Client
    Installing the Client
    Launching the Client

System requirements

The server only works under Windows 2000 and XP with the formatted hard disk in NTFS (not a partition FAT or FAT32). Tiny ERP Server can't work under Windows 98 or ME, PostgreSQL 8 is the issue.

If you wish to use Tiny ERP, you have to install Tiny ERP Server and Tiny ERP Client

Dependencies

To install Tiny ERP in your work environment, you have to install :

  1. The Database Management System PostgreSQL http://www.postgresql.org
  2. Tiny ERP Server http://tinyerp.org
  3. Tiny ERP Client

The Tiny ERP server directly depends on the database management system, so you have to install first the latter. The client can't work without possibility to connect to a Tiny ERP server. The connexion may be either a local connection on the computer itself or on a distant server using the network.

Install PostgreSQL

If you have already installed and configured PostgreSQL, you can go to the section Preparation of a new database.

Download PostgreSQL

Download the setup installers of the database management system from the site of PostreSQL.

You will find archives containing different versions of the database in the directory http://www.postgresql.org/ftp/binary/

In this directory there are several versions, don't hesitate to download the most recent. Entering into the directory corresponding to the chosen version, you will find the Windows version in the sub-directory win32

Install PostgreSQL 8

Decompress the archive in a directory. Be careful, four files will appear, and each of them is necessary for you !

Launch the installation program by clicking on the file named postgresql-X.Y.msi, where X.Y is the version number.

First screens of the installer may be let with the choices by default. It is about the choice of the components which will be installed.

There are two sets of login and password that you will have to know later :

  1. The first login is requested in the screen in Service configuration. It's the setup of a services special account for handling the PostgreSQL server management. Thereafter you will probably not need these logins, but record them in case of future need.

  2. The second login is required for accessing the database. It is defined in the screen Initialise database cluster . Be sure to remember this login and its password. You will need it later for the installation.

Attach:pgsql_install.service_configuration.png Δ

In the screen of service configuration, the field Account domain should be the same as the server name. The installer fills the correct value by default.

You can get a warning message saying that the password you have typed is too weak to properly protect the database, in that case you can replace the password by a password automatically generated in a random way. Of course you can keep your password.

Attach:pgsql_install.weak_pwd.png Δ

Attach:pgsql_install.init_cluster.admin_login_def.png Δ

In the screen Initialise database cluster You are invited to type a super userid and its password. This account is an administrator account whithout access restriction. It will be used for creating the Tiny ERP Server database.

Choices by default in the remaining screens don't need to be modified. You have now a PostgreSQL server installed and configured. Then you have to create a database for the Tiny ERP Server.

Create a new database for Tiny ERP Server

If you already have a database for Tiny ERP or if you update your system, you can go to the next section, Install Tiny ERP Server

To create the database for Tiny ERP server, open the prompt command from the main menu of PostgreSQL :

The prompt directly opens into the installation directory of PostgreSQL and you can directly create the database :

    createdb -U <superuser_username> --encoding=UNICODE terp

  1. terp is the database name
  2. superuser_username is the adimistrator name that you choosed in the above initialisation cluster screen.

Don't forget to specify the "Encoding" option. Indeed, whithout this option, data won't be recorded in the correct format, and you could encounter errors when running TinyERP !

If you see a command with a parameter related to your configuration, the convention is to put in angle brackets <> the parameter to key in. While customizing the command, don't type the brackets. For example <superuser_username> means that you have to type the postgres administrator as superuser username of the database.

Example of command :

    C:\Program Files\PostgreSQL\8.1\bin>createdb -U postgresadmin --encoding=UNICODE terp
    Password: <enter password again>
    CREATE DATABASE

    C:\Program Files\PostgreSQL\8.1\bin>

The display out can vary, and if you are asked to type the password a second time, type it a second time. If you run the same command a second time, after typing the password, you will get the following error message :

That error message tells that the database you tried to create already exists.

At this point, you have a complete and functional installation of PostgreSQL. You can now install Tiny ERP Server.

Install Tiny ERP Server

Download Tiny ERP Server

You will find the Windows installer of the last Tiny ERP Server version at the following address : http://www.tinyerp.org/download.php

Dowload the file tinyerp-server-X.Y.Z.exe.

Install Tiny ERP Server

The server application is automatically installed.

Tiny ERP Server is installed from now on as a Windows service. It means that you don't have to launch anymore the server at each computer startup and it runs without need to open a user session.

At the end of the installation, the install guide suggests you to open the Tiny ERP Prompt, the command line, from which you can prepare your server as follows.

Attach:terp_server.finish_install.png Δ

Preparing the server for the first launch

The Windows service for Tiny ERP Server is installed during the installation and it is configured to start automatically while launching the system.

From now on, the configuration file is recorded in the installation directory. For example in :

 C:\Program Files\Tiny ERP Server\etc\tinyerp-server.conf

Tiny ERP Prompt

At the end of the installation, the installation guide suggests to open a Tiny ERP Prompt command.

To start manually the server, launch the Windows prompt command and go to the installation directory : "C:\Program Files\Tiny ERP Server\bin\":

Attach:terp_prompt.cd_path.png Δ

You can also start Tiny ERP Prompt from the Startup menu which leads you directly into the server directory, so you will be able to directly run the commands :

Attach:terps_menu.terp_prompt.png Δ

Attach:terp_prompt.cmd_serverhome.png Δ

You have to initialize the Tiny ERP server and record the configurations for the service to be able to automatically start the service.

You should also specify a log file in order to have the printout server execution.

Once in the server directory, type the following command, but don't run it yet:

    tinyerp-server.exe -d <db_name> -r <db_user> -w <db_password> --db_host=localhost
        --db_port=5432 --logfile="<logfile>" -s --stop-after-init

The Tiny ERP Server initialization consists in supplying the necessary information for the connection to the PostgreSQL database and the choice indication of the structures to load. Here below is the explanation of the options :

  1. -d <db_name> : Tiny ERP Server database name
  2. -r <db_user> : PostgreSQL Administrator's name
  3. -w <db_password> : Administrator's password
  4. --db_host=<postgresql_server_address> : Address of the server where the PostgreSQL server is located. If you have installed PostgreSQL on the same computer as Tiny ERP Server, you can type localhost, else the IP address or name of the distant server.
  5. --db_port=<port_nb> : PostgreSQL Port number. 5432 by default.
  6. -s : This option allows you to save the options in the configuration server file. It ensures a better security, because you don't have to everytime launch the server with the unscrambled password
  7. --stop-after-init: This option is used to stop the server after initialization.
  8. '''--logfile="<logfile>": Specifies the logfile where the information will be recorded during the execution of the server.

Before running this command you have to decide for which usage you are going to run Tiny ERP : Process as explained in the next section! the command is on an only line, the ohter long commands too.

Typical command :

    tinyerp-server.exe -d terp -r postgresadmin -w postgresadminpasswd
        --db_host=localhost --logfile="C:\Program Files\Tiny ERP Server\tinyerp-server.log"
        --db_port=5432 -s  --stop-after-init

At this stage, you have to type the login and password initialized in the screen Initialise database cluster.

When you will run the inizialisation command, you will see nothing printed in the Windows prompt if you have specified a log file.
Everything is written in the log file. You just have to wait until the restoration of the prompt.

Deciding how to use the server

You have three possibilities for the first launch. This part is very important because the correct initialization of the data can prove to be crucial.

You can initialize the database using Tiny ERP Server in order to:

  1. Observe the system with demonstration data. In that case the server will load different ERP objects (products, partners, analytical accounts, etc.)
  2. Initialize the system whith an empty database (without demonstration data). In that case you can start creating your own data, corresponding to your company.
  3. Update the installation of a previous version.

First launch with demonstration data

To initialize Tiny ERP Server with the demonstration data, you have to add the following option to the above command :

     --init=all

Example :

    tinyerp-server.exe -d terp -r postgresadmin -w postgresadminpasswd
        --db_host=localhost --logfile="C:\Program Files\Tiny ERP Server\tinyerp-server.log"
        --db_port=5432 -s  --stop-after-init --init=all

This command initializes Tiny ERP Server and fills its database PostgreSQL with the demonstration data.

First launch with an empty database

Run the command with the option which excludes the demonstration data:

 	--without-demo=all

This will load all the modules, but will not load the demonstration data.

Example :

    tinyerp-server.exe -d terp -r postgresadmin -w postgresadminpasswd
        --db_host=localhost --logfile="C:\Program Files\Tiny ERP Server\tinyerp-server.log"
        --db_port=5432 -s  --stop-after-init --without-demo=all

If you have already initialized the database and loaded the demonstration data, you can recrate a new database

First launch with an updated Tiny ERP Server version

Run the command with the option which updates the structures of the data:

    --update=all

Example :

    tinyerp-server.exe -d terp -r postgresadmin -w postgresadminpasswd
        --db_host=localhost --logfile="C:\Program Files\Tiny ERP Server\tinyerp-server.log" 
        --db_port=5432 -s  --stop-after-init --update=all

Launching the server

Now, the Tiny ERP server being initialized and the configurations recorded, you can finally start the Tiny ERP Server service.

In the menu we still kept the icon which directly runs the ERP server, but it's only for tests and debugging reasons.

From the command prompt

Now you can launch the Tiny ERP Server service from the command prompt with a simple command:

 	net start tinyerp-services

Attach:terp_service.start.png Δ

You can also stop the service in a similar way, for example when the service is running, but that you have to restart it:

 	net stop tinyerp-services

Attach:terp_service.stop.png Δ

From the main menu

You can also control the service from the programs main menu:

Attach:terps_menu.server_controls.png Δ

From the Windows Services Management

The service and information about the running are also available in the Manager of the computer in Administration Tools.

Attach:terp_service.mmc_terp_service.png Δ

Attach:terp_service.mmc_logs.png Δ

The service that records messages offers additional information about the execution of the Tiny ERP Server service.

In the services manager you can also define the actions to take when the server fails.

Attach:terp_service.mmc_control_actions.png Δ

Monitoring the Tiny ERP Server

You can find information about startup and stop in the events browser.

The end of Tiny ERP Server session may be consulted in the log file that you will have secified in the initialization command.

As the server runs as a Windows service, there is no printout message during the execution. The only solution is to define a log file.

You can monitor the Tiny ERP Server by using the Windows Tasks Manager. In the Processes tab you will see TinyERPServerService.exe and tinyerp-server.exe running as SYSTEM user.

Attach:terp_service.running.png Δ

Configuring the Tiny ERP Server

The Tiny ERP Server menu contains a link to the configuration file used by the service. In that way you can edit the configuration and then restart the service in order to load the new configuration.

Attach:terps_menu.editconf.png Δ

Attach:terp_server.conf.png Δ

Be extremely careful while updating directly the configuration file, you can corrupt the whole system whith incorrect values.

Installing the Tiny ERP Client

Installing the client is very simple thanks to the automated Windows installer.

Before installing the Tiny ERP Client, please install Tiny ERP Server! The client can't work without the server. You can install the Tiny ERP server either on the same computer or on a distant server accessible by the network.

Download the Tiny ERP Client

You will find the Windows installer of the last ERP Client version at the following address : http://www.tinyerp.org/download.php

Download the file tinyerp-client-X.Y.Z.exe

Installing the Client

The server application is installed in an automatic way, you can choose the installation directory. For a later use, note the installation directory.

Launching the Client

The installation program creates shortcuts in the main menu and on the desktop to make the client launching easier.

Before trying a connection to the server, be sure that there is a Tiny ERP server running either on the computer where the client is installed, or on a distant server accessible by the network. If it's not the case, you won't use the client software.

When you launch the server for the first time, you are invited to fill a questionnaire about the Tiny ERP uses in your company. This information is a useful feedback for the developers.