diff --git a/README.md b/README.md new file mode 100644 index 000000000..b35ae1d3e --- /dev/null +++ b/README.md @@ -0,0 +1,69 @@ +# Quick Start Guide + +Assuming Ubuntu or similar + +## LDAP + install:
+ `sudo apt-get install slapd ldap-utils` + + +## PostgreSQL + install:
+ `sudo apt-get install postgresql` + + switch to user *postgres* (got created during installation):
+ `sudo -i -u postgres` + + add db user *uniworx*:
+ `createuser --interactive` + + you'll get a prompt: + + ``` + Enter name of role to add:` - [enter 'uniworx'] + Shall the new role be a superuser? (y/n)` - [not exactly sure. Guess not?] + ``` + + create database *uniworx*:
+ `createdb uniworx` + + to access the database as user *uniworx* you now need to add a new linux-user called *uniworx*:
+ `sudo adduser uniworx` + + log-in as new user *uniworx*:
+ `sudo -i -u uniworx` + + you can now use `psql uniworx` to execute SQL-commands and such. + + you might for example want to add a test-account to be able to login on the page:
+ `INSERT INTO user (plugin, ident, matrikelnummer, email, display_name) VALUES ('LDAP', '[YOUR_EMAIL_ADDRESS]', null, '[YOUR_EMAIL_ADDRESS]', '[YOUR_NAME]');` + +## stack + Install with:
+ `curl -sSL https://get.haskellstack.org/ | sh` + + setup stack and install dependencies:
+ `stack setup` + + There might be packages missing during setup. You most probably simply need to install them and try again.
+ Instructions are easy to find via search engine of your choice and the specific error you got.
+ Example from experience: For LDAP `ldab` and `lber` header files were missing. + + Build the app:
+ `stack build` + + Run the app (with environment variable DUMMY_LUGIN set to true):
+ `env DUMMY_LOGIN=true stack exec -- yesod devel` + + `Devel application launched: http://localhost:3000`
+ means you are good to go. + +*** + +# Sources and more infos + PostgreSQl:
+ https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04 + + stack:
https://docs.haskellstack.org/en/stable/README/#how-to-install + + ldap:
https://wiki.ubuntuusers.de/OpenLDAP_ab_Precise/