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

pull/34/head
iglocska 2020-11-20 11:10:08 +01:00
commit cac4408512
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 13 additions and 17 deletions

View File

@ -9,13 +9,13 @@ An Ubuntu server (18.04/20.04 should both work fine) - though other linux instal
## Cerebrate installation instructions
It should be sufficient to issue the following command to install the dependencies:
```
```bash
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)
```
```bash
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
@ -23,7 +23,7 @@ sudo -u www-data git clone https://github.com/cerebrate-project/cerebrate.git /v
Run composer
```
```bash
cd /var/www/cerebrate
sudo -u www-data composer install
```
@ -31,7 +31,7 @@ sudo -u www-data composer install
Create a database for cerebrate
From SQL shell:
```
```mysql
mysql
CREATE DATABASE cerebrate;
CREATE USER 'cerebrate'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD';
@ -41,7 +41,7 @@ FLUSH PRIVILEGES;
```
Or from Bash:
```
```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;"
@ -51,31 +51,27 @@ sudo mysql -e "FLUSH PRIVILEGES;"
Load the default table structure into the database
```
```bash
sudo mysql -u cerebrate -p cerebrate < /var/www/cerebrate/INSTALL/mysql.sql
```
create your local configuration and set the db credentials
```
```bash
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:
```
```bash
sudo a2enmod rewrite
```
Simply modify the Datasource -> default array's username, password, database fields
This would be, when following the steps above:
```
```php
'Datasources' => [
'default' => [
'host' => 'localhost',
@ -83,11 +79,11 @@ This would be, when following the steps above:
'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
Create an apache config file for cerebrate / ssh key and point the document root to /var/www/cerebrate/webroot and you're good to go
For development installs the following can be done:
```
```bash
# 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/
@ -99,5 +95,5 @@ Now you can point your browser to: http://localhost:8000
To log in use the default credentials below:
Username: admin
Password: Password1234
- Username: admin
- Password: Password1234