To extract a file path or filename from a full path, you can use various utilities like grep, sed, awk, etc. If it’s not a list from a file or variable, you can use find, but there’s an easier way: basename – returns the filename dirname – returns the path to the file Example: … Continue reading " Linux – Get path and filename from full path"
In order to convert an existing private key to PEM format, just do the following:
For quick testing of Nginx regular expressions, you can use a ready-made docker image. To do this, you need to clone the NGINX-Demos repository: Follow to the “nginx-regex-tester” directory: And launch the container using “docker-compose“: And open the next page: http://localhost/regextester.php
List of labels You can view the list of existing labels in the following path: If this directory does not exist, then there are no labels in the system Adding a label For different file systems, the label is added differently. ext2/ext3/ext4: reiserfs: jfs: xfs: Where, “LABEL” – a unique label, “/dev/sda1” … Continue reading "Linux – Mount partition by label"
By default, CentOS uses MariaDB, to install MySQL, you need to add a repository: See the list of repositories: Install:
Download the latest version for 64-bit architecture: Install: Run in console:
We stop the mysqld service and start it with the following keys: Log in without a password: And run: Now the mysqld service running in the background needs to be stopped. We look at the process ID: Kill the process: And start the mysqld service:
To enhance cryptography, you must use the Diffie-Hellman parameter file with a length of at least 4096 bits. Let’s create a file like this: Will be added to the Nginx config file: You can use the following service to check: ssllabs.com
This script clears all firewall rules, sets standard values for chains, and opens access via SSH, HTTP and HTTPS
We look at the rules in all chains: Can be viewed in a specific chain: See the rules in NAT: