sharee.bike-Wiki/2.-Installation-guide.md

113 lines
3.6 KiB
Markdown
Raw Normal View History

2022-01-25 20:37:01 +01:00
***sharee.bike copri is a apache2 mod-perl postgresql based webapplication***
2022-01-27 20:20:49 +01:00
You must be familiar with linux debian, apache webserver and postgres DBMS.
2022-01-27 19:17:55 +01:00
2022-01-27 20:20:49 +01:00
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.
2022-01-25 20:37:01 +01:00
On debian based Linux systems you have to install following packages
```
2022-01-25 20:39:09 +01:00
libapache2-mod-perl2
libapache2-reload-perl
perlmagick
libdbd-pg-perl
libcalendar-simple-perl
libdate-calc-perl
libdbd-csv-perl
libspreadsheet-writeexcel-perl
libtext-csv-xs-perl
libjson-perl
libemail-mime-createhtml-perl
libemail-sender-perl
libxrender1
liburi-encode-perl
libxml-simple-perl
libio-all-perl
libdatetime-format-pg-perl
libcgi-pm-perl
libfile-copy-recursive-perl
libscalar-util-numeric-perl
libauthen-pam-perl
libnet-smtps-perl
libconfig-general-perl
libdigest-sha-perl
2022-01-25 20:47:13 +01:00
```
2022-01-27 19:17:55 +01:00
Webserver apache2 needs some modules loaded
```
a2enmod perl
a2enmod cgi
a2enmod rewrite
a2dismod mpm_event
a2enmod mpm_prefork
a2enmod headers
a2enmod ssl
a2enmod proxy
a2enmod proxy_http
service apache2 restart
```
The copri operator-instance installation is done by
2022-01-25 20:47:13 +01:00
```
2022-01-27 19:17:55 +01:00
mkdir /exports && cd /exports
2022-01-27 20:43:26 +01:00
git clone https://gitlab.com/t6353/sharee.bike.git
2022-01-27 19:17:55 +01:00
mv sharee.bike gitlab
cd gitlab/copri4 && ./mkaccess
cd /var/www && ln -s ../../exports/gitlab/copri4
mkdir /var/log/copri4 && chown www-data /var/log/copri4
```
2022-01-25 20:47:13 +01:00
2022-01-27 19:41:11 +01:00
At first setup the base copri database. You have to configure postgres to get just access by localhost. Set your postgres access rights.
2022-01-27 19:17:55 +01:00
```
su - postgres
createdb sharee_operator
exit
cd /exports/gitlab/copri4/shareeconf
gunzip -c examples/sharee_operator.sql.gz | psql -U [your-psql-user] sharee_operator
```
2022-01-25 20:47:13 +01:00
2022-01-27 19:35:08 +01:00
The installation has some configuration defaults and examples. You have to edit to fit your web-reachable DNS registered shareehost.example.tld.
2022-01-27 19:17:55 +01:00
Operator-Instance hostnames are indicated by "shareedms-operator.example.tld" and "shareeapp-operator.example.tld".
Web-Project hostname is indicated by "shareeweb-operator.example.tld".
```
cd /exports/gitlab/copri4
edit shareeapp-operator/apache/shareeapp-operator.conf
edit shareedms-operator/apache/shareedms-operator.conf
eidt shareeweb-project/apache/shareeweb-operator.conf
2022-01-25 20:47:13 +01:00
```
2022-01-27 19:35:08 +01:00
The global.cfg configuration is divided into sharp-cliped values.
The `<operator>` block describes your operator-instance by operator-dbname `<sharee_operator>`.
The `<project>` block describes your optional web-project by `<shareeweb-project>`.
The `<merchant_ids>` block will indicate your block configuration on client request.
2022-01-27 19:17:55 +01:00
```
cd /exports/gitlab/copri4/shareeconf
cp examples/apikeys.cfg .
cp examples/mailx.cfg .
cp examples/global.cfg .
```
After configure your sharee apache confs, DNS, got SSLCertificate and set also the values in global.cfg you have to softlink the sharee apache conf with
```
cd /etc/apache2/sites-enabled
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/shareeweb-project/apache/shareeweb-operator.conf
service apache2 restart
```
2022-01-27 19:35:08 +01:00
You should reach three webservers
1. For the bike sharing management
```
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
```
https://shareeapp-operator.example.tld
```
3. Is the optional webhost for iframe website integration. It implements station-map, user registration formular and contact menue.
```
https://shareeweb-project.example.tld
```
2022-01-27 19:17:55 +01:00
Best regards, Rainer Gümpelein (TeilRad GmbH)
https://sharee.bike