Merge pull request #32 from mokaddem/patch-1
chg: [install] Removed duplicated entries & syntax highlightingpull/34/head
commit
0641fd5959
|
@ -9,13 +9,13 @@ An Ubuntu server (18.04/20.04 should both work fine) - though other linux instal
|
||||||
## Cerebrate installation instructions
|
## Cerebrate installation instructions
|
||||||
|
|
||||||
It should be sufficient to issue the following command to install the dependencies:
|
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
|
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)
|
Clone this repository (for example into /var/www/cerebrate)
|
||||||
|
|
||||||
```
|
```bash
|
||||||
sudo mkdir /var/www/cerebrate
|
sudo mkdir /var/www/cerebrate
|
||||||
sudo chown www-data:www-data /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
|
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
|
Run composer
|
||||||
|
|
||||||
```
|
```bash
|
||||||
cd /var/www/cerebrate
|
cd /var/www/cerebrate
|
||||||
sudo -u www-data composer install
|
sudo -u www-data composer install
|
||||||
```
|
```
|
||||||
|
@ -31,7 +31,7 @@ sudo -u www-data composer install
|
||||||
Create a database for cerebrate
|
Create a database for cerebrate
|
||||||
|
|
||||||
From SQL shell:
|
From SQL shell:
|
||||||
```
|
```mysql
|
||||||
mysql
|
mysql
|
||||||
CREATE DATABASE cerebrate;
|
CREATE DATABASE cerebrate;
|
||||||
CREATE USER 'cerebrate'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD';
|
CREATE USER 'cerebrate'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD';
|
||||||
|
@ -41,7 +41,7 @@ FLUSH PRIVILEGES;
|
||||||
```
|
```
|
||||||
|
|
||||||
Or from Bash:
|
Or from Bash:
|
||||||
```
|
```bash
|
||||||
sudo mysql -e "CREATE DATABASE cerebrate;"
|
sudo mysql -e "CREATE DATABASE cerebrate;"
|
||||||
sudo mysql -e "CREATE USER 'cerebrate'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD';"
|
sudo mysql -e "CREATE USER 'cerebrate'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD';"
|
||||||
sudo mysql -e "GRANT USAGE ON *.* to cerebrate@localhost;"
|
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
|
Load the default table structure into the database
|
||||||
|
|
||||||
```
|
```bash
|
||||||
sudo 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
|
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 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
|
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:
|
mod_rewrite needs to be enabled:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
sudo a2enmod rewrite
|
sudo a2enmod rewrite
|
||||||
```
|
```
|
||||||
|
|
||||||
Simply modify the Datasource -> default array's username, password, database fields
|
Simply modify the Datasource -> default array's username, password, database fields
|
||||||
This would be, when following the steps above:
|
This would be, when following the steps above:
|
||||||
|
|
||||||
```
|
```php
|
||||||
'Datasources' => [
|
'Datasources' => [
|
||||||
'default' => [
|
'default' => [
|
||||||
'host' => 'localhost',
|
'host' => 'localhost',
|
||||||
|
@ -83,11 +79,11 @@ This would be, when following the steps above:
|
||||||
'password' => 'YOUR_PASSWORD',
|
'password' => 'YOUR_PASSWORD',
|
||||||
'database' => 'cerebrate',
|
'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:
|
For development installs the following can be done:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
# This configuration is purely meant for local installations for development / testing
|
# 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
|
# 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 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:
|
To log in use the default credentials below:
|
||||||
|
|
||||||
Username: admin
|
- Username: admin
|
||||||
Password: Password1234
|
- Password: Password1234
|
||||||
|
|
Loading…
Reference in New Issue