From f7702e4cb4e984cec2d38c794b64c30d04598e9a Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Tue, 17 Nov 2020 14:47:26 +0100 Subject: [PATCH 1/2] chg: [install] Removed duplicated entries --- INSTALL/INSTALL.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/INSTALL/INSTALL.md b/INSTALL/INSTALL.md index 318bda8..6d07f89 100644 --- a/INSTALL/INSTALL.md +++ b/INSTALL/INSTALL.md @@ -62,10 +62,6 @@ sudo -u www-data cp -a /var/www/cerebrate/config/app_local.example.php /var/www/ 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: ``` @@ -83,7 +79,7 @@ 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: @@ -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 From 9626ab311951b1d5368538aff844a69c2b0f2609 Mon Sep 17 00:00:00 2001 From: mokaddem Date: Tue, 17 Nov 2020 14:56:56 +0100 Subject: [PATCH 2/2] chg: [install] Added syntax highlighting --- INSTALL/INSTALL.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/INSTALL/INSTALL.md b/INSTALL/INSTALL.md index 6d07f89..2dd5675 100644 --- a/INSTALL/INSTALL.md +++ b/INSTALL/INSTALL.md @@ -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,27 +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 ``` 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,7 +83,7 @@ Create an apache config file for cerebrate / ssh key and point the document root 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/