RPM/SuSE

From Davical
< RPM
Jump to navigationJump to search

PostgreSQL

On SuSE the PostgreSQL configuration files are located in /var/lib/pgsql/data

And you always need to do

su postgres -c ...

In /var/lib/pgsql/data/pg_hba.conf, if the user general can not log in it may be that you are using a TCP/IP connection to the local computer rather than a Unix socket connection. In this case you could add :

host    rscds    general   127.0.0.1/32   trust

Or you could change your connection string so that it uses unix sockets, such as:

$c->pg_connect[] = 'dbname=rscds user=general';

If you specify a hostname in the connection string, like:

$c->pg_connect[] = 'host=localhost dbname=rscds user=general';

then you will use TCP/IP to connect (and your database will need to have TCP/IP access enabled).

Update Script

After installing a new version of DAViCal it is necessary to update its database. To update the database run the script {{{/usr/share/rscds/dba/update-rscds-database}}}. To run the script you need, of course, perl and the package perl-DBD-Pg. This package is easy to install with yast. The error install_driver(Pg) failed: Can't locate DBD/Pg.pm indicates that you forgot to install the perl-DBD-Pg package.

If the root user is a postgres user as well, launch the script as follows:

su -c /usr/share/rscds/dba/update-rscds-database

It is discouraged to run postgres as root. If you get the error FATAL: role "root" does not exist it might be the case the you need to switch user:

cd /usr/share/rscds/dba
su
su postgres
./update-rscds-database

Apache

These optional settings are not specific to SuSE, and are not necessary, but might help with debugging if you are having some other problem:

  • Add in the directory settings of the virtualHost section
    php_value error_reporting "2039"
  • And for debugging add also should be usefull
    php_value display_errors "On"