Server stats

Ifconfig Ifconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces as necessary. After that, it is usually only needed when debugging or when system tuning is needed. Netstat Netstat prints information about the Linux networking subsystem Ps ps displays information Read more…

Certbot – SSL certificates

Certbot it’s an cool tool that automatically enable HTTPS on your website deploying Let’s Encrypt certificates. How to Centos not snap – not anymore supported Snap install See the official guide https://certbot.eff.org/lets-encrypt/centosrhel7-apache To create the certificates Your certificates are deployed (usually) under /etc/letsencrypt/live/domain.tld/ cert.pem is the certificate privkey.pem is the Read more…

Backup folders

Rsync, which stands for “remote sync”, is a remote and local file synchronization tool. It uses an algorithm that minimizes the amount of data copied by only moving the portions of files that have changed. Here an example

Docker

Docker installation for centos See active containers Docker file example Build using bocker file in the same dir See all docker images Delete an image Stop a container Enter in a container and start a /bin/bash session Copy file Docker compose up and build Prune images and containers Docker service

Disable ssh root access

The first thing to do, when you setup a new server is to disable root access via ssh First you need to login with root privileges and create a new user and assign to it a new password then locate and edit you sshd_config file (usually under/etc/ssh/sshd_config) After that restart Read more…

Cron

The software utility cron also known as cron job is a time-based job scheduler in Unix-like computer operating systems. Normally the crontab util is located under /etc/crontab Locate your crontab and enter with your default editor In this case the script “test.sh” it’s executed with “root” user permission, every minutes Read more…