From d06bf668a6ee26bfa73113b3fe2616b1bfa0e9b5 Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Mon, 6 Jul 2020 18:21:39 +0200 Subject: [PATCH] install system tools for the repository on Ubuntu --- Home.md | 4 +- installs/PHP.md | 11 ++-- installs/Solr.md | 14 ----- installs/SystemToolsUbuntu.md | 103 ++++++++++++++++++++++++++++++++++ 4 files changed, 110 insertions(+), 22 deletions(-) create mode 100644 installs/SystemToolsUbuntu.md diff --git a/Home.md b/Home.md index 24b9676..ef50234 100644 --- a/Home.md +++ b/Home.md @@ -8,8 +8,8 @@ These instructions will get you a copy of the project up and running on your loc ### Install required software +* [System Tools Installation (Ubuntu)](SystemToolsUbuntu) * [Solr](Solr) -* [PHP](PHP) ## Installation @@ -46,7 +46,7 @@ Grant folder permissions for webserver user ## Local Development -To develop locally, you must run a local web server. +To develop locally, you must run a local web server. To run: `php artisan serve` diff --git a/installs/PHP.md b/installs/PHP.md index 80de16a..ffe6709 100644 --- a/installs/PHP.md +++ b/installs/PHP.md @@ -8,14 +8,13 @@ **response**\ The following additional packages will be installed:\ - libonig4\ + libgd3 libjbig0 libjpeg-turbo8 libjpeg8 libonig5 libpq5 libtiff5 libwebp6 php-common\ Suggested packages:\ - php-pear\ + libgd-tools 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. + libgd3 libjbig0 libjpeg-turbo8 libjpeg8 libonig5 libpq5 libtiff5 libwebp6 php-common 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, 21 newly installed, 0 to remove and 0 not upgraded. **php settings for nginx:** diff --git a/installs/Solr.md b/installs/Solr.md index 5584b45..091ce91 100644 --- a/installs/Solr.md +++ b/installs/Solr.md @@ -1,19 +1,5 @@ # 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/ diff --git a/installs/SystemToolsUbuntu.md b/installs/SystemToolsUbuntu.md new file mode 100644 index 0000000..528b5e7 --- /dev/null +++ b/installs/SystemToolsUbuntu.md @@ -0,0 +1,103 @@ +# Install System Tools + +## System Tools + +**install git:** + + sudo apt install git + +**install curl:** + + sudo apt install curl, unzip + +## Installation Nginx WebServer + +`sudo apt install nginx` + +**response:**\ +The following additional packages will be installed:\ + libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream nginx-common + nginx-core\ +Suggested packages:\ + fcgiwrap nginx-doc ssl-cert\ +The following NEW packages will be installed:\ + libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream nginx + nginx-common nginx-core\ +0 upgraded, 7 newly installed, 0 to remove and 10 not upgraded. + +We are going to use the systemctl command as follows to enable the nginx.service:\ +`$ sudo systemctl is-enabled nginx.service` + +If nginx.service not enabled, enable it, run:\ +`$ sudo systemctl enable nginx.service` + +## Installation PHP 7.4 + +**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:\ + libgd3 libjbig0 libjpeg-turbo8 libjpeg8 libonig5 libpq5 libtiff5 libwebp6 php-common\ +Suggested packages:\ + libgd-tools php-pear\ +The following NEW packages will be installed:\ + libgd3 libjbig0 libjpeg-turbo8 libjpeg8 libonig5 libpq5 libtiff5 libwebp6 php-common 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, 21 newly installed, 0 to remove and 0 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… + +```ini +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` + +## Installation Composer + +Download setup file:\ +`cd ~`\ +`curl -sS https://getcomposer.org/installer -o composer-setup.php` + +You can use curl to get the latest signature and save it in a shell variable:\ +`HASH='curl -sS https://composer.github.io/installer.sig'` + +Now run the following PHP code to check if the installation script can be executed safely:\ +`php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"` + +If the installer is verfied, run the setup script:\ +`sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer` + +Test your installation:\ +`composer --version` + +## 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:\ +`sudo apt update`\ +`sudo apt install adoptopenjdk-8-hotspot` + ++ Set adoptopjdk as default java version:\ +`sudo update-alternatives --config java`