Skip to content
Snippets Groups Projects
INSTALL.md 2.68 KiB

Requirements

You need to have installed the following:

  • git
  • webserver (apache2 recommended)
  • php
  • mariadb
  • php-mysqli

Install

Start by cloning the repo:

git clone https://edugit.org/TheDutchProgrammers/MySchoolDay.git /var/www/html/MySchoolDay
cd /var/www/html/MySchoolDay

Database

Start by executing: (whilst in /var/www/html/MySchoolDay)

$ mysql -u root -p < ./myschoolday.sql

Fill in your root password. If it doesn't give any errors, then the database is created!

For security reasons I would recommend creating an user for the database instead of using the root user. You can do this by executing the following commands:

$ mysql -u root -p

Fill in the root password again, but now you will see something like this:

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is ##
Server version: 10.5.12-MariaDB-0+deb11u1 Debian 11

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)]>

Now type in the line you see the following:

CREATE USER 'myschoolday'@'localhost' IDENTIFIED BY 'CREATE_YOUR_OWN_PASSWORD';
GRANT ALL PRIVILEGES ON myschoolday.* TO 'myschoolday'@'localhost';
FLUSH PRIVILEGES;

Now press CTRL-D and you will be back in your commandline

Configuration

Go into the public/config/ folder and copy the config.template.ini to config.ini

Make the following changes:

At [database]:

  • Change db_host to localhost
  • Change db_user to myschoolday
  • Change db_password to the chosen password
  • Change db_name to myschoolday

At [application]:

  • Change app_email to the email which will be used in the futher for sending emails
  • Change app_domain to the domain where your webserver is binded to
  • Change app_folder to the folder where your myschoolday is located (E.G. /MySchoolDay/ or /) Note: ALWAYS WITH TRAILING SLASH!!!
  • Change app_language to your wanted language (check public/locale for all supported languages)
  • Change app_secret to some thing completely random: this is used for logging in

At [notification] you dont have to change anything, since it is still experimental.

Webserver

At your webserver you need to allow URLRewriting

Apache2:

<Directory /var/www/html/MySchoolDay/>
        AllowOverride All
        Require all granted
</Directory>

open your broemwse