X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=sql-ledger%2Fdoc%2Ffaq.html;h=5a26f64e31a6ac0d6126b6ea0f76dc3ac0234d87;hp=0f6f237cae16ba205539f564fcae1d46bca6806a;hb=32306b5f8ffe4ce594409aa6e89626740b225a39;hpb=52072fcd26f2faf57923f598c358e7f47c4e2643 diff --git a/sql-ledger/doc/faq.html b/sql-ledger/doc/faq.html index 0f6f237ca..5a26f64e3 100644 --- a/sql-ledger/doc/faq.html +++ b/sql-ledger/doc/faq.html @@ -1,56 +1,119 @@
- # for Apache 2 we escape strings twice -# if (($ENV{SERVER_SOFTWARE} =~ /Apache\/2/) && !$beenthere) { -# $str = $self->escape($str, 1); -# } -+
Everybody now, "Who do we thank for this schlamassl". +
+ AddDefaultCharset On+in your httpd.conf file.
setup.pl does not check for missing software packages and it is your -responsibility to make sure you have the required pieces +responsibilite to make sure you have the required software installed either from source or from a package supplied with your distro.
Requirements are clearly indicated in the README file and on the download page. -
Do yourself a favour and change authentication in pg_hba.conf to +
+ # SQL-Ledger + Include /etc/httpd/sql-ledger-httpd.conf+ +Create a file 'sql-ledger-httpd.conf' in /etc/httpd and copy the next part +into the file.
-local all trust+ AddHandler cgi-script .pl + Alias /sql-ledger/ /var/www/sql-ledger/ + <Directory /var/www/sql-ledger> + Options ExecCGI Includes FollowSymlinks + </Directory> + + <Directory /var/www/sql-ledger/users> + Order Deny,Allow + Deny from All + </Directory> +replace '/etc/httpd' and '/var/www' with the appropriate directories. + + +
+ # chown -R apache:apache users+ + +
until you have figured what all this stuff in pg_hba.conf does. -
NOBODY, I repeat, NOBODY, from the Internet will be able to -connect to postgres. You can't even connect from the inside LAN, the only -one who is allowed to connect are clients originating from localhost. +
Read a bit about the different authentication settings and change -them as you see fit. -It is all described in detail in pg_hba.conf -
If you can't find the file, there is a wonderful utility called find. -Use it. +
-# find /usr/local -type f -name 'pg_hba.conf' -+ # for Apache 2 we escape strings twice + if (($ENV{SERVER_SIGNATURE} =~ /Apache\/2\.(\d+)\.(\d+)/) && !$beenthere) { + $str = $self->escape($str, 1) if $2 < 44; + } + + +
+ local all trust+ +The file is in the 'data' directory of your postgresql installation. +This is different with every distribution so look for it. +
+ # find / -name 'pg_hba.conf'
LaTeX is difficult but it also offers a much superior interface to produce -professionally looking forms in postscript and PDF format. -Unfortunately with power comes some pain too. +
LaTeX is difficult but it also offers a much superior environment +to produce professionally looking forms in postscript and PDF format. +Unfortunately with all that power there is also a steep learning curve.
$ w3m -F http://localhost/sql-ledger/login.pl?terminal=mozilla+
+ $ w3m -F http://localhost/sql-ledger/login.pl?terminal=mozillaTo use without frames -
$ w3m http://localhost/sql-ledger/login.pl?terminal=lynx+
+ $ w3m http://localhost/sql-ledger/login.pl?terminal=lynx
-Alias /sql-ledger/ "C:/apache/sql-ledger/" +Alias /sql-ledger/ "c:/apache/sql-ledger/" <Directory "c:/apache/sql-ledger"> AllowOverride All AddHandler cgi-script .pl @@ -133,7 +196,7 @@ Alias /sql-ledger/ "C:/apache/sql-ledger/"
-<Directory /usr/local/sql-ledger> - AllowOverride All - Options -MultiViews -Indexes -FollowSymLinks - Order allow,deny - Allow from all -</Directory> +%printers = ( 'Default' => 'lpr', 'Color' => 'lpr -PEpson' );-The way apache starts is it: -Blocks all access to the physical file system / -Opens access to the physical file system /var/www/html -Opens access to the physical file system /var/www/perl -Opens access to the physical file system /var/www/cgi-bin -Opens access to the physical file system /var/www/protected-cgi-bin -Opens access to the physical file system /home/*/public_html -Opens access to the physical file system /home/*/public_html/cgi-bin -Opens access to the physical file system /var/www/icons -Opens access to the physical file system /usr/share/doc - -Since you're trying to access files outside of those allowed paths, you -have to specifically allow it. It's done this way because of some past -exploits with the pathnames. Rather than trust that there will never be -another bug within apache that will let you get somewhere you don't -want, you set it up securely out of the box so that apache won't let -itself go somewhere that you don't want it to. - +Check in your /etc/printcap file for the names of available printers. +
If you have LaTeX installed set +
+ $latex = 1in sql-ledger.conf -
To send the document to the printer check the "Postscript" or "PDF" format, +enter the number of copies and click on the "Print" button. +
The printer you enter in your preferences is the default printer. +You can choose any other available printer. This makes it possible +to print from anywhere on the network to any printer. -
Note: html format is for screen preview. Use the "Print" option from your +browser to print to a printer. -
To send the document to the printer check the "Postscript" or "PDF" format, -enter the number of copies and click on the "Print" button. +
+/etc/printcap entry on the server which runs lpd + +epson:Epson\ + :sh:\ + :lp=/dev/null:\ + :sd=/var/spool/output/epson:\ + :if=/usr/libexec/lpr/epson/prnfilter:\ -The printer field is available only when you edit the user's -preferences with admin.pl. +# end of entry in /etc/printcap -
Note: html format is for screen preview. Use your browser's -print function. +# pnrfilter shell script +#!/bin/sh +# Filter for Epson Stylus -
- perl-DBD-Pg
-
- postgresql
-
- postgresql-contrib
-
- postgresql-devl
-
- postgresql-docs
-
- postgresql-libs
-
- postgresql-perl
-
- postgresql-server
-
- postgresql-test
-
-
> sux - (change to root) - -
- If not done by the installation, setup disk directory for your db:
-
# mkdir /var/lib/pgsql/data
-
# chown postgres /var/lib/pgsql/data
-
-
Note that there are man pages for initdb and pg_ctl. - -
# touch /var/log/pgsql
-
# chown postgres:postgres /var/log/pgsql
-
# sux postgres
-
-
- Initialize postgres:
-
> /usr/bin/initdb -D /var/lib/pgsql/data
-
(creating ... Success...)
-
-
- Start the postgres daemon:
-
> /usr/bin/pg_ctl -D /var/lib/pgsql/data -l /var/log/pgsql start (start db)
-
(postmaster successfully started)
-
-
- > psql -d template1
-
(Welcome ... \q to exit psql)
-
\q
-
-
- Try setting up another db user: - -
> createuser <db-user> (<db-user> should match an existing Linux user)
-
Shall the new user be allowed to create databases? (y/n) y
-
Shall the new user be allowed to create more new users? (y/n) n
-
-
Unless a problem with DBD::Pg (perl interface), postgres is ready to go. - -
> sux postgres
-
> psql template1
-
=# CREATE DATABASE my_database; (create your database)
-
=# \q
-
> cd /var/lib/pgsql/backups (assuming your backups are here)
-
The next command should have been performed earlier from the
- previous installed version of postgres and your database:
-
> pg_dump -d my_database.sql.bak (from previous ver postgres)
-
> cp my_database.sql.bak my_database.sql
-
- Use vi to change all occurrances of 'current_date' to current_date
- in file my_database.sql .
-
The vi command for this is :g/'current_date'/s//current_date/g
-
> psql my_database < my_database.sql > my_database.log
-
- Check my_database.log for errors.
-
-
# mkdir /usr/local/sql-ledger
-
# cd /usr/local/sql-ledger
-
# ./setup.pl
-
- Enter i
-
- Enter httpd owner and group if different than displayed default.
-
(Download occurs and status is displayed...)
-
-
- Surf to http://my_computer/sql-ledger/admin.pl
-
- Click enter (no password needed).
-
->Database Administration
-
- Leave fields Host and Port enpty for local installations.
-
- Enter your database name in the "Connect to" field.
-
- Enter the database user you setup (postgres, sql-ledger, etc.)
-
- Enter a password, only if a password is assigned to the database.
-
- To update an existing sql-ledger database: ->Update Database
-
Should see: The following Datasets need to be updated.
-
->Continue
-
Do more admin. You will need to setup at least one login.
-
To exit: ->Database Admin
-
-
- Surf to http://my_computer/sql-ledger/login.pl
-
- Enter the login name you just created. Main menu screen should appear.
-
Some of the applications have newer versions however the installation -instructions remain the same. Just substitute the old version with a newer -version. - - -
-AddHandler cgi-script .pl -Alias /sql-ledger/ /usr/local/www/sql-ledger/ -<Directory /usr/local/www/sql-ledger> - Options +ExecCGI -</Directory> - -<Directory /usr/local/www/sql-ledger/users> - Order Deny,Allow - Deny from All -</Directory> --
-The long version was provided by Gordon Haverland. -
-
- /usr/local/www/sql-ledger.- Remember where you have unpacked it. -
- dpkg -l | grep -i 'ii postgresql '- A typical response would be:
- ii postgresql 7.1.3-5 Object....[stuff deleted]- Indicating, that version 7.1.3 is installed (the -5 is a - Debian patch level). You can use dselect or apt-get to install - postgresql if you need to. You can visit the Debian maintainer's - page for much more information on related packages at
- http://people.debian.org/~elphick/postgresql/- Older versions of Debian's PostgreSQL installation use a file - called postmaster.init, while newer versions use a file called - postmaster.conf, either residing in /etc/postgresql. -
- # su postgres - $ createuser -d sql-ledger - ... - $ exit - # -- As shown above, we then typed "exit" after createuser was done, - to stop being the "postgres" user. The "-d" switch (you called - also use "--createdb") specifies that this user can create - databases. -
- AddHandler cgi-script .pl- Second, we need to map our SQL-Ledger installation to be easy - for users to find it (in srm.conf if separate).
- Alias /sql-ledger/ /usr/local/www/sql-ledger/- The "/" at the end of sql-ledger in both strings is important! - Next, we need to allow the server to execute files from those - directories, include things and follow links. This information - is in httpd.conf (old or new installations).
- <Directory /usr/local/www/sql-ledger> - Options ExecCGI Includes FollowSymLinks - </Directory>- If we decided to put SQL-Ledger somewhere other than - /usr/local/www/sql-ledger, we would use different paths above. -
- # cd /usr/local/www/sql-ledger - # chown www-data:www-data users templates users/members- You may get an "error" about users/members not existing. It - is safe to ignore this error. -
- /etc/init.d/apache restart-
- http://localhost/sql-ledger/admin.pl-
- http://localhost/sql-ledger/login.pl- and login as the user you created - -
check the permission for the users directory. The directory must be -set writeable for the webserver. If your webserver runs under nobody.nogroup -set it to +set writeable for the webserver. If your webserver runs ias user/group +nobody.nogroup set the directory to
-drwxrwx--x 2 johndoe nogroup 1024 May 26 16:49 users +drwx--x--x 2 nobody nogroup 1024 May 26 16:49 users or -drwx--x--x 2 nobody nogroup 1024 May 26 16:49 users -+drwxrwx--x 2 johndoe nogroup 1024 May 26 16:49 users
- AddHandler cgi-script .pl -- + AddHandler cgi-script .pl in your httpd.conf file. @@ -621,10 +416,10 @@ the frontend script couldn't figure out which browser you are using
include the terminal variable on the URL
http://localhost/sql-ledger/login.pl?terminal=lynx-
Valid terminal variables are lynx and mozilla +Valid terminal variables are lynx and mozilla -
If the tables are owned by 'john' and you enter 'mary' as the dba +
If the tables are owned by 'joe' and you enter 'mary' as the dba you might run into this problem if mary doesn't have the rights to -access tables owned by john. +access tables owned by joe.
<Directory /usr/local/sql-ledger> ++ <Directory /usr/local/sql-ledger> Options ExecCGI Includes FollowSymlinks </Directory>@@ -657,7 +453,7 @@ Enable Includes and FollowSymlinks Options in your httpd.conf file
+ $language = "de";+ +
This is a global change and applies to all logins, individual settings +may be changed by setting the language in your Preferences.
Typical setups: @@ -720,13 +522,19 @@ It matters where you install SL and how you configure your web and SQL server. The location for the users directory can be specified in sql-ledger.conf