How to Install GitScrum on Ubuntu Linux with Apache

|

|

This tutorial explains how to install GitScrum on Ubuntu by using Apache2 HTTP server. GitScrum is a project management tool useful for business having extensive data and diverse teams. The tutorial further extends the setup by installing Apache2 HTTP Server, MariaDB Database Server, PHP 7.2 and related modules, and also setting up a GitScrum database.…

This brief tutorial shows students and new users how to install GitScrum on Ubuntu 18.04 | 16.04 with an Apache2 HTTP server.

GitScrum is a project management tool that will help you easily manage your complex projects; when your business deals with extensive data with diverse teams, a robust project management tool with cool features should help you keep your work going while keeping your team’s operation mode.

With GitScrum, businesses can triage and distribute work across teams in different departments based on emails, calls, orders, projects, tasks, reminders, calendar events, and more.

Whether you’re a small or large enterprise, GitScrum can help your team communicate and collaborate. And these conversations will be available on the desktop, mobile devices, and everywhere you have GitScrum installed.

For more about GitScrum, please check their Homepage

To get started with installing GitScrum, follow the steps below:

Install Apache2 HTTP Server

GitScrum is a web server, and the Apache2 HTTP server is the most popular open-source web server available today. To install and use Apache2 with GitScrum, run the commands below:

sudo apt update
sudo apt install apache2

After installing Apache2, the commands below can stop, start, and enable the Apache2 service to always start up with the server boots.

sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service

To test whether Apache2 is installed and working, simply open your browser and browse to the hostname or IP address of the server.

http://localhost

After browsing the server hostname and seeing a page similar to the above, Apache2 works as expected.

Install MariaDB Database Server

GitScrum also requires a database server to store its content. MariaDB is a great place to start if you’re looking for a truly open-source database server.

To install MariaDB, run the commands below:

sudo apt-get install mariadb-server mariadb-client

After installing MariaDB, the commands below can stop, start, and enable the service to start when the server boots.

Run these on Ubuntu 16.04 LTS

sudo systemctl stop mysql.service
sudo systemctl start mysql.service
sudo systemctl enable mysql.service

Run these on Ubuntu 18.04 LTS

sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

To secure the MariaDB database server, run the command below. This will allow you to set a root password, remove anonymous users, disable remote root login, and more.

sudo mysql_secure_installation

When prompted, answer the questions below by following the guide.

  • Enter current password for root (enter for none): Just press the Enter
  • Set root password? [Y/n]: Y
  • New password: Enter password
  • Re-enter new password: Repeat password
  • Remove anonymous users? [Y/n]: Y
  • Disallow root login remotely? [Y/n]: Y
  • Remove test database and access it. [Y/n]:  Y
  • Reload privilege tables now? [Y/n]:  Y

Once MariaDB is installed, run the commands below to test whether the database server was installed.

sudo mysql -u root -p

Type the root password when prompted.

The server was successfully installed if you see a similar screen.

Install PHP 7.2 and Related Modules

GitScrum is a PHP-based app, and PHP is required. However, PHP 7.2 may not be available in Ubuntu’s default repositories. To run PHP 7.2 on Ubuntu 16.04 and previous, you may need to run the commands below:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php

Then update and upgrade to PHP 7.2

sudo apt update

Next, run the commands below to install PHP 7.2 and related modules.

sudo apt install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mailparse php7.2-mysql php7.2-gmp php7.2-curl php7.2-mbstring php7.2-imap php7.2-ldap php7.2-gd php7.2-xml php7.2-cli php7.2-zip php7.2-yaml php7.2-dev php-pear

After installing PHP 7.2, run the commands below to open the PHP default configuration file for Apache2.

sudo nano /etc/php/7.2/apache2/php.ini

The lines below are a good setting for most PHP-based CMS. Update the configuration file with these and save.

file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Chicago

Every time you change the PHP configuration file, you should restart the Apache2 web server. To do so, run the commands below:

sudo systemctl restart apache2.service

Once PHP is installed, create a test file called phpinfo.php in the Apache2 default root directory to test whether it’s functioning. ( /var/www/html/)

sudo nano /var/www/html/phpinfo.php

Then, type the content below and save the file.

<?php phpinfo( ); ?>

Next, open your browser and browse to the server’s hostname or IP address, followed by phpinfo.php

http://localhost/phpinfo.php

You should see the PHP default test page.

Create GitScrum Database

Now that you’ve installed all the packages required for GitScrum to function, continue below to start configuring the servers. First, run the commands below to create a blank GitScrum database.

To log on to the MariaDB database server, run the commands below.

sudo mysql -u root -p

Then, create a database called gitscrum

CREATE DATABASE gitscrum;

Create a database user called gitscrumuser with a new password

CREATE USER 'gitscrumuser'@'localhost' IDENTIFIED BY 'new_password_here';

Then, grant the user full access to the database.

GRANT ALL ON gitscrum.* TO 'gitscrumuser'@'localhost' WITH GRANT OPTION;

Finally, save your changes and exit.

FLUSH PRIVILEGES;
EXIT;

Download GitScrum’s Latest Release

To get GitScrum’s latest release, you may want to use Composer. Composer allows you to download and manage packages and their dependencies easily.

To install Composer on Ubuntu, run the commands below:

sudo apt install curl git
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

After installing Composer above, change the Apache2 home directory and download GitScrum packages into a new project folder called gitscrum.

cd /var/www/
sudo composer create-project gitscrum-community-edition/laravel-gitscrum --stability=stable --keep-vcs

After running the commands above, you should see similar lines as below:

Output:
> 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:wQdCK1zYGHJM6l8nGqd9smgumbTCBQxRfFjCA2GUDlM=] set successfully.

Next, change into the new folder and update GitScrum packages with the following commands.

cd /var/www/laravel-gitscrum
sudo composer update
sudo composer run-script post-root-package-install

To integrate GitScrum with Github, you’ll have to sign into GitHub and create an app.

To do that, click the link below to create a new app in Github.

https://github.com/settings/applications/new

After registering, the new app should give you a Click ID and a Secret. Copy these two details and open the GitScrum .env file in its home directory.

sudo nano /var/www/laravel-gitscrum/laravel-gitscrum/.env

Add the highlighted details and save.

APP_ENV=local
APP_KEY=base64:W2ToyfW8zHqtWfcerter2kZgccbuy3XrtirwERDyZywtVkE=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://gitscrum.example.com
APP_TITLE=GitScrum
APP_LANG=en

GITHUB_CLIENT_ID=13243c49494875180763529d
GITHUB_CLIENT_SECRET=4984b059b453eaef8938374493490f313f6b79219

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

BITBUCKET_CLIENT_ID=
BITBUCKET_CLIENT_SECRET=

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=gitscrum
DB_USERNAME=gitscrumuser
DB_PASSWORD=database_password_here

APP_PAGINATE=10

PROXY_PORT=
PROXY_METHOD=
PROXY_SERVER=
PROXY_USER=
PROXY_PASS=

SLACK_CHANNEL=channel-name
SLACK_BOT_NAME=bot-name
SLACK_WEBHOOK=endpoint

Exit and save

After that, run the commands below;

sudo php artisan migrate
sudo php artisan db:seed --class=SettingSeeder

Since you just ran the web server as root, you should ensure the www-data user and group own any newly created files. To do that, run the commands below:

sudo chown -R www-data:www-data /var/www/laravel-gitscrum/
sudo chmod -R 755 /var/www/laravel-gitscrum/

Configure Apache2 Virtual Host

Finally, configure the Apahce2 virtual host configuration file for GitScrum. This file will control how users access GitScrum content. Run the commands below to create a new configuration file called gitscrum.conf.

sudo nano /etc/apache2/sites-available/gitscrum.conf

Then copy and paste the content below into the file and save it. Replace the highlighted line with your domain name and directory root location.

<VirtualHost *:80>
     ServerAdmin admin@example.com
     DocumentRoot /var/www/laravel-gitscrum/public
     ServerName gitscrum.example.com
     ServerAlias www.gitscrum.example.com

     <Directory /var/www/laravel-gitscrum/public>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Save the file and exit.

Enable the GitScrum

After configuring the VirtualHost above, please enable it by running the commands below.

sudo a2ensite gitscrum.conf
sudo systemctl restart apache2.service

Next, open your browser and browse to the host’s domain name or server IP address—setup wizard.

Login with your GitHub account and begin setting up your environment.

http://gitscrum.example.com/

Conclusion:

This post shows you how to install GitScrum on Ubuntu 18.04 | 16.04. If you find any error, please report it in the comment form below.

You may also like the post below:


Discover more from Geek Rewind

Subscribe to get the latest posts to your email.

Like this:



Leave a Reply

Discover more from Geek Rewind

Subscribe now to keep reading and get access to the full archive.

Continue reading