X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=sql-ledger%2Fold%2Fsql-ledger%2Fdoc%2Ffaq.html;fp=sql-ledger%2Fold%2Fsql-ledger%2Fdoc%2Ffaq.html;h=0000000000000000000000000000000000000000;hp=0f6f237cae16ba205539f564fcae1d46bca6806a;hb=0554f5dec1d99c9be70b2a0b841b5327db917dbe;hpb=ac9a5336dd181bc617710a09effc3efa1a0d5932 diff --git a/sql-ledger/old/sql-ledger/doc/faq.html b/sql-ledger/old/sql-ledger/doc/faq.html deleted file mode 100644 index 0f6f237ca..000000000 --- a/sql-ledger/old/sql-ledger/doc/faq.html +++ /dev/null @@ -1,747 +0,0 @@ -
- # for Apache 2 we escape strings twice -# if (($ENV{SERVER_SOFTWARE} =~ /Apache\/2/) && !$beenthere) { -# $str = $self->escape($str, 1); -# } -- - -
setup.pl does not check for missing software packages and it is your -responsibility to make sure you have the required pieces -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 - -
-local all trust- -
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' -- - -
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. - - -
$ w3m -F http://localhost/sql-ledger/login.pl?terminal=mozilla- -To use without frames -
$ w3m http://localhost/sql-ledger/login.pl?terminal=lynx- -
-Alias /sql-ledger/ "C:/apache/sql-ledger/" -<Directory "c:/apache/sql-ledger"> - AllowOverride All - AddHandler cgi-script .pl - Options +ExecCGI - Order Allow,Deny - Allow from All -</Directory> - -<Directory "c:/apache/sql-ledger/users"> - Order Deny,Allow - Deny from All -</Directory> -- -
-AddHandler cgi-script .pl -Alias /sql-ledger/ /var/www/sql-ledger/ -<Directory /var/www/sql-ledger> - Options +ExecCGI -</Directory> - -<Directory /var/www/sql-ledger/users> - Order Deny,Allow - Deny from All -</Directory> --
-<Directory /usr/local/sql-ledger> - AllowOverride All - Options -MultiViews -Indexes -FollowSymLinks - Order allow,deny - Allow from all -</Directory> - -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. -- - -
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 field is available only when you edit the user's -preferences with admin.pl. - -
Note: html format is for screen preview. Use your browser's -print function. - - -
- 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 -
-drwxrwx--x 2 johndoe nogroup 1024 May 26 16:49 users - -or - -drwx--x--x 2 nobody nogroup 1024 May 26 16:49 users -- - -
- AddHandler cgi-script .pl -- -in your httpd.conf file. - - -
include the terminal variable on the URL -
- http://localhost/sql-ledger/login.pl?terminal=lynx-
Valid terminal variables are lynx and mozilla - - -
- users/ - templates/ - users/members - - # chown nobody:nogroup users templates users/members -- - -
If the tables are owned by 'john' 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. - - -
<Directory /usr/local/sql-ledger> - Options ExecCGI Includes FollowSymlinks - </Directory> -- - -
-
- Typical setups: - - /usr/local/vh/www <- DocumentRoot for virtual host - /usr/local/vh/sql-ledger <- Alias for sql-ledger - /usr/local/vh/users <- users directory out of reach - -- -The location for the users directory can be specified in sql-ledger.conf - -
- /usr/local/vh/www <- DocumentRoot for virtual host - /usr/local/vh/www/sql-ledger <- Alias for sql-ledger - /usr/local/vh/www/sql-ledger/users <- users configuration files and tmp space - - <Directory /usr/local/vh/www/sql-ledger/users> <- disable webserver access - Order Deny,Allow for users directory - Deny from All - </Directory> - -