Update 2. Installation guide

This commit is contained in:
Rainer Gümpelein 2022-12-08 14:54:43 +00:00
parent e6115fe3ba
commit ef1cf04869

View file

@ -1,13 +1,15 @@
***sharee.bike copri is a apache2 mod-perl postgresql based webapplication*** **_sharee.bike copri is a apache2 mod-perl postgresql based webapplication_**
You must be familiar with linux debian, apache webserver and postgres DBMS. You must be familiar with linux debian, apache webserver and postgres DBMS.
On installation you have to be root. The postgres DBMS have to be installed with de-DE.utf-8 localization, because date style default is done in german way. On installation you have to be root. The postgres DBMS have to be installed with de-DE.utf-8 localization, because date style default is done in german way.\
On debian based Linux systems you have to install following packages On debian based Linux systems you have to install following packages
``` ```
apache2
postgresql
libapache2-mod-perl2 libapache2-mod-perl2
libapache2-reload-perl libapache2-reload-perl
perlmagick
libdbd-pg-perl libdbd-pg-perl
libcalendar-simple-perl libcalendar-simple-perl
libdate-calc-perl libdate-calc-perl
@ -30,6 +32,7 @@ libdigest-sha-perl
``` ```
Webserver apache2 needs some modules loaded Webserver apache2 needs some modules loaded
``` ```
a2enmod perl a2enmod perl
a2enmod cgi a2enmod cgi
@ -45,16 +48,18 @@ service apache2 restart
``` ```
The copri operator-instance installation is done by The copri operator-instance installation is done by
``` ```
mkdir /exports && cd /exports mkdir /exports && cd /exports
git clone https://gitlab.com/t6353/sharee.bike.git git clone https://gitlab.com/t6353/sharee.bike.git
mv sharee.bike gitlab mv sharee.bike gitlab
cd gitlab/copri4 && ./mkaccess cd gitlab/copri4 && ./mkaccess.sh
cd /var/www && ln -s ../../exports/gitlab/copri4 cd /var/www && ln -s ../../exports/gitlab/copri4
mkdir /var/log/copri4 && chown www-data /var/log/copri4 mkdir /var/log/copri4 && chown www-data /var/log/copri4
``` ```
At first setup the base copri database. You have to configure postgres to get just access by localhost. Set your postgres access rights. At first setup the base copri database. You have to configure postgres to get just access by localhost. Set your postgres access rights.
``` ```
su - postgres su - postgres
createdb sharee_operator createdb sharee_operator
@ -64,28 +69,34 @@ gunzip -c examples/sharee_operator.sql.gz | psql -U [your-psql-user] sharee_oper
``` ```
The installation has some configuration defaults and examples. You have to edit to fit your web-reachable DNS registered sharee servers. The installation has some configuration defaults and examples. You have to edit to fit your web-reachable DNS registered sharee servers.
- Operator-Instance DMS hostname is identified by "shareedms-operator.example.tld" - Operator-Instance DMS hostname is identified by "shareedms-operator.example.tld"
- Operator-Instance App API hostname is identified by "shareeapp-operator.example.tld". - Operator-Instance App API hostname is identified by "shareeapp-operator.example.tld".
- Web-Project hostname is identified by "shareeweb-operator.example.tld". - Web-Project hostname is identified by "shareeweb-operator.example.tld".
``` ```
cd /exports/gitlab/copri4 cd /exports/gitlab/copri4
edit shareeapp-operator/apache/shareeapp-operator.conf edit shareeapp-operator/apache/shareeapp-operator.conf
edit shareedms-operator/apache/shareedms-operator.conf edit shareedms-operator/apache/shareedms-operator.conf
eidt shareeweb-project/apache/shareeweb-operator.conf edit shareeweb-project/apache/shareeweb-operator.conf
``` ```
The global.cfg configuration is divided into sharp-cliped values. The global.cfg configuration is divided into sharp-cliped values.
- The `<operator>` block describes your operator-instance by operator-dbname `<sharee_operator>`. - The `<operator>` block describes your operator-instance by operator-dbname `<sharee_operator>`.
- The `<project>` block describes your optional web-project by `<shareeweb-project>`. - The `<project>` block describes your optional web-project by `<shareeweb-project>`.
- The `<merchant_ids>` block will indicate your block configuration on client request. - The `<merchant_ids>` block will indicate your block configuration on client request.
``` ```
cd /exports/gitlab/copri4/shareeconf cd /exports/gitlab/copri4/shareeconf
rm *.cfg
cp examples/apikeys.cfg . cp examples/apikeys.cfg .
cp examples/mailx.cfg . cp examples/mailx.cfg .
cp examples/global.cfg . cp examples/global.cfg .
``` ```
After configure your sharee apache confs, DNS, got SSLCertificate and set also the values in global.cfg. At last you have to softlink the sharee apache conf with: After configure your sharee apache confs, DNS, got SSLCertificate and set also the values in global.cfg. At last you have to softlink the sharee apache conf with:
``` ```
cd /etc/apache2/sites-enabled cd /etc/apache2/sites-enabled
ln -s /var/www/copri4/shareeapp-operator/apache/shareeapp-operator.conf ln -s /var/www/copri4/shareeapp-operator/apache/shareeapp-operator.conf
@ -95,17 +106,23 @@ service apache2 restart
``` ```
You should reach three webservers You should reach three webservers
1. For the bike sharing management 1. For the bike sharing management
``` ```
https://shareedms-operator.example.tld https://shareedms-operator.example.tld
``` ```
2. To get access by the shareetool web-App and also by the sharee.bike bike booking App or your self-developed App. See also the API documentation 2. To get access by the shareetool web-App and also by the sharee.bike bike booking App or your self-developed App. See also the API documentation
``` ```
https://shareeapp-operator.example.tld https://shareeapp-operator.example.tld
``` ```
3. Is the optional webhost for iframe website integration. It implements station-map, user registration formular and contact menue. 3. Is the optional webhost for iframe website integration. It implements station-map, user registration formular and contact menue.
``` ```
https://shareeweb-project.example.tld https://shareeweb-project.example.tld
``` ```
Best regards, Rainer Gümpelein (TeilRad GmbH)
https://sharee.bike Best regards, Rainer Gümpelein (TeilRad GmbH) https://sharee.bike