- modification in Home.md

- added install script for PHP, JAVA and SOLR: Solr.md and PHP.mde
Arno Kaimbacher 2020-07-02 16:52:08 +02:00
parent 7bd6dafae6
commit 00dc025835
3 changed files with 87 additions and 10 deletions

20
Home.md

@ -1,18 +1,20 @@
**TETHYS** - Data Publisher for Geoscience Austria is a digital data library and a data publisher for earth system science. Data can be georeferenced in time (date/time) and space (latitude, longitude, depth/height).
# Home
## Resources
**TETHYS** - Data Publisher for Geoscience Austria is a digital data library and a data publisher for earth system science. Data can be georeferenced in time (date/time) and space (latitude, longitude, depth/height)
* [Tutorials](Tutorials)
# Getting Started
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
### Install required software
* [Solr](installs/Solr.md)
* PHP
## Installation
Please check the official laravel installation guide for server requirements before you start. [Official Documentation](https://laravel.com/docs/6.x/installation#installation)
Clone the repository
git clone git@github.com:geolba/tethys.git
@ -47,8 +49,6 @@ Grant folder permissions for webserver user
To develop locally, you must run a local web server.
To run:
```
php artisan serve
```
`php artisan serve`
This will start the server on <http://localhost:8080> from the current working directory.
This will start the server on <http://localhost:8080> from the current working directory.

38
installs/PHP.md Normal file

@ -0,0 +1,38 @@
# PHP
**Import the ondrej/php repository by running the following command:**\
`sudo add-apt-repository ppa:ondrej/php`
**install php libraries:**\
`sudo apt install php7.4-cli php7.4-common php7.4-fpm php7.4-curl php7.4-gd php7.4-json php7.4-mbstring php7.4-opcache php7.4-readline php7.4-xml php7.4-xsl php7.4-pgsql`
**response**\
The following additional packages will be installed:\
libonig4\
Suggested packages:\
php-pear\
The following NEW packages will be installed:\
libonig4 php7.4-cli php7.4-common php7.4-curl php7.4-fpm php7.4-gd
php7.4-json php7.4-mbstring php7.4-opcache php7.4-pgsql php7.4-readline
php7.4-xml php7.4-xsl\
0 upgraded, 13 newly installed, 0 to remove and 16 not upgraded.
**php settings for nginx:**
+ Open configuration file:\
`sudo nano /etc/php/7.4/fpm/php.ini`
+ Update the configuration file with these and save…
```bash
file_uploads = On
allow_url_fopen = On
memory_limit = 128M //= default
cgi.fix_pathinfo = 0 //default = 1
upload_max_filesize = 100M //default = 2M
post_max_size = 100M //default = 8M
date.timezone = Europe/Vienna
```
Everytime you make changes to PHP configuration file, you should also restart nginx web server and PHP script… To do so, run the commands below:\
`sudo systemctl restart nginx.service`\
`sudo systemctl restart php7.4-fpm.service`

39
installs/Solr.md Normal file

@ -0,0 +1,39 @@
# SOLR
## Installation Java
+ Import the official AdoptOpenJDK GPG key by running the following command:\
`wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -`
+ Import the AdoptOpenJDK DEB repository by running the following command:\
`sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/`
+ Refresh your package list with apt-get-update and then install your chosen AdoptOpenJDK package. For example, to install OpenJDK 8 with the HotSpot VM, run:\
`apt-get install <adoptopenjdk-8-hotspot>`
+ Set adoptopjdk as default java version:\
`sudo update-alternatives --config java`
## Installation SOLR
+ cd /opt/
+ Download solr source code:\
`sudo wget https://www-eu.apache.org/dist/lucene/solr/7.7.2/solr-7.7.2.tgz`
+ extract compressed source code:
`sudo tar xzf solr-7.7.2.tgz solr-7.7.2/bin/install_solr_service.sh --strip-components=2`
+ run install script:\
`sudo bash ./install_solr_service.sh solr-7.7.2.tgz`
### Response
id: solr: no such user\
Creating new user: solr\
Adding system user 'solr' (UID 123) ...\
Adding new group 'solr' (GID 130) ...\
Adding new user 'solr' (UID 123) with group 'solr' ...\
Creating home directory '/var/solr' ...
Extracting solr-7.7.2.tgz to /opt\
Installing symlink /opt/solr -> /opt/solr-7.7.2 ...\
Installing /etc/init.d/solr script ...\
Installing /etc/default/solr.in.sh