Stoq

From ArchWiki
Jump to: navigation, search

Stoq is a suite of open-source enterprise management.

Stoq application uses PostgreSQL as database back-end, with a graphical interface client.

Installation

Installing Stoq

Install the stoqAUR package. The dependency of webkitgtkAUR take long time for installation process.

Configure Stoq

After running Stoq for the first time, you will need to configure the database location. In this step there are two options for the client connect to the database:

  • Connect to the database locally;
  • Manually configure the database connection.

Connect to the database locally

To connect to the database locall, you must install the postgresql.

If the PostgreSQL database cluster has not been initialized yet, please follow the PostgreSQL#Installation first.

As root, start and enable the postgresql.service.

On the screen "Database location" use the option "I want to use Stoq just on this computer".

Manually configure the database connection

On the screen "Database location" use the option "I want to manually configure the database connection" and fill the details about the database.

Stoq configuration file

The main Stoq configuration file is located at ~/.stoq/stoq.conf.

Installing stoq-server

Install the stoq-serverAUR package. Then set a password for the newly created stoqserver user.

Configure stoq-server

If the PostgreSQL database cluster has not been initialized yet, please follow the PostgreSQL#Installation first.

As root, start and enable the postgresql.service.

It is necessary to create a new PostgreSQL configuration for stoqserver. For that log in as the default PostgreSQL superuser, 'postgres', by executing the following command:

  • If you have sudo and your username is in sudoers:
$ sudo -u postgres -i
  • Otherwise:
$ su
# su -l postgres

Use stoqsconf script to generate the necessary configuration files:

[postgres]$ stoqsconf -p 5432 -D "/usr/share/stoqserver"

Where:

  • the -p is the port that PostgreSQL uses to remote conecctions;
  • and -D is the location where the configuration files of stoq-server must be stored.

Return to the regular user using exit.

In order for the stoq-server to be accessible remotely it is necessary to follow the article Configure PostgreSQL to be accessible from remote hosts.

As root, start and enable the supervisord.service.

Restart the supervisor process:

# supervisorctl update
# supervisorctl restart stoqserver

Stoq-server configuration file

The main stoqserver configuration file is located at /usr/share/stoqserver/.stoq/stoq.conf.

Accessing serial

The stoqserver communicates with the computer via a serial connection or a serial over USB connection. So the user needs read/write access to the serial device file. Udev creates files in /dev/tts/ owned by group uucp so adding the user to the uucp group gives the required read/write access.

# gpasswd -a stoqserver uucp
Note: You will have to logout and login again for this to take effect.

Additional documentation

Therefore, reading the wiki and the manual of Stoq (manual only in Portuguese).