SQL-Ledger Homepage

SQL-Ledger User Forum

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Install notes, new apache version, postgresql (General)

posted by Brian Dunn(R), 14.09.2016, 22:37

Recent versions of Apache2 require a new form of configuration files. There is no more httpd.conf file, which breaks the install script.

Apache2 now places configuration files into /etc/apache2/conf.available, and so the install script has to look for a pre-existing file inside that directory in order to discover where to place sql-ledger-httpd.conf.

Changes to the install script setup.pl:

91,105d90
< # For newer versions of apache2, which no longer use httpd*.conf:
< # "charset.conf" seems to be present by default.
< if ($httpd = `find /etc /usr/local/etc -type f -name 'charset.conf'`) {
< chomp $httpd;
< $webowner = `grep "^User " $httpd`;
< $webgroup = `grep "^Group " $httpd`;
<
< chomp $webowner;
< chomp $webgroup;
<
< ($null, $webowner) = split / /, $webowner;
< ($null, $webgroup) = split / /, $webgroup;
<
< }
<
455,466c440
<
< # For newer versions of apache2, which no longer use httpd*.conf:
< print qq|
<
< Or, for newer versions of apache2, do:
<
< # cd /etc/apache2/conf-available/
< # a2enconf sql-ledger-httpd.conf
< # service apache2 reload
<
< |;
<

This looks for the pre-existing file charset.conf, which is in Debian and hopefully in other distributions as well.

The sql-ledger-httpd.conf file should end up in /etc/apache2/conf-available.

After the install script completes, the configuration should be enabled with "a2enconf sql-ledger-http.conf", then the server is restarted with "service apache2 reload".

Also, to ensure that CGI is enabled: "a2enmod cgi", which probably should be mentioned in the install script and also in the install notes.

---

Regarding postgresql configuration, I found the following to work in /etc/postgresql/9.4/main/pg_hba.conf:

local datasetname "sql-ledger" trust

Someone who knows more about this may be able to verify whether this is correct from a security standpoint.

---

When moving an existing SQL-Ledger to a new machine, the database has to be backed up on the old system, and restored into the new postgres, but all the files must be transferred as well, and have their correct permissions set.

Copy the /usr/local/sql-ledger/* files to the new machine and set the permissions, but do not log in to use the SQL-Ledger admin module, but rather first create a new postgres database on the new machine then use psql to load it with its values, as mentioned in the docs.

Also copy over and install the sql-ledger-httpd.conf file as mentioned above, enable CGI for Apache2, and adjust the new machine's postgres pg_hba.conf file as well.

---

During an in-place system upgrade, there may be two versions of PostgreSQL installed at the same time. The newer version may install with a larger port number 5433 instead of the expected port number 5432. To correct this, upgrade the postgresql clusters, verify that psql can see the new database, remove the older version of postgresql, then edit postgresql.conf to make port=5432.

 

Complete thread:

Back to the forum
Board view  Mix view
963 Postings in 317 Threads, 321 registered users, 134 users online (0 registered, 134 guests)
SQL-Ledger User Forum | Admin contact
RSS-Feed
powered by my little forum