Compare commits
2 Commits
fe1ae0a240
...
2f4c33071f
Author | SHA1 | Date |
---|---|---|
barnold | 2f4c33071f | |
barnold | 2593fc17b5 |
37
INSTALL
37
INSTALL
|
@ -23,19 +23,23 @@ These are one-time things to do, in that you can recreate and reload
|
|||
the catalog database any number of times without having to do these
|
||||
steps again.
|
||||
|
||||
Create a user to own the tables and a role to use the tables. (The
|
||||
connection limits are merely suggestions.)
|
||||
Create roles to own and manage the tables. (The connection limits are
|
||||
merely suggestions.)
|
||||
|
||||
# su - postgres
|
||||
## The table owner, must be 'pgc_owner'
|
||||
$ createuser --connection-limit=1 --createdb --echo pgc_owner
|
||||
## The table user role, must be 'pgc_user'
|
||||
$ createuser --connection-limit=5 --no-login pgc_user
|
||||
## A user who will connect as pgc_owner, named as you like,
|
||||
## e.g. your own username.
|
||||
$ createuser --connection-limit=1 irulan
|
||||
|
||||
Configure postgres to allow connection to the catalog database by your
|
||||
postgres username, e.g. "irulan". This is for the case that the
|
||||
postgres server runs on the same host. Consult postgres's excellent
|
||||
documentation for other cases.
|
||||
Configure postgres to allow "irulan" to connect to the catalog
|
||||
database as pgc_owner, so that irulan can manage the database. This
|
||||
is for the case that the postgres server runs on the same host.
|
||||
Consult postgres's excellent documentation for other cases.
|
||||
|
||||
In pg_ident.conf, add two map lines so that the end of the file resembles this:
|
||||
In pg_ident.conf, add map lines so that the end of the file resembles this:
|
||||
|
||||
# MAPNAME SYSTEM-USERNAME PG-USERNAME
|
||||
irulanmap irulan irulan
|
||||
|
@ -48,20 +52,15 @@ In pg_hba.conf, modify the second "local" line, the one following the
|
|||
|
||||
Tell postgres about these edits.
|
||||
|
||||
# systemctl reload postgres
|
||||
# systemctl reload postgresql
|
||||
|
||||
At this point "irulan" has privilege to create and drop the catalog
|
||||
database. Routine use of the database is more safely done by a
|
||||
username with lesser privilege, i.e. only the "pgc_user" role. E.g.
|
||||
as postgres, run
|
||||
|
||||
$ psql
|
||||
postgres=# grant pgc_user to fenring;
|
||||
postgres=# \q
|
||||
username with lesser privilege, i.e. only pgc_user. See pgc-www's
|
||||
INSTALL for an example (<https://tildegit.org/barnold/pgc-www>).
|
||||
|
||||
2. As the operating system user "irulan", you should now be able to
|
||||
use any of the targets in Makefile.orig to create and load the catalog
|
||||
database.
|
||||
create and load the catalog database.
|
||||
|
||||
$ make PGC_DANGEROUS=1 rebuild-db
|
||||
$ make load-catalog
|
||||
|
@ -75,7 +74,8 @@ with e.g.
|
|||
|
||||
sudo make install-modules
|
||||
|
||||
which installs under /usr/local/lib/site_perl. Alternatively do e.g.
|
||||
which installs them under /usr/local/lib/site_perl. Alternatively do
|
||||
e.g.
|
||||
|
||||
make PGC_PERL5LIB=~/.local/lib/perl5 install-modules
|
||||
|
||||
|
@ -83,4 +83,3 @@ though you'll probably need to set PER5LIB in this case before using
|
|||
the modules in your perl code.
|
||||
|
||||
Comments and questions welcome at <barnold@tilde.club>.
|
||||
|
||||
|
|
Loading…
Reference in New Issue