From 00dc025835e8e396343d5c2e6a36afcd5e769554 Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Thu, 2 Jul 2020 16:52:08 +0200 Subject: [PATCH] - modification in Home.md - added install script for PHP, JAVA and SOLR: Solr.md and PHP.mde --- Home.md | 20 ++++++++++---------- installs/PHP.md | 38 ++++++++++++++++++++++++++++++++++++++ installs/Solr.md | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 10 deletions(-) create mode 100644 installs/PHP.md create mode 100644 installs/Solr.md diff --git a/Home.md b/Home.md index 54c0318..adc0e83 100644 --- a/Home.md +++ b/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 from the current working directory. \ No newline at end of file +This will start the server on from the current working directory. diff --git a/installs/PHP.md b/installs/PHP.md new file mode 100644 index 0000000..80de16a --- /dev/null +++ b/installs/PHP.md @@ -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` diff --git a/installs/Solr.md b/installs/Solr.md new file mode 100644 index 0000000..5584b45 --- /dev/null +++ b/installs/Solr.md @@ -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 ` + ++ 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