04. Configuring the system - findsorguk/findsorguk GitHub Wiki

You now need to set up the .ini files that configure and control the system. To do this, run these commands in succession:

sudo cp app/config/application.ini.template application.ini
sudo cp app/config/webservices.ini.template webservices.ini
sudo cp app/config/config.ini.template config.ini

You will also need to decide whether your application is running in development or production. By default the site is set to production (probably bad!). This is set by a line in the .htaccess file:

SetEnv APPLICATION_ENV production

You will now need to use your favourite text editor to edit these files. For example using nano below:

sudo nano [filepath]

Let's start with the application.ini file:

sudo nano app/config/application.ini

Next, edit a few variables to allow the application to connect to the mysql database, look for the array variable [development] or [production] for where you will start editing (based on your SetEnv choice earlier):

resources.db.adapter = "PDO_MYSQL"
resources.db.params.host = "hostname where database is installed eg localhost"
resources.db.params.username = "your username for the database user"
resources.db.params.password = "your password for the database user"
resources.db.params.charset = "utf8"
resources.db.params.dbname = "the database name that you created in the previous section"

As you are probably not using SSL you also need to edit line 195 of the file, changing the variable from all to match the below:

ssl.modules.require_ssl = '';

Time to move onto the config.ini file.

sudo nano app/config/config.ini

Unless you have multiple solr servers, they are all set to the same variables:

form.salt = a random phrase for security
siteurl = the url you will use for the site
solr.host = localhost
solr.port = probably 8080 or 8983
solr.path = /solr/
solr.core = objects
solr.master.host = localhost
solr.master.port = 8080 or 8983
solr.master.path = /solr/
solr.asgard.host = localhost
solr.asgard.port = 8080 or 8983
solr.asgard.path = /solr/
solr.valhalla.host = localhost
solr.valhalla.port = 8080 or 8983
solr.valhalla.path = /solr/
solr.grendel.host = localhost
solr.grendel.port = 8080 or 8983
solr.schema.path = /var/solr/findsorguk/solr/
solr.schema.file = /conf/schema.xml

and near the bottom,

auth.salt = a random phrase for security
email = false

These variables above allow your system to work. If you want to use the full array of webservices, that powers the system, you will need to register for lots of different things and then issue this command:

sudo nano /app/config/webservices.ini

You then will need to set up the correct passwords, tokens and usernames to get this working. Now you have done this, configure [solr](https://github.com/findsorguk/findsorguk/wiki/05. Setting-up-solr).