Discourse/README.SUSE

Oct 24, 2014 15:20 · 206 words · 1 minute read

README.SUSE

So it seems you installed the discourse package that we provide for openSUSE/SUSE.

Preparing PostgreSQL

$ zypper in postgresql-server postgresql-server
$ su - postgres
$ createuser -P discourse
$ createdb -O discourse discourse

Add the required postgresql extensions to the DB. We extract those at build time from the migrations. If you run migrations with a normal postgresql user, you can not add extensions during the migrations. That’s why we add them here.

$ psql discourse2 < /usr/share/doc/packages/discourse/discourse.setup.extensions.sql
$ vim /var/lib/pgsql/data/pg_hba.conf

add a line like the following above the normal local rules:

host    discourse       discourse      ::1/128                  md5

Activate our new config

$ rcpostgresql reload

or

$ rcpostgresql start

depending if postgresql is running already.

Preparing Redis

We assume no currently running Redis.

$ zypper in redis
$ cp /etc/redis/default.conf.example /etc/redis/default.conf
$ chkconfig redis on
$ rcredis start

Configuring Discourse

```` $ vim /srv/www/vhosts/discourse/config/discourse_defaults.conf


The following settings you will have to edit:

* ```db_host```
* ```db_username```
* ```db_password```
* ```hostname```
* ```smtp_address```
* ```developer_emails```

## Starting Discourse

### Sidekiq

$ systemctl enable discourse-sidekiq.service $ systemctl restart discourse-sidekiq.service


### Unicorn

One of the potential deployments options is running it with unicorn and a proxy in front of it.

$ systemctl enable discourse-unicorn.service $ systemctl restart discourse-unicorn.service ```