How to Install NGINX and PHP 7.4 on Debian 10

Step 1: Install Nginx

Firstly install the prerequisites:

sudo apt install curl gnupg2 ca-certificates lsb-release

Then we need to add the Nginx mainline package to our repository so that when we run apt install nginx, we will download the mainline version instead of the old stable version.

echo "deb http://nginx.org/packages/mainline/debian `lsb_release -cs` nginx" 
    | sudo tee /etc/apt/sources.list.d/nginx.list

Next we need to download the signing key so that we can verify its authenticity

curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -

If it prints out OK! then you are good to go!

Now update package repositories and install Nginx:

sudo apt update
sudo apt install nginx

That’s it! You have now installed the latest release of Nginx on Debian 10. You should now start it!

sudo systemctl start nginx.service

And Don’t forget to make it automatically start on system boot as well.

sudo systemctl enable nginx.service

Step 2: Install PHP 7.4

To install PHP 7.4 we need to add repository. Since PHP 7.4 didn’t come with Debian 10 it is required to add the following repository. Write this commands:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php

Update package repositories:

sudo apt update

And now install PHP 7.4:

sudo apt install php7.4-fpm php7.4-common php7.4-mysql php7.4-gmp php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-gd php7.4-xml php7.4-cli php7.4-zip php7.4-soap php7.4-imap

It is recommended to raise the memory limit to improve the overall performance. Your PHP configuration is located in /etc/php/7.4/fpm/php.ini.

sudo vim /etc/php/7.4/fpm/php.ini

Replace it with memory_limit = 256 and save document with :wq command. How to edit files in text editor Vim you can read here: How to exit Vim? And other required commands.

Step 3: Configure Nginx

Add nginx to www-data group

sudo usermod -a -G www-data nginx

Change owner of directory to www-data

sudo chown -R www-data /usr/share/nginx/html

Go into your default.conf file

sudo vim /etc/nginx/conf.d/default.conf

Replace your existing configuration file with the one below

server {
    listen       80;
    server_name  localhost;

    root   /usr/share/nginx/html;
    index  index.php index.html index.htm;

   location / {
    if ($request_uri ~ ^/(.*)\.html$) {
        return 302 /$1;
        }
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
        location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass   unix:/var/run/php/php7.4-fpm.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

}

Restart Nginx server:

service nginx restart

Now you can cteate test file fith information about PHP version:

nano /usr/share/nginx/html/phpinfo.php
phpinfo();

In Web-browser write IP address of server:
http://192.168.1.1/phpinfo.php

That’s all Nginx Server with PHP 7.4 installed.

Change default Grub 2 theme

Different themes for Grub 2 boot loader you can find on Gnome-Look website: https://www.gnome-look.org/browse?cat=109&ord=latest

To change Grub them use three simple steps:

1. Copy folder with theme into Grub themes directory:

/boot/grub/themes

2. Edit Grub configuration file /etc/default/grub and write there GRUB_THEME parameter:

GRUB_THEME=/boot/grub/themes/theme_folder/theme.txt

3. Update Grub configuration:

update-grub

Best three Grub themes:

1. Vimix

2. Tela

3. CyberRe

You don’t need Windows anymore

Microsoft Windows is a proprietary operating system which has captured 80% personal computers in the world and using their monopoly position dictates their rules of the game.

In addition, Microsoft collects your personal information and sells it to third parties, which endangers your security.

To change the situation, many people are looking for alternative operating systems, and one such alternatives is GNU Linux.

Many years Linux was leader operating system on web servers and mainframes, but on personal computers it occupied a miserable 3%. But now the situation has changed and GNU Linux is the best free and open source alternative for proprietary Microsoft Windows.

Install monit in Debian 10 (buster)

Monit is a free open source utility for managing and monitoring, processes, files, directories and filesystems on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations.

To install Monit on Debian 10 GNU Linux (Buster) you need to add backports repository:

printf "%s\n" "deb http://ftp.de.debian.org/debian buster-backports main" | \
sudo tee /etc/apt/sources.list.d/buster-backports.list

Then update package list:

sudo apt update

And install buster-backports and monit package:

sudo apt install -t buster-backports monit

To start monit service and show running status use commands:

sudo systemctl start monit
sudo systemctl status monit

If you want to enable auto start monit when system starts use command:

sudo systemctl enable monit

Now let’s configure monit to monitoring Apache2 and Nginx services. Open monit configuration file:

sudo vim /etc/monit/monitrc

To change monitoring interval change option:

set daemon 120

To send email if monitored services is down edit this options:

set mailserver your.mail.server
set alert your.mail.address

You can enable Web-interface where you can view information about monitoring services. By default monit starts on 2812 port. Enable this two lines and change administrator password:

set httpd port 2812 and
allow admin:monit # require user 'admin' with password 'monit'

Don’t forget to open port 2812 in firewall and restart monit service:

sudo systemctl restart monit

Now open http://your-site.com:2812 and see monit web interface:

If you want to monitor some custom services on your server go to /etc/monit/conf-available and copy that configuration files to /etc/monit/conf.d:

Install Skype on Debian 10

Skype is not an open-source application, and it is not included in the default Debian repositories. We’ll install Skype using the Skype deb package.

Download Skype deb package:

wget https://go.skype.com/skypeforlinux-64.deb

When the download is complete, install Skype using command:

sudo apt install ./skypeforlinux-64.deb

Now run Skype and authorize with your login, that’s all

Install Viber on Debian 10

Step 1: install flatpak:

sudo apt install flatpak

Step 2: install Viber:

flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak --user install flathub com.viber.Viber

That’s all, scan QR code with your phone and use Viber on Debian 10!

Installing Wine 6 on Debian 10

Step 1: Enable 32 bit architecture

sudo dpkg --add-architecture i386 

Step 2: Add WineHQ repository

We will pull the latest Wine packages from WineHQ repository that is added manually. First, import GPG key:

sudo apt update
sudo apt -y install gnupg2 software-properties-common
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -

You should receive “OK” in the output. Add the Wine repository by running the following command:

sudo apt-add-repository https://dl.winehq.org/wine-builds/debian/

The command will add repository to line /etc/apt/sources.list file.

Update APT package index:

sudo apt update

Step 3: Install Wine 6 on Debian 10

After configuration of the APT repository, the final step is the actual installation of Wine 6 on Debian 10. Add Wine OBS repository:

wget -O- -q https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10/Release.key | sudo apt-key add -    
echo "deb http://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10 ./" | sudo tee /etc/apt/sources.list.d/wine-obs.list

Then install Wine from Stable branch:

sudo apt update
sudo apt install --install-recommends winehq-stable

And for latest release in staging, use:

sudo apt install winehq-staging

After installation. verify version installed.

wine --version  # Stable
wine-6.0

wine --version  # Staging
wine-6.5 (Staging)

Debian 10 – install and configure i3wm

i3 is a tiling window manager designed for X11, inspired by wmii and written in C. It supports tiling, stacking, and tabbing layouts, which it handles dynamically.

Configuration is achieved via plain text file and extending i3 is possible using its Unix domain socket and JSON based IPC interface from many programming languages.

Step 1: Install Debian 10.

Download Debian 10 .ISO image from official site: https://www.debian.org/

Step 2: Write ISO image to USB drive using program Etcher:

Step 3: Install Debian 10 on your PC.

Don’t install any other programs and desktop environments, uncheck all check boxes in installation menu. You need clear operating system without any other software.

Installation i3wm and other software:

Now you have clear oerating system with command shell.

First authorize in system with root login, change repositories to testing branch in file /etc/apt/sources.list, it is needed to get latest packages:

Upgrade your system:

apt update
apt upgrade

Install sudo and add sudo privilegies to your username:

apt install sudo
usermod -aG sudo username

Now you can logout from user root and authorize with your username login, Install file manager MC and other additional software:

sudo apt install mc vim htop screenfetch

Install X-Window-Server, I3, and other software for desktop environment:

apt install bash-completion lightdm zenity network-manager-gnome viewnior i3 xserver-xorg xbacklight conky nitrogen compton tilix firefox-esr thunar rofi flameshot

Debian 10 Install PulseAudio

PulseAudio is a network-capable sound server program. A sound server is a background process accepting sound input from one or more sources (processes, capture devices, etc.), that is able to mix and redirect those sources to one or more sinks (sound cards, remote network PulseAudio servers, or other processes).

To install PulseAudio on Debian Linux first update package repository:

sudo apt update

Next install PulseAudio:

sudo apt install pulseaudio

Now reboot your computer.

Using PulseAudio Volume Control Graphical Utility:

PulseAudio has a graphical frontend PulseAudio Volume Control, which you can use to easily configure PulseAudio sounds graphically.

It is not installed by default. Run the following command to install PulseAudio Volume Control:

sudo apt install pavucontrol

Also to change sound volume by hotkeys you need amixer utility install it by command:

apt-get install alsa-utils