mirror of
https://gitlab.com/t6353/sharee.bike.wiki.git
synced 2025-07-16 01:26:28 +02:00
Update 2. Installation guide
This commit is contained in:
parent
586a96f6c1
commit
af7e657775
1 changed files with 160 additions and 160 deletions
|
@ -1,161 +1,161 @@
|
||||||
**_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, postgres DBMS and in web programming.
|
You must be familiar with linux debian, apache webserver, postgres DBMS and in web programming.
|
||||||
|
|
||||||
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
|
apache2
|
||||||
postgresql
|
postgresql
|
||||||
libapache2-mod-perl2
|
libapache2-mod-perl2
|
||||||
libapache2-reload-perl
|
libapache2-reload-perl
|
||||||
libdbd-pg-perl
|
libdbd-pg-perl
|
||||||
libcalendar-simple-perl
|
libcalendar-simple-perl
|
||||||
libdate-calc-perl
|
libdate-calc-perl
|
||||||
libdbd-csv-perl
|
libdbd-csv-perl
|
||||||
libspreadsheet-writeexcel-perl
|
libspreadsheet-writeexcel-perl
|
||||||
libtext-csv-xs-perl
|
libtext-csv-xs-perl
|
||||||
libjson-perl
|
libjson-perl
|
||||||
libxrender1
|
libxrender1
|
||||||
liburi-encode-perl
|
liburi-encode-perl
|
||||||
libxml-simple-perl
|
libxml-simple-perl
|
||||||
libio-all-perl
|
libio-all-perl
|
||||||
libdatetime-format-pg-perl
|
libdatetime-format-pg-perl
|
||||||
libcgi-pm-perl
|
libcgi-pm-perl
|
||||||
libfile-copy-recursive-perl
|
libfile-copy-recursive-perl
|
||||||
libscalar-util-numeric-perl
|
libscalar-util-numeric-perl
|
||||||
libauthen-pam-perl
|
libauthen-pam-perl
|
||||||
libnet-smtps-perl
|
libnet-smtps-perl
|
||||||
libconfig-general-perl
|
libconfig-general-perl
|
||||||
libdigest-sha-perl
|
libdigest-sha-perl
|
||||||
wkhtmltopdf
|
wkhtmltopdf
|
||||||
```
|
```
|
||||||
|
|
||||||
Webserver apache2 needs some modules loaded
|
Webserver apache2 needs some modules loaded
|
||||||
|
|
||||||
```
|
```
|
||||||
a2enmod perl
|
a2enmod perl
|
||||||
a2enmod cgi
|
a2enmod cgi
|
||||||
a2enmod rewrite
|
a2enmod rewrite
|
||||||
a2dismod mpm_event
|
a2dismod mpm_event
|
||||||
a2enmod mpm_prefork
|
a2enmod mpm_prefork
|
||||||
a2enmod headers
|
a2enmod headers
|
||||||
a2enmod ssl
|
a2enmod ssl
|
||||||
a2enmod proxy
|
a2enmod proxy
|
||||||
a2enmod proxy_http
|
a2enmod proxy_http
|
||||||
|
|
||||||
service apache2 restart
|
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 /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/copri-bike && chown www-data /var/log/copri-bike
|
||||||
```
|
```
|
||||||
|
|
||||||
Mainly for the frontend user-interface we use some external open-source icons and javascript - css libraries that can be included via the respective CDN or by download via the "copri4external" path. In the configuration file "global.cfg" there are some variables named bootstrap and jquery whose values have to be adjusted according to the library versions.
|
Mainly for the frontend user-interface we use some external open-source icons and javascript - css libraries that can be included via the respective CDN or by download via the "copri4external" path. In the configuration file "global.cfg" there are some variables named bootstrap and jquery whose values have to be adjusted according to the library versions.
|
||||||
```
|
```
|
||||||
mkdir /var/www/copri4external && cd /var/www/copri4external
|
mkdir /var/www/copri4external && cd /var/www/copri4external
|
||||||
```
|
```
|
||||||
In this directory we will keep some external ressources. Some have to be unzipped.
|
In this directory we will keep some external ressources. Some have to be unzipped.
|
||||||
1. Download the latest stable bootstrap version for example from https://getbootstrap.com.
|
1. Download the latest stable bootstrap version for example from https://getbootstrap.com.
|
||||||
2. Download bootstrap-icons from https://icons.getbootstrap.com.
|
2. Download bootstrap-icons from https://icons.getbootstrap.com.
|
||||||
3. Download the latest stable jquery library from https://jquery.com.
|
3. Download the latest stable jquery library from https://jquery.com.
|
||||||
4. Download the latest stable jquery-ui library from https://jqueryui.com.
|
4. Download the latest stable jquery-ui library from https://jqueryui.com.
|
||||||
|
|
||||||
The library path and filenames must be configured in global.cfg, more about this below.
|
The library path and filenames must be configured in global.cfg, more about this below.
|
||||||
```
|
```
|
||||||
cd /var/www/copri4/main
|
cd /var/www/copri4/main
|
||||||
ln -s /var/www/copri4external external
|
ln -s /var/www/copri4external external
|
||||||
chgrp -R www-data external/*
|
chgrp -R www-data external/*
|
||||||
```
|
```
|
||||||
For the creation of PDF files we use the program "wkhtmltopdf".
|
For the creation of PDF files we use the program "wkhtmltopdf".
|
||||||
```
|
```
|
||||||
cd /var/www/copri4/main/src
|
cd /var/www/copri4/main/src
|
||||||
ln -s /usr/bin/wkhtmltopdf wkhtmltopdf-amd64
|
ln -s /usr/bin/wkhtmltopdf wkhtmltopdf-amd64
|
||||||
```
|
```
|
||||||
|
|
||||||
Setup the base copri database. You have to configure postgres to get just access by localhost. Set your postgres access rights.
|
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
|
||||||
exit
|
exit
|
||||||
cd /exports/gitlab/copri4/shareeconf
|
cd /exports/gitlab/copri4/shareeconf
|
||||||
gunzip -c examples/sharee_operator.sql.gz | psql -U your_psql_user sharee_operator
|
gunzip -c examples/sharee_operator.sql.gz | psql -U your_psql_user sharee_operator
|
||||||
```
|
```
|
||||||
|
|
||||||
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" and the helper hostname "shareedms-operator1.example.tld"
|
- Operator-Instance DMS hostname is identified by "shareedms-operator.example.tld" and the helper hostname "shareedms-operator1.example.tld"
|
||||||
- Operator-Instance App API hostname is identified by "shareeapp-operator.example.tld" and the helper hostname "shareeapp-operator1.example.tld".
|
- Operator-Instance App API hostname is identified by "shareeapp-operator.example.tld" and the helper hostname "shareeapp-operator1.example.tld".
|
||||||
- Web-Project hostname is identified by "shareeweb-operator.example.tld" and the helper hostname "shareeweb-project1.example.tld".
|
- Web-Project hostname is identified by "shareeweb-operator.example.tld" and the helper hostname "shareeweb-project1.example.tld".
|
||||||
|
|
||||||
There is until now a restriction in the naming of the server hostnames, because to differ the kind of copri application and take the right configuration. Please keep the first part hostname, so "shareedms-" and "shareeapp-" and "shareeweb-" have to be kept.
|
There is until now a restriction in the naming of the server hostnames, because to differ the kind of copri application and take the right configuration. Please keep the first part hostname, so "shareedms-" and "shareeapp-" and "shareeweb-" have to be kept.
|
||||||
|
|
||||||
```
|
```
|
||||||
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
|
||||||
edit 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
|
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 setup all ressources make and check some file access rights by
|
After setup all ressources make and check some file access rights by
|
||||||
```
|
```
|
||||||
cd /var/www/copri4 && ./mkaccess.sh
|
cd /var/www/copri4 && ./mkaccess.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
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
|
||||||
ln -s /var/www/copri4/shareedms-operator/apache/shareedms-operator.conf
|
ln -s /var/www/copri4/shareedms-operator/apache/shareedms-operator.conf
|
||||||
ln -s /var/www/copri4/shareeweb-project/apache/shareeweb-operator.conf
|
ln -s /var/www/copri4/shareeweb-project/apache/shareeweb-operator.conf
|
||||||
service apache2 restart
|
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
|
||||||
```
|
```
|
||||||
Pre-configured operator admin account for first simple start. Please change login and password after setup!
|
Pre-configured operator admin account for first simple start. Please change login and password after setup!
|
||||||
```
|
```
|
||||||
Login: admin@example.tld
|
Login: admin@example.tld
|
||||||
PW: Please_Change4
|
PW: Please_Change4
|
||||||
```
|
```
|
||||||
|
|
||||||
Best regards, Rainer Gümpelein (TeilRad GmbH) https://sharee.bike
|
Best regards, Rainer Gümpelein (TeilRad GmbH) https://sharee.bike
|
Loading…
Add table
Add a link
Reference in a new issue