Enable Serial Terminal on Debain using Grub Configuration (Grub2)

Edit /etc/default/grub, enter:

# vi /etc/default/grub

Append / modify as follows:

GRUB_CMDLINE_LINUX='console=tty0 console=ttyS0,19200n8'
GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1"

Save and close the file. Next run the following command to generate a grub2 config file /boot/grub/grub.cfg :

# update-grub

Ref:
https://www.cyberciti.biz/faq/howto-setup-serial-console-on-debian-linux/

Share

Install LetsEncrypt on Debian with Nginx Server

Install Certbot and its Nginx plugin with apt:

sudo apt install certbot python3-certbot-nginx

Certbot provides a variety of ways to obtain SSL certificates through plugins. The Nginx plugin will take care of reconfiguring Nginx and reloading the config whenever necessary. To use this plugin, type the following:

sudo certbot --nginx -d example.com -d www.example.com
Share

Installation of Collabora on Debain 12

Collabora CODE is more straightforward to install than Nextcloud. Typically, Collabora prerequisites are installed when Nextcloud is installed. To install Collabora CODE, follow the steps below:

Import the Collabora CODE signing key.

cd /usr/share/keyrings
sudo wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg

Create a source file for the Collabora CODE package repository.

sudo vi /etc/apt/sources.list.d/collaboraonline.sources

Add the following information to the file and save it.

nano /etc/apt/sources.list.d/collaboraonline.sources
Types: deb
URIs: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-ubuntu2204
Suites: ./
Signed-By: /usr/share/keyrings/collaboraonline-release-keyring.gpg

Update the repository

Read more

Share

Flushing IPTables rule and allow all traffic for Debian or Ubuntu

Flushing all iptables chain rules shell script

#!/bin/sh
echo "Stopping IPv4 firewall and allowing everyone..."
ipt="/sbin/iptables"
## Failsafe - die if /sbin/iptables not found
[ ! -x "$ipt" ] && { echo "$0: \"${ipt}\" command not found."; exit 1; }
$ipt -P INPUT ACCEPT
$ipt -P FORWARD ACCEPT
$ipt -P OUTPUT ACCEPT
$ipt -F
$ipt -X
$ipt -t nat -F
$ipt -t nat -X
$ipt -t mangle -F
$ipt -t mangle -X
$ipt -t raw -F
$ipt -t raw -X

Make sure you can execute the script using the chmod command:

Read more

Share

Install and Setup ZFS on Debian 11

The full form of ZFS is Zettabyte File System. The ZFS filesystem is a 128-bit filesystem. The ZFS supported filesystem size is 3×10(to the poer 24) TB. You may never encounter such a big filesystem in real life. The ZFS filesystem was designed to keep and access an insane amount of data.

Enabling Debian contrib Package Repository:

The ZFS filesystem packages are available in the official Debian 11 contrib package repository. The contrib package repository is not enabled on Debian 11 by default. But you can easily enable it from the command-line.

To enable the contrib package repository, open a Terminal and run the following command:

$ sudo apt-get install software-properties-common
$ sudo apt-add-repository contrib

The official Debian contrib repository should be enabled.

$ sudo apt-get update

Installing ZFS Filesystem Dependencies:

You must install the libraries that the ZFS filesystem kernel module depends on before installing the ZFS filesystem on Debian 11.

Read more

Share

Pushing Docker Images to a Docker Repository

The next logical step after creating a new image from an existing image is to share it with a select few of your friends, the whole world on Docker Hub, or other Docker registry that you have access to. To push an image to Docker Hub or any other Docker registry, you must have an account there.

This section shows you how to push a Docker image to Docker Hub. To learn how to create your own private Docker registry, check out How To Set Up a Private Docker Registry on Ubuntu 14.04.

To push your image, first log into Docker Hub.

docker login -u docker-registry-username

You’ll be prompted to authenticate using your Docker Hub password. If you specified the correct password, authentication should succeed.

Read more

Share

Docker Commands

Working with Docker Images

Docker containers are built from Docker images. By default, Docker pulls these images from Docker Hub, a Docker registry managed by Docker, the company behind the Docker project. Anyone can host their Docker images on Docker Hub, so most applications and Linux distributions you’ll need will have images hosted there.

To check whether you can access and download images from Docker Hub, type:

docker run hello-world

The output will indicate that Docker in working correctly:

Output
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:41a65640635299bab090f783209c1e3a3f11934cf7756b09cb2f1e02147c6ed8
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.
...

Docker was initially unable to find the hello-world image locally, so it downloaded the image from Docker Hub, which is the default repository. Once the image downloaded, Docker created a container from the image and the application within the container executed, displaying the message. You can search for images available on Docker Hub by using the docker command with the search subcommand. For example, to search for the Ubuntu image, type:

Read more

Share

Install Docker on Debain 10

Installing Docker

The Docker installation package available in the official Debian repository may not be the latest version. To ensure we get the latest version, we’ll install Docker from the official Docker repository. To do that, we’ll add a new package source, add the GPG key from Docker to ensure the downloads are valid, and then install the package.

First, update your existing list of packages:

sudo apt update

Next, install a few prerequisite packages which let apt use packages over HTTPS:

sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common

Then add the GPG key for the official Docker repository to your system:

Read more

Share

Installing wkhtmltopdf on Debian 7.8

Installing wkhtmltopdf on Debian 7.8 to dynamically create PDF documents from HTML.

apt-get update
aptitude install xfonts-base xfonts-75dpi fontconfig
mkdir ~/src/wkhtmltopdf -p
cd ~/src/wkhtmltopdf
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.2.1/wkhtmltox-0.12.2.1_linux-wheezy-amd64.deb
dpkg -i wkhtmltox-0.12.2.1_linux-wheezy-amd64.deb

Src:
https://fedir.github.io/web/blog/2015/09/01/install-wkhtmltopdf-on-debian-7.8
https://github.com/wkhtmltopdf/wkhtmltopdf/releases/0.12.2.1/
https://github.com/wkhtmltopdf/packaging/releases/0.12.6-1
https://stackoverflow.com/questions/38262173/how-to-correctly-install-wkhtmltopdf-on-debian-64-bit

Share