-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathINSTALL
More file actions
70 lines (56 loc) · 2.29 KB
/
Copy pathINSTALL
File metadata and controls
70 lines (56 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
=============
Prerequisites
=============
1. Make sure Postgresql is installed
- e.g. on Fedora:
- su
- yum install postgresql postgresql-server php-pgsql
- /sbin/service postgresql initdb
- /sbin/service postgresql start
- /sbin/chkconfig postgresql on
2. Configure Postgresql to allow local access
- at end of file /var/lib/pgsql/data/pg_hba.conf:
- change "ident sameuser" to "trust" on lines starting "host"
- /sbin/service postgresql restart
3. Create a database for yourself, e.g. for username dxp:
- su
- su - postgres
- psql
create user dxp;
\du
create database dxp owner dxp;
alter user dxp with password 'topsecret';
\l
\q
=========================
Installation instructions
=========================
1. Unpack bib-db.tar.gz.
For testing purposes, you can just put this directly in a web-accessible place.
Longer term, you might want to put this somewhere else and symlink to the relevant bits.
2. Set up database tables
- cd bib-db
- psql -h localhost $USER < schema
(replace $USER with the name of your database, if not equal to your username)
(if necessary, replace "localhost" with the name of the machine hosting your database)
3. Create a blank file to store the error log
- touch errorlog
- chmod 666 errorlog
- (alternatively use setfacl or some other means to permit the web server write access)
4. Configure PHP front-end
- copy connect.php.sample to connect.php and edit according to instructions in file
- copy config.php.sample to config.php and edit according to instructions in file
5. To test, look at edit/index.php in a web browser.
===========
Other stuff
===========
* See also the examples in the "examples" directory.
* See also bib.css.
* Security: consider password protecting whichever parts of bib-db are web visible (.htacess etc.).
The files connect.php (which includes db password) and errorlog need to be readable and read/write-able, respectively, by the web server.
Consider setfacl to achieve this without making files readable by world + dog, e.g.:
- chmod 600 connect.php
- setfacl -s u::rw-,g::---,o:---,m:rw-,u:dxp:rw-,u:48:r-- connect.php
- chmod 600 errorlog
- setfacl -s u::rw-,g::---,o:---,m:rw-,u:dxp:rw-,u:48:rw- errorlog
where 48 is the uid of apache.