Merge branch 'main' of github.com:cerebrate-project/cerebrate into main

pull/32/head
iglocska 2020-09-18 16:20:01 +02:00
commit 5859c1baa2
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
3 changed files with 71 additions and 16 deletions

View File

@ -2,27 +2,35 @@
An Ubuntu server (18.04/20.04 should both work fine) - though other linux installations should work too.
- apache2, mysql/mariadb, sqlite need to be installed and running
- php extensions for intl, mysql, sqlite need to be installed and running
- php extensions for intl, mysql, sqlite3, mbstring, xml need to be installed and running
- composer
## Cerebrate installation instructions
Simply clone this repository (for example into /var/www/cerebrate)
It should be sufficient to issue the following command to install the dependencies:
```
sudo apt install apache2 mariadb-server git composer php-intl php-mbstring php-dom php-xml unzip php-ldap php-sqlite3 sqlite libapache2-mod-php php-mysql
```
Clone this repository (for example into /var/www/cerebrate)
```
cd /var/www
git clone git@github.com:cerebrate-project/cerebrate.git
sudo mkdir /var/www/cerebrate
sudo chown www-data:www-data /var/www/cerebrate
sudo -u www-data git clone https://github.com/cerebrate-project/cerebrate.git /var/www/cerebrate
```
Run composer
```
cd /var/www/cerebrate
composer install
sudo -u www-data composer install
```
Create a database for cerebrate
From SQL shell:
```
mysql
CREATE DATABASE cerebrate;
@ -32,25 +40,64 @@ GRANT ALL PRIVILEGES ON cerebrate.* to cerebrate@localhost;
FLUSH PRIVILEGES;
```
Or from Bash:
```
sudo mysql -e "CREATE DATABASE cerebrate;"
sudo mysql -e "CREATE USER 'cerebrate'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD';"
sudo mysql -e "GRANT USAGE ON *.* to cerebrate@localhost;"
sudo mysql -e "GRANT ALL PRIVILEGES ON cerebrate.* to cerebrate@localhost;"
sudo mysql -e "FLUSH PRIVILEGES;"
```
Load the default table structure into the database
```
mysql -u cerebrate -p cerebrate < /var/www/cerebrate/INSTALL/mysql.sql
sudo mysql -u cerebrate -p cerebrate < /var/www/cerebrate/INSTALL/mysql.sql
```
create your local configuration and set the db credentials
```
cp -a /var/www/cerebrate/config/app_local.example.php /var/www/cerebrate/config/app_local.php
vim /var/www/cerebrate/config/app_local.php
sudo -u www-data cp -a /var/www/cerebrate/config/app_local.example.php /var/www/cerebrate/config/app_local.php
sudo -u www-data vim /var/www/cerebrate/config/app_local.php
```
Modify the Datasource -> default array's username, password, database fields
Create an apache config file for cerebrate / ssh key and point the document root to /var/www/cerebrate/webroot/index.php and you're good to go.
mod_rewrite needs to be enabled:
```
sudo a2enmod rewrite
```
Simply modify the Datasource -> default array's username, password, database fields
This would be, when following the steps above:
```
'Datasources' => [
'default' => [
'host' => 'localhost',
'username' => 'cerebrate',
'password' => 'YOUR_PASSWORD',
'database' => 'cerebrate',
```
Create an apache config file for cerebrate / ssh key and point the document root to /var/www/cerebrate/webroot/index.php and you're good to go
For development installs the following can be done:
```
# This configuration is purely meant for local installations for development / testing
# Using HTTP on an unhardened apache is by no means meant to be used in any production environment
sudo cp /var/www/cerebrate/INSTALL/cerebrate_dev.conf /etc/apache2/sites-available/
sudo ln -s /etc/apache2/sites-available/cerebrate_dev.conf /etc/apache2/sites-enabled/
sudo service apache2 restart
```
Now you can point your browser to: http://localhost:8000
To log in use the default credentials below:
username: admin
Username: admin
Password: Password1234

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -104,7 +104,7 @@
inkscape:pageshadow="2"
inkscape:zoom="0.94316065"
inkscape:cx="-374.91366"
inkscape:cy="599.30769"
inkscape:cy="472.07592"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
@ -138,7 +138,9 @@
y="124.71172"
rx="0"
ry="0"
transform="rotate(9.7671315)" />
transform="rotate(9.7671315)"
inkscape:export-xdpi="100"
inkscape:export-ydpi="100" />
<rect
style="opacity:1;fill:#531f75;fill-opacity:1;stroke:none;stroke-width:5.33961058;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect882"
@ -148,9 +150,11 @@
y="92.426346"
rx="0"
ry="0"
transform="rotate(-2.3147481)" />
transform="rotate(-2.3147481)"
inkscape:export-xdpi="100"
inkscape:export-ydpi="100" />
<rect
style="opacity:1;fill:#949ac1;fill-opacity:1;stroke:none;stroke-width:5.33961058;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="opacity:1;fill:#924da6;fill-opacity:1;stroke:none;stroke-width:5.33961058;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect882-6"
width="143.91106"
height="123.43249"
@ -158,13 +162,17 @@
y="49.343174"
rx="0"
ry="0"
transform="rotate(-14.177568)" />
transform="rotate(-14.177568)"
inkscape:export-xdpi="100"
inkscape:export-ydpi="100" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:27.83764458px;line-height:1.25;font-family:TheMix;-inkscape-font-specification:'TheMix, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;opacity:0.93000016;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.69594115"
x="-190.00131"
y="125.63807"
id="text1206"><tspan
id="text1206"
inkscape:export-xdpi="100"
inkscape:export-ydpi="100"><tspan
sodipodi:role="line"
id="tspan1204"
x="-190.00131"

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB