Open jillson opened 11 years ago
Question: On Linux, I normally do my postgres admin actions using the postgres account versus making another user account have admin privileges. I noticed on your mac instructions, you just have them use the paver commands. Is this correct that on the Mac (especially since you probably installed it with your user account), this will work without having to do something like sudo su postgres paver create_db?
Correct - on Mac, the 'paver' commands works from the user account without needing sudo.
I'll check this in tomorrow-ish, but here's the process I followed tonight to build on my Fedora 18 workstation at home. Note that I did not actually configure geoserver; I was expecting this to pull in tomcat as a dependency and install stuff there, but this just pulled down a geoserver directory. Looking at the repo, I think I also want at least opengeo-server and/or opengeo-tomcat. Anyways, in case anyone wants to either verify my instructions or at least use them to bootstrap getting started:
Linux (specifically Red Hat and derivatives (e.g. CentOS / RHEL / Fedora))
(Note that Ubuntu/Debian should be rather similar using apt-get instead of yum but these have only been tested on Fedora 18 at the moment)
Unfortunately, at least with my default configuration where my user account does not have postgresql admin permissions, the paver createdb / create_db_user commands don't work out of the box. Instead: % sudo su - postgres % export PATH=$PATH:/usr/pgsql-9.3/bin % dd if=/dev/random bs=16 count=1 | base64 #or however you want to generate a password % createdb geoq_django (or whatever you have in settings.py) % echo "CREATE EXTENSION postgis;CREATE EXTENSION postgis_topology" | psql -d geoq_django % psql -d geoq_django -c "CREATE USER geoq_user WITH PASSWORD 'gHTzUJEaDt6Sl5yWdSV';" % with your text editor of choice edit ~postgres/9.3/data to add the line ABOVE the line for host all all
host geoq_django geoq_user 127.0.0.1/32 md5
% exit (to leave postgres)
% sudo /sbin/service postgresql-9.3 restart
% paver sync
Also... would it make sense to build a VM with all of this baked in (to support Windows users and others who don't want to have to setup their own environment), and as I tweeted, any idea if there's something we could get to host that?
It definitely would - we would love to have someone build one. Possibly as an Amazon AMI? Or a Heroku build?
I'm +1 for creating a VM. I can run an Amazon box (and host the VM) from my account over the weekend if it would be helpful for Saturday.
I'm looking at building on Heroku but won't have that ready for hackathon; if someone else wants to take it on, go right ahead.
Also: I found that: A) I had to break down and grant the django_user POSTGRES super_user privs to make the test_django_db behaviors work. Will comment that accordingly when I update the notes
B) I also had to install proj4-dev as otherwise libproj4.so wasn't found, which caused the polygon editting to fail in a completely unhelpful way.
Random notes from redoing this on a CentOS 6.4 VM: For CentOS, needed to install easy_install and then use that to get virtualenv (virtualenv then installs pip inside when you create it).
This issue should be merged into the chef scripts/vagrant system.
@jaycrossler -- what is the status of this issue?
Is seems that maybe the CentOS instructions should be built into the wiki for geoq?
Update install instructions for use on machines other than Macs, specifically RH / RH variants where OpenGeo provides a yum repo with postgres/postgis/geoserver and other dependencies (gdal/geos/etc)