diff options
author | Yorhel <git@yorhel.nl> | 2017-11-25 14:21:53 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2017-11-25 14:21:53 +0100 |
commit | 374fbc0c68dd87ed86e36593606ffa95cac25cdd (patch) | |
tree | 4bc34bccc0a4a0739f493a435cd84d9e2236ade9 /README | |
parent | cc5611465e2bc9886ba6b9a9e74efd910cde1143 (diff) |
Remove broken SQL functions from Makefile + add install instructions
Diffstat (limited to 'README')
-rw-r--r-- | README | 64 |
1 files changed, 52 insertions, 12 deletions
@@ -1,18 +1,6 @@ The VNDB.org Source Code ------------------------ - -Installation & documentation - - Documentation is lacking, you're pretty much on your own if you want to - get things running. :-( - - Development notes for specific features or ideas can be found in data/notes/. - Keep in mind, however, that these notes are often mostly technical and may - not reflect the actual (current) implementation. They do elaborate on various - design decisions and may be useful for understanding how certain things work. - - Requirements global requirements: @@ -63,6 +51,58 @@ Requirements pngcrush (optional) +Setup + + - Make sure all the required dependencies (see above) are installed + - Create a suitable data/config.pl, using data/config_example.pl as base. + - Run the build system: + + make + + - Setup a PostgreSQL server and make sure you can login with some admin user + - Initialize the VNDB database (assuming 'postgres' is a superuser): + + # Create the database & roles + psql -U postgres -f util/sql/superuser_init.sql + + # Set a password for each database role: + echo "ALTER ROLE vndb LOGIN UNENCRYPTED PASSWORD 'pwd1'" | psql -U postgres + echo "ALTER ROLE vndb_site LOGIN UNENCRYPTED PASSWORD 'pwd2'" | psql -U postgres + echo "ALTER ROLE vndb_multi LOGIN UNENCRYPTED PASSWORD 'pwd3'" | psql -U postgres + + # Now import the rest + psql -U vndb -f util/sql/all.sql + + - Update the vndb_site password in data/config.pl to whatever you set it in + the previous step. + - Configure a web server. To use a single subdomain for both static files + and the dynamic Perl code, here's a simple trick: + + mv www/* static/ + rmdir www + ln -s static www + ln -s ../util/vndb.pl www/cgi.pl + + Then use the following Apache 2.4 config: + + <Directory /path/to/vndb> + Options +ExecCGI +FollowSymLinks + AllowOverride None + Require all granted + </Directory> + + <VirtualHost *:*> + ServerName your-test-vndb + DocumentRoot "/path/to/vndb/www" + + RewriteEngine On + RewriteCond "%{DOCUMENT_ROOT}/%{REQUEST_URI}" !-s + RewriteRule ^/ /cgi.pl + + AddHandler cgi-script .pl + </VirtualHost> + + Contact IRC: #vndb @ irc.synirc.net |