A word of warning
This is the "I have no idea what I'm doing; I'm just pushing buttons until the lights are on" edition. My distro of choice is Fedora, and I wanted to play with Discourse, so I tried getting it to work on my own machine for checking it out. This is probably definitely not how you would set Discourse up to actually run a public instance on Fedora or other RedHat-ish distros like CentOS, unless you feel like getting pwned.
I have never in my life used Postgres nor Ruby, so whatever I'm doing here is probably the opposite of what you should be doing. But I did manage to get a Discourse homepage at localhost:3000
, so if that's all you care about, read on.
That said
This is a pretty fresh install of Fedora 18, so chances are that I caught the necessary packages for running discourse. Here they are:
yum install ruby rubygem-bundler postgresql redis postgresql-server pgadmin3 ruby-devel libxml2-devel libxslt-devel libpqxx-devel postgresql-contrib
Run postgresql-setup initdb
, then edit /var/lib/pgsql/data/pg_hba.conf
, replacing "ident" with "trust" for the 127.0.0.1/32
and ::1/128
entries.
Next, service postgresql start
and service redis start
.
From this point on, you don't need elevated privileges anymore.
Run pgAdmin III (just type "pgad" on the activities screen). File -> Add Server. Enter "localhost" for Host (and for Name, I guess), and click Ok. The server should now be in the list on the left. Expand, right click "Databases" -> New Database. The Database name is discourse_development
. The same way, add a database named discourse_test
.
Now right click "login roles", then "New login role". Enter your user id as the role's name, and on the "privileges" tab choose "superuser" (yeah, that sounds like something your local DB admin is going to chastise you for. Do not blame me.), then "Ok". Do the same thing with the name "vagrant".
Now you can continue from https://github.com/discourse/discourse/blob/master/docs/DEVELOPER-ADVANCED.md, starting with step 6 in "First Steps" (you don't have to make any changes to the files in step 6; just copy them).