Zum Inhalt springen

EGW Installation und Grundkonfiguration: Unterschied zwischen den Versionen

Aus Computech CMS Wiki
 
(26 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 6: Zeile 6:
mkdir egw-BEZIRK
mkdir egw-BEZIRK
d10 egw-BEZIRK
d10 egw-BEZIRK
echo "{}" > composer.json
composer config --no-interaction allow-plugins.mglaman/composer-drupal-lenient true
composer require mglaman/composer-drupal-lenient
composer require mglaman/composer-drupal-lenient
rm composer.lock
rm composer.lock
Zeile 21: Zeile 23:
cp -R ../egw-dev/web/sites/default/settings.php web/sites/default/settings.php
cp -R ../egw-dev/web/sites/default/settings.php web/sites/default/settings.php
cp -R ../egw-dev/web/sites/default/settings.local.php web/sites/default/settings.local.php
cp -R ../egw-dev/web/sites/default/settings.local.php web/sites/default/settings.local.php
cp -R ../egw-dev/web/sites/default/settings.local.cache.php web/sites/default/settings.local.cache.php
cp -R ../egw-dev/web/sites/default/services.local.yml web/sites/default/services.local.yml
cp -R ../egw-dev/web/sites/default/services.local.yml web/sites/default/services.local.yml
cp -R ../egw-dev/web/sites/default/project_info_db.php web/sites/default/project_info_db.php
cp -R ../egw-dev/web/sites/default/project_info_db.php web/sites/default/project_info_db.php
Zeile 45: Zeile 48:




<code>drush site-install zeberliedv --account-name=admin --account-pass=admin --account-mail="s.zeberli@computech.ch" --site-mail="info@egw-BEZIRK.ch" --site-name="EGW BEZIRK"</code>
<code>drush site-install zeberliedv --account-name=admin --account-pass=admin --account-mail="s.zeberli@computech.ch" --site-mail="info@egw-BEZIRK.ch" --site-name="EGW BEZIRK"</code><br>
<code>drush config-set "system.site" uuid $(drush devel:uuid)</code>
<code>drush en devel</code><br>
<code>drush user:create editor --mail='' --password='editor</code>
<code>drush config-set -y "system.site" uuid $(drush devel:uuid)</code><br>
<code>drush user:password editor $(openssl rand -base64 24)</code>
<code>drush user:create editor --mail='' --password='editor'</code><br>
<code>drush user:password admin  $(openssl rand -base64 24)</code>
<code>drush sql-query "update users_field_data set name = 'admin', mail = 's.zeberli@computech.ch'  where uid=1"</code><br>
<code>drush cex</code></code>
<code>set EDITOR_PASS $(openssl rand -base64 24) && drush user:password editor $EDITOR_PASS && echo "editor: $EDITOR_PASS"</code><br>
<code>set ADMIN_PASS $(openssl rand -base64 24) && drush user:password admin  $ADMIN_PASS && echo "admin: $ADMIN_PASS"</code><br>
<code>drush cex</code><br>


<code>cp config/sync/system.site.yml ../../tmp/system.site.yml</code>
<code>cp config/sync/system.site.yml ../../tmp/system.site.yml</code><br>
<code>rm -rf config/</code>
<code>rm -rf config/</code><br>
<code>cp -R ../egw-dev/config ./</code>
<code>cp -R ../egw-dev/config ./</code><br>
<code>cp ../../tmp/system.site.yml config/sync/system.site.yml</code>
<code>cp ../../tmp/system.site.yml config/sync/system.site.yml</code><br>


==Apache==
==Apache==
<code>apache</code>
<code>apache</code><br>
<code>sudo sh -c 'cat egw.conf | sed 's/egw/egw-BEZIRK/g' > egw-BEZIRK.conf'</code>
<code>sudo sh -c 'cat egw.conf | sed 's/egw/egw-BEZIRK/g' > egw-BEZIRK.conf'</code><br>
<code>sudo a2ensite egw-BEZIRK.conf</code>
<code>sudo a2ensite egw-BEZIRK.conf</code><br>
<code>sudo systemctl reload apache2</code>
<code>sudo systemctl reload apache2</code><br>


==Grundeinstellungen Webseite und Configuratin Import==
==Grundeinstellungen Webseite und Configuratin Import==
<code>d10 EGW_BEZIRK</code>
<code>d10 EGW_BEZIRK</code>
<code>drush entity:delete shortcut_set</code>
 
<code>drush cim</code>
<code>drush cim -y</code>


<code>drush -y config-set system.site page.front "/node/1"</code>
<code>drush -y config-set system.site page.front "/node/1"</code>


<code>drush -y config-set update.settings notification.emails.0 drupal@computech.ch</code>
<code>drush -y config-set update.settings notification.emails.0 drupal@computech.ch</code>
<code>drush -y config-set update.settings notification.threshold security</code>
<code>drush -y config-set update.settings notification.threshold security</code>
<code>drush -y config-set update.settings check.interval_days 7</code>
<code>drush -y config-set update.settings check.interval_days 7</code>


Zeile 78: Zeile 85:
==Git Repository erstellen==
==Git Repository erstellen==
<code>git init</code>
<code>git init</code>
<code>git remote add origin git@git.zeberliedv.ch:zeberliEDV/egw-BEZIRK.git</code>
<code>git remote add origin git@git.zeberliedv.ch:zeberliEDV/egw-BEZIRK.git</code>
<code>git add .</code>
<code>git add .</code>
<code>git commit -m "Initial Commit"</code>
<code>git commit -m "Initial Commit"</code>
<code>git push -u origin master</code>
<code>git push -u origin master</code>


Zeile 109: Zeile 120:
* Benutzer '''Editor''' anlegen und das Passwort des '''admin''' Benutzers ändern. Zugangsdaten in der Systemdokuemtation hinzufügen.
* Benutzer '''Editor''' anlegen und das Passwort des '''admin''' Benutzers ändern. Zugangsdaten in der Systemdokuemtation hinzufügen.
=Config exportieren=
=Config exportieren=
<code>drush cex</code>
<code>drush cex</code><br>
<code>gitm KÜRZEL "[Feature] - Fertig installiert"</code>
<code>gitm KÜRZEL "[Feature] - Fertig installiert"</code><br>
==Vorschaulink einrichten==
==Vorschaulink einrichten==
[[Drupal online stellen#Preview_Link_erstellen|Preview Link erstellen]]
[[Drupal online stellen#Preview_Link_erstellen|Preview Link erstellen]]<br>

Aktuelle Version vom 27. Oktober 2023, 11:24 Uhr

Installation

  • für Drupal 10 angepasst -> size

Neues Verzeichnis erstellen

d10
mkdir egw-BEZIRK
d10 egw-BEZIRK
echo "{}" > composer.json
composer config --no-interaction allow-plugins.mglaman/composer-drupal-lenient true
composer require mglaman/composer-drupal-lenient
rm composer.lock
cp ../egw-dev/composer.json composer.json
cp -R ../egw-dev/patches patches/
patches
composer install
d10 egw-BEZIRK
cp ../egw-dev/.gitignore .gitignore
cp -R ../egw-dev/web/libraries web/
cp -R ../egw-dev/web/modules/custom web/modules/
cp -R ../egw-dev/web/sites/default/settings.php web/sites/default/settings.php
cp -R ../egw-dev/web/sites/default/settings.local.php web/sites/default/settings.local.php
cp -R ../egw-dev/web/sites/default/settings.local.cache.php web/sites/default/settings.local.cache.php
cp -R ../egw-dev/web/sites/default/services.local.yml web/sites/default/services.local.yml
cp -R ../egw-dev/web/sites/default/project_info_db.php web/sites/default/project_info_db.php
cp -R ../egw-dev/web/themes web/
cp -R ../egw-dev/drush/ drush
cp -R ../egw-dev/web/profiles/custom web/profiles/

Datenbank erstellen

Anpassen der Settings Dateien

settings.local.php

sudo nano web/sites/default/settings.local.php

  • Den Namen der Datenbank einsetzen.
  • memcached & redis - Settings deaktivieren / auskomentieren.

settings.php

sudo nano web/sites/default/settings.php

  • memcached & redis - Settings deaktivieren / auskomentieren.
  • Die Domains bei den trusted_host_patterns anpassen

User und Configuration Export

d10 egw-BEZIRK


drush site-install zeberliedv --account-name=admin --account-pass=admin --account-mail="s.zeberli@computech.ch" --site-mail="info@egw-BEZIRK.ch" --site-name="EGW BEZIRK"
drush en devel
drush config-set -y "system.site" uuid $(drush devel:uuid)
drush user:create editor --mail= --password='editor'
drush sql-query "update users_field_data set name = 'admin', mail = 's.zeberli@computech.ch' where uid=1"
set EDITOR_PASS $(openssl rand -base64 24) && drush user:password editor $EDITOR_PASS && echo "editor: $EDITOR_PASS"
set ADMIN_PASS $(openssl rand -base64 24) && drush user:password admin $ADMIN_PASS && echo "admin: $ADMIN_PASS"
drush cex

cp config/sync/system.site.yml ../../tmp/system.site.yml
rm -rf config/
cp -R ../egw-dev/config ./
cp ../../tmp/system.site.yml config/sync/system.site.yml

Apache

apache
sudo sh -c 'cat egw.conf | sed 's/egw/egw-BEZIRK/g' > egw-BEZIRK.conf'
sudo a2ensite egw-BEZIRK.conf
sudo systemctl reload apache2

Grundeinstellungen Webseite und Configuratin Import

d10 EGW_BEZIRK

drush cim -y

drush -y config-set system.site page.front "/node/1"

drush -y config-set update.settings notification.emails.0 drupal@computech.ch

drush -y config-set update.settings notification.threshold security

drush -y config-set update.settings check.interval_days 7

drush user-add-role 'administrator' 'admin'

Git Repository erstellen

git init

git remote add origin git@git.zeberliedv.ch:zeberliEDV/egw-BEZIRK.git

git add .

git commit -m "Initial Commit"

git push -u origin master

Frontend

  • Sprache aktivieren /admin/config/regional/language/
  • Manuell überprüfen /admin/reports/translations/

Logos ins Projekt kopieren

Logos (png / svg) vom Sharepoint (Computech Informatik AG\ABT Webdesign - Kunden\EGW Bezirke\_logo) ins Projekt kopieren.

Hosting einstellungen anpassen im dev01

http://dev01/

  • dies ist sehr wichtig, dass die daten neu gespeichert werden!

Sync hinzufügen

in Datei X:\_scripts\egw_config.sh Folgende Zeilen UNTEN ergänzen:

# egw-BEZIRK
PROJECT="egw-BEZIRK"

echo -e $GREEN'*************************************************
* '$PROJECT'
*************************************************'$NC
source /var/www/_scripts/egw_config_befehle.sh

Systemdoku erstellen

  • Systemdoku in Sharepoint erstellen
  • Benutzer Editor anlegen und das Passwort des admin Benutzers ändern. Zugangsdaten in der Systemdokuemtation hinzufügen.

Config exportieren

drush cex
gitm KÜRZEL "[Feature] - Fertig installiert"

Preview Link erstellen