Quick instructions for OpenBSD (tested on openbsd 5.7, 5.8) ----------------------------------------------------------- If you run into problems, or for working with the source code, see the fully detailed INSTALLING document (either at the onemodel.org web site or in github) and go through it carefully. Please let us know if you find errors in either document. Patches welcome (see the file CONTRIBUTING)!. Do these as root (adapting to your situation if needed): pkg_add postgresql-contrib pkg_add jdk # or "pkg_add jre"; either 1.7 or 1.8 should be ok for OM. As root, run commands one at a time (not as a script), reading each line fully first: mkdir -p /var/log/postgresql chown -R _postgresql:_postgresql /var/log/postgresql /usr/bin/su - _postgresql echo 'umask 0077' >> .profile exit # to let the umask change take effect /usr/bin/su - _postgresql mkdir -p /var/postgresql/9.4/main #BUT CHANGE THE '9.4' FOR your version of postgres! For example, no need to change if you have 9.4.4, but do change if you have 9.5, to say "9.5" instead of "9.4". cd 9.4/main #BUT CHANGE THE '9.4' FOR your version of postgres, as just above. /usr/local/bin/initdb --pgdata /var/postgresql/9.4/main/ #BUT CHANGE THE '9.4' FOR your version of postgres, as just above. cp -p pg_hba.conf pg_hba.conf-original Then edit the file pg_hba.conf. Comment out all lines that are not already commented out (there were 3), and put these 5 lines at the end, substituting your username (the user that will use OM) for the 4 instances of <username>: local all _postgresql peer host om_<username> <username> 127.0.0.1/32 md5 local om_<username> <username> md5 host om_testrunner testrunner 127.0.0.1/32 password local om_testrunner testrunner password Make sure those 5 are the only un-commented lines, or that you understand the others and what they do, & whether you want that. Still as the user _postgresql, use commands like this, perhaps in a script, to start postgresql: pg_ctl start --pgdata /var/postgresql/9.4/main --log /var/log/postgresql/pg.log sleep 3 ps auxww|grep postgres # and make sure it is running, or check the log above etc, & fix it. (I didn't use the /etc/rc.d/postgres script to start postgres, because it got errors like "/etc/rc.d/rc.subr: Permission denied", or when run as root it failed saying it should have been run as the _postgresql user.) If ever needed, you can stop postgresql by running a command like this as root: sudo -u _postgresql /usr/local/bin/pg_ctl status -D /var/postgresql/9.4/main At this point you should still be logged in to a command-line as the _postgresql user. Now, substituting your username as before, run the commands: createdb om_<yourusername> psql om_<yourusername> ...then in the psql CLI application that should be running now, run these commands (substituting username as marked; and NOTE: the 'x' is an x in two single-quotes, not with any double-quote or ", and NOT with "om_" in it, ie NOT: create role om_<yourusername>..., and don't forget the semicolon): create role <yourusername> with createdb login encrypted password ''; create role t1 with createdb login encrypted password 'x'; grant create on schema public to <yourusername>; grant create on schema public to t1; create extension lo; ...and exit psql with "\q". (If you have multiple users on the system and these users are not fully trusted, see the file INSTALLING for details about the previous "grant" commands.) Now still as the postgres user, run the command: createdb om_testrunner -O testrunner Now run the command: psql om_testrunner ...and inside that psql session run this: create extension lo; ...& exit psql again with "\q". Then exit from the _postgresql account. You are responsible for local administration and backups, using the postgresql documentation as needed ( http://www/postgresql.org/docs/ ). Feel free to discuss on the mailing list for more information in case handy tips are available. I can at least provide how I back up (dump) my database if that helps. RUNNING IT:--------------------------------------------- Don't do this as root, but under your own username. Put the jar in a directory, say, /home/<yourusername>/onemodel In a terminal window, cd to that directory. Run "java -jar <thejarname>", for example (adjusting java path as needed): /usr/local/jdk-1.8.0/java -jar onemodel-0.0.6.jar If you have problems you can ^C to get out. If the terminal stops working after that, type "reset" to make it let you type normally again (due to a terminal setting bug in OM). In the source code (at github) is the script I use, called like /home/<user/onemodel/bin/om . Then for convenience I put that directory in my path by updating that user's ~/.bashrc file, since I use bash. OTHER TIPS:------------------------------------------------------- -If you make some changes in subgroups, then ESCape back to a group which suddenly doesn't look right (has too few entries or something), then you can see the right entries by ESCaping from the incorrectly displayed group then going back into it. It's an infrequent bug. If you learn a way to reproduce it consistently, let me know. Troubleshooting [note to self: add any of these to web site, remove all these from INSTALLING file?]: -Make sure you did everything above, including checking the full INSTALLING file. Triple-check it, really; a small mistake can matter. -This happened once, only after a later postgresql version was installed without fully removing the old version first: in postgresql.conf I had to change the port from 5433 to 5432 (on openbsd, that would mean first copying the file from the examples directory; see above for other such files copied for mor info). It probably was set to 5433 on installation because I still had the config files on disk from the earlier installation, so it used the next available port. -It seems unlikely, but on some systems you might have to open port 5432 for postgresql on a firewall. If this is true you probably already know. -If anyone works interactively with the same postgresql instance as is used for your OneModel installation, and OneModel seems to hang (freeze), see if someone has left a transaction uncommitted. -If something really annoying happens (due to some bug) and you can't get out, you can always ^C and go back in (and report what happened, exact details of all messages, and how to consistently reproduce it). Resources including email lists for discussion are at http://www.onemodel.org .
Copyright 2015-2024 Luke A. Call | OM Home
Contact (won't put you on a mailing list): comments@onemodel.org (but for replies see the mailing lists)
(Content generated selectively from a OneModel instance.)