Update 'SystemToolUbuntu'
parent
64c3b4d888
commit
a4b871e80f
132
SystemToolUbuntu.md
Normal file
132
SystemToolUbuntu.md
Normal file
|
@ -0,0 +1,132 @@
|
||||||
|
# Install System Tools
|
||||||
|
|
||||||
|
## System Tools
|
||||||
|
|
||||||
|
**install and configure git with your name:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt install git
|
||||||
|
git config --global user.name "John Doe"
|
||||||
|
git config --global user.email john.doe@example.com
|
||||||
|
git config --list --show-origin
|
||||||
|
```
|
||||||
|
|
||||||
|
**other useful tools: unzip is needed vor composer tool:**
|
||||||
|
|
||||||
|
`sudo apt install curl unzip nano wget`
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
After installing PHP 7.4, run the commands below to open PHP default config file for Nginx...
|
||||||
|
|
||||||
|
**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
|
||||||
|
```
|
||||||
|
|
||||||
|
save the file and start process manager for php:\
|
||||||
|
`sudo service php7.4-fpm start`
|
||||||
|
|
||||||
|
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 service nginx reload`\
|
||||||
|
`sudo service php7.4-fpm restart`
|
||||||
|
|
||||||
|
## 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`
|
||||||
|
|
||||||
|
+ test java installation:\
|
||||||
|
`java -version`
|
||||||
|
|
||||||
|
## Installation certbot for https-certificate
|
||||||
|
|
||||||
|
+ add cerbot repository:\
|
||||||
|
`sudo add-apt-repository ppa:certbot/certbot`\
|
||||||
|
`sudo apt update`
|
||||||
|
+ install cerbot:\
|
||||||
|
`sudo apt install certbot`
|
||||||
|
+ response:\
|
||||||
|
The following NEW packages will be installed:\
|
||||||
|
certbot python3-acme python3-certbot python3-configargparse\
|
||||||
|
python3-configobj python3-future python3-icu python3-josepy python3-mock\
|
||||||
|
python3-ndg-httpsclient python3-parsedatetime python3-pbr\
|
||||||
|
python3-requests-toolbelt python3-rfc3339 python3-tz python3-zope.component\
|
||||||
|
python3-zope.event python3-zope.hookable python3-zope.interface\
|
||||||
|
0 upgraded, 19 newly installed, 0 to remove and 0 not upgraded.
|
Loading…
Reference in New Issue
Block a user