(Last Updated On: November 27, 2018)

In this guide, we will cover the steps to install GitScrum Agile Project Management tool on Ubuntu 18.04. GitScrum is an Open Source software developed to help development teams to use Git and Scrum for task management for them to be more agile. GitScrum can be integrated with Gitlab, Github or Bitbucket version management platforms.

Installing GitScrum on Ubuntu 18.04 LTS

Below are the dependencies of GitScrum Agile Project Management tool

  • Nginx or Apache Web Server
  • MySQL, or MariaDB database server
  • PHP >= 7.1

The steps provided for installing GitScrum on Ubuntu 18.04 will also cover dependency installations.

Step 1: Install MySQL / MariaDB Database Server

GitScrum stores its data in a relational database server. This can be MySQL or MariaDB. Use any of the guides below to setup database server depending on your pick.

Install MariaDB 10.3 on Ubuntu 18.04 and CentOS 7

For MySQL installation, refer to the guides:

How to Install MySQL 8.0 on Ubuntu 18.04 / 16.04

Once the database server is installed, login to the mysql console to create a database for GitScrum:

$ mysql -u root -p

CREATE USER 'gitscrum'@'localhost' IDENTIFIED BY 'StrongPassword';
CREATE DATABASE gitscrum;
GRANT ALL ON gitscrum.* TO 'gitscrum'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
QUIT

Test connection to Database

$ mysql  -u gitscrum -p

Enter password: <ENTER PASSWORD>
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.3.11-MariaDB-1:10.3.11+maria~bionic-log mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| gitscrum            |
+--------------------+
2 rows in set (0.001 sec)
MariaDB [(none)]> QUIT

Step 2: Install PHP and required PHP extensions

The PHP version required by GitScrum is version 7.1 or higher which is satisfied by PHP available on Ubuntu 18.04 default repositories.

sudo apt install -y php php-cli php-mysql php-zip php-json php-gd php-mbstring php-curl php-xml php-pear php-bcmath php-pdo openssl

Step 3: Install Apache2 Web Server

Now that you have Database and PHP installed, the remaining dependency is Apache2 web server. Run the following command to install Apache2 on Ubuntu 18.04.

sudo apt -y install apache2 libapache2-mod-php unzip vim

Step 4: Download  Laravel GitScrum

Install Composer PHP  dependency manager.

sudo apt -y install composer

Create Composer Package:

cd /srv
composer create-project gitscrum-community-edition/laravel-gitscrum --stability=stable --keep-vcs
cd laravel-gitscrum

A success message should look below:

Generating autoload files
> Illuminate\Foundation\ComposerScripts::postInstall
> php artisan optimize
Generating optimized class loader
The compiled class file has been removed.
> php artisan key:generate
Application key [base64:07Uryjh3cYE/PZV4XgLJFmGqFYMjrQ/lGMCpEE5o8yY=] set successfully.

Clone Gitscrum code from Github

git clone https://github.com/GitScrum-Community/laravel-gitscrum.git
cd laravel-gitscrum
composer update
composer run-script post-root-package-install

Sample output:

.................
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: laravel/socialite
Discovered Package: nesbot/carbon
Discovered Package: renatomarinho/laravel-page-speed
Discovered Package: socialiteproviders/manager
Discovered Package: spatie/laravel-fractal
Package manifest generated successfully.

Step 5: Configure Gitscrum

Now that Gitscrum is installed, let’s configure it. Open the .env file to set Database credentials, URL, Git e.t.c.

1. Configure Database Credentials

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=gitscrum
DB_USERNAME=gitscrum
DB_PASSWORD=StrongPassword

2. Set Web URL

APP_URL=http://gitscrum.example.com

3. Configure Gitlab, Github or Bitbucket

You’ll need to configure your Git tool to use with GitScrum.

Configure Github

For Gitlab integration, Visit GitHub’s New OAuth Application page to create a new Gtihub App.

Application name: gitscrum
Homepage URL: URL (Same as APP_URL at .env)
Application description: gitscrum
Authorization callback URL: http://{URL is the SAME APP_URL}/auth/provider/github/callback

Grab your Application ID and Secret when done.

Configure Gitlab

Visit Gitlab new application to create a new Gitlab Application.

name: gitscrum
Redirect URI: http://{URL is the SAME APP_URL}/auth/provider/gitlab/callback
Scopes: api and read_user

Grab your Application ID and Secret when done.

Configure Bitbucket

Create a new Bitbucket OAuth Consumer and give it write permissions for repositories , issues e.t.c.

name: gitscrum
Callback URL: http://{URL is the SAME APP_URL}/auth/provider/bitbucket/callback
URL: http://{URL is the SAME APP_URL}
Uncheck (This is a private consumer)

When done with Git App creation, edit environment Variable to set credentials.

# For Github Credentials
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

# For Gitlab Credentials

GITLAB_KEY=
GITLAB_SECRET=
GITLAB_INSTANCE_URI=https://gitlab.com/

# For Bitbucker Credentials

BITBUCKET_CLIENT_ID=
BITBUCKET_CLIENT_SECRET=

4. You can optionally configure Proxy settings.

PROXY_PORT=
PROXY_METHOD=
PROXY_SERVER=
PROXY_USER=
PROXY_PASS=

Save the changes when done and close the file.

Step 6: Create the database for GitScrum & Configure Apache2

Create the database for GitScrum by running:

php artisan migrate

And finally, run the artisan command.

$ php artisan db:seed --class=SettingSeeder
Seeding: ConfigIssueEffortsTableSeeder
Seeding: ConfigPrioritiesTableSeeder
Seeding: IssueTypesTableSeeder
Seeding: ConfigStatusesTableSeeder

Configure Apache2 VirtualHost

Enable Apache2 rewrite module

sudo a2enmod rewrite
sudo  systemctl restart apache2

Create GitScrum Apache VirtualHost file

sudo vim /etc/apache2/sites-enabled/gitscrum.conf

Add

<VirtualHost *:80>
     ServerAdmin [email protected]
     DocumentRoot /srv/laravel-gitscrum/public/
     ServerName gitscrum.example.com
     ServerAlias www.gitscrum.example.com
     ErrorLog /var/log/apache2/gitscrum-error.log
     CustomLog /var/log/apache2/gitscrum-access.log combined
 
     <Directory /srv/laravel-gitscrum/public/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
     </Directory>

</VirtualHost>

Set Directory permissions:

sudo chown -R www-data:www-data /srv/laravel-gitscrum/
sudo chmod -R 775 /srv/laravel-gitscrum/

Test configuration and restart Apache

sudo apachectl configtest
sudo systemctl restart apache2

Visit your GitScrum URL to login

That’s all. You should now have GitScrum installed on Ubuntu 18.04 LTS.