Difference between revisions of "Documentation/Setup/Installation"

From ScriptRunner
Jump to: navigation, search
m
m
Line 6: Line 6:
  
  
'''ScriptRunner Controller'''
+
'''Quick Start Guide'''
 
* Download the setup script from https://smnt-downloads.s3.eu-central-1.amazonaws.com/ScriptRunner/0.3.0.0/setup.sh.
 
* Download the setup script from https://smnt-downloads.s3.eu-central-1.amazonaws.com/ScriptRunner/0.3.0.0/setup.sh.
<pre>wget from https://smnt-downloads.s3.eu-central-1.amazonaws.com/ScriptRunner/0.3.0.0/setup.sh</pre>
+
<pre>wget https://smnt-downloads.s3.eu-central-1.amazonaws.com/ScriptRunner/0.3.0.0/setup.sh</pre>
* Edit setup.sh and change the directories and user to use for your installation.
+
* Run the downloaded setup.sh script. You will need to run this as sudo to allow it to set up any required user accounts, and to create directories to install the application in. You will be prompted to change the default user, installation directory and log directory should you wish to change the defaults.
** installationDirectory : This is the base directory for the installation, were all application file and configuration will be stored.
+
<pre>sudo sh setup.sh</pre>
** logDirectory : This will be used for all application logs. Also the recommended location for script output to be logged too.
+
* Within the setup directory in your installation, there are .sql files that can be used to set up your database. The default location for these is /opt/smnt/scriptRunner/setup/.
** applicationUser : The user the application will run as.
+
ScriptRunner only supports using DB2, MySQL or PostgreSQL. Variants of these my also work but have not been tested.
** applicationGroup : The group that the application and configuration files should have assigned as owner.
+
Use the relevant script to set up your database using your database admin account.
* Run setup.sh. This will download the latest version of the application and set up everything in place. <pre>sudo sh setup.sh</pre>
+
MySQL Example: <pre>mysql -h {databaseHost} -u {user} -p{password} < /opt/smnt/scriptRunner/setup/mysql_setup.sql</pre>
* Setup your application.cofiguration file with your environment details.
+
DB2 Example: <pre>db2 CONNECT TO {yourDatabaseInstance} USER {user} USING {password}
* Start ScriptRunner be using the init.sh script in your installation directory.
+
db2 -tf /opt/smnt/scriptRunner/setup/db2_setup.sql</pre>
<pre>sudo sh init.sh start</pre>
+
PostgreSQL Example: <pre>psql -h {databaseHost} -U {user} -d {database} -a -f /opt/smnt/scriptRunner/setup/postgres_setup.sql
* ScriptRunner should now be running in ''setup'' mode. This mode will allow you to generate the encrypted passwords needed, and validate your configuration.<br />Navigate to http(s)://(yourServerName):(yourPortNumber - default is 8080)/setup.
+
* Start ScriptRunner by using the init.sh script in your installation directory.
 +
<pre>cd /opt/smnt/scriptRunner/init.sh start</pre>
 +
* ScriptRunner should now be running in ''setup'' mode. This mode will allow you to input the rest of your configuration through the web interface.<br />Navigate to http(s)://(yourServerName/yourServerIP):(yourPortNumber - default is 8080)/setup. So if your server has an IP of 10.0.10.1 then you can access as below:
 +
<pre>http://10.0.10.1:8080/setup</pre>
 +
* Complete the Edit Database Configuration form.
 +
* Complete the Edit Global Configuration form.

Revision as of 23:01, 9 June 2020


Documentation :: Setup :: Installation

This provides a typical installation process, but consideration should be given for local installation standards and ways of working. Please read the Requirements page before starting to ensure you're aware of prerequisites such as having a suitable JRE installed.


Quick Start Guide

wget https://smnt-downloads.s3.eu-central-1.amazonaws.com/ScriptRunner/0.3.0.0/setup.sh
  • Run the downloaded setup.sh script. You will need to run this as sudo to allow it to set up any required user accounts, and to create directories to install the application in. You will be prompted to change the default user, installation directory and log directory should you wish to change the defaults.
sudo sh setup.sh
  • Within the setup directory in your installation, there are .sql files that can be used to set up your database. The default location for these is /opt/smnt/scriptRunner/setup/.

ScriptRunner only supports using DB2, MySQL or PostgreSQL. Variants of these my also work but have not been tested. Use the relevant script to set up your database using your database admin account.

MySQL Example:

mysql -h {databaseHost} -u {user} -p{password} < /opt/smnt/scriptRunner/setup/mysql_setup.sql

DB2 Example:

db2 CONNECT TO {yourDatabaseInstance} USER {user} USING {password}
db2 -tf /opt/smnt/scriptRunner/setup/db2_setup.sql

PostgreSQL Example:

psql -h {databaseHost} -U {user} -d {database} -a -f /opt/smnt/scriptRunner/setup/postgres_setup.sql
* Start ScriptRunner by using the init.sh script in your installation directory.
<pre>cd /opt/smnt/scriptRunner/init.sh start
  • ScriptRunner should now be running in setup mode. This mode will allow you to input the rest of your configuration through the web interface.
    Navigate to http(s)://(yourServerName/yourServerIP):(yourPortNumber - default is 8080)/setup. So if your server has an IP of 10.0.10.1 then you can access as below:
http://10.0.10.1:8080/setup
  • Complete the Edit Database Configuration form.
  • Complete the Edit Global Configuration form.