# Installation ceRem3-selectline-interface



## XAMPP

* Die (FULL, nicht portable!) Version mit PHP 7.0 herunterladen von: https://www.apachefriends.org/download.html
* Installieren (Komponenten: Apache, MySQL, PHP, phpMyAdmin, Fake Sendmail) nach C:\xampp
* Bitnami deaktivieren
* XAMPP Control Panel als admin starten 
* Apache und MySQL als Dienst installieren
* Apache in den Services umstellen, dass dieser mit dem Benutzer svcadmin gestartet wird. (COM-Schnittstelle Zugriff)

### MySQL
in my.ini einfügen:
```
lower_case_table_names=2
character-set-server=utf8
lc-time-names=de_CH
innodb_file_per_table
```

### Apache
in httpd.conf anpassen:
* Evtl. Portnummer (Listen und ServerName)
* DocumentRoot und Berechtigungen ändern auf C:/websites

### PHP
in php.ini anpassen:
* `short_open_tag=On`
* `max_execution_time=300`
* `memory_limit=512M`
* diese Extensions aktivieren
```
extension=php_soap.dll
extension=php_com_dotnet.dll
extension=php_sqlsrv_7_ts.dll   ; Herunterladen von https://github.com/Microsoft/msphpsql
```

### Dienste starten
MySQL und Apache starten.




## GIT
* "64-bit Git for Windows Portable" herunterladen von https://git-scm.com/download/win
* Installieren nach `C:\bin\PortableGit`
* `initial_clone.cmd`, `git_pull.cmd` und `git_checkout.cmd` nach `c:\websites` kopieren
* mit `c:\bin\puttygen.exe` einen ssh key (RSA 2048; comment="AUTODEPLOY hostname") erstellen
* private und public key speichern
* private key im openssh format speichern, kopieren nach `C:\bin\PortableGit\home\.ssh` und umbenennen nach id_rsa
* public key im gitlab eintragen
* `initial_clone.cmd` ausführen




## Schnittstelle konfigurieren
in `C:\websites\ceRem3-selectline-interface\src\FINAL\server\application\config` `config.server.example.php` kopieren nach `config.server.php` und anpassen.





## Heidisql




## Selectline-DB erweitern

SL_TRIGGERS.sql






1. Start
2. Run
3. Type "dcomcnfg"
4 Press OK
5. Expand Component Services
6. Expand Computers
7. Right click on My Computer 
8. Go to Default Properties Tab
9. Make sure Enable COM Internet Services on this computer and Enable Distributed COM on this computer are checked.
10. Set Default Authentication Level to Default
11. Set Default Impersonation Level
12. Click the COM Security tab
13. Under the Access Permissions area, click Edit Limits...
14. Make sure ANONYMOUS LOGIN has remote access allowed
15. Click Add...
16. Under the "Enter object names to select" textarea enter "Everyone"
17. Give Everyone Local Access and Remote Access
18. Press Okay
19. Click Edit Default under the Access Permissions Area
20. Make sure SELF and SYSTEM have remote access
21. Also click Add... and repeat steps 16 and 17
22. Press OK
23. Under Launch and Activation Permissions click Edit Limits...
24. Make sure the Administrator user has remote launch and remote activation checked.
25. If Everyone group does not exist follow steps 16 and 17
26. Under the Everyone group allow local launch, remote launch, local activation, and remote activation.
27. Press OK
28. Click Edit Default... under Launch and Activation Permissions
29. Make sure Administrator, INTERACTIVE, and SYSTEM have remote launch and remote activation allowed.
30. Follow steps 16 and 17 to create an Everyone group
31. In the Everyone group allow local launch, remote launch, local activation, and remote activation.






In PHP.ini
1. Open PHP.INI
2. search for com.allow.dcom
3. uncomment it and set it to true
4. Save and close PHP.ini






Service Benutzer anlegen, Benutzer im SelectLine erfassen
Service Benutzer in Gruppe Lokale Administratoren hinzufügen

1x Anmelden über RDP mit diesem Benutzer und SelectLine aufstarten -> Mandant wählen -> Menu -> Einstellungen -> COM Server -> COM Server registrieren


