Reduce CPU and Disk load of backup scripts with nice and ionice

Reduce CPU and Disk Load on Linux

Running a nightly backup script on a server system, such as a web hosting server, can result in a heavy load and longer latency for other processes, for example, HTML or .php pages load slowly during the backup because the backup script requires too many I/O or CPU resources. On Linux systems, two shell utilities ... Read more

Check and Repair All MySQL Databases on Ubuntu

MySQL Optimize and Repair

The following command can be used to check and repair all MySQL databases on a Ubuntu or Debian Linux System. I've tested the commands on Ubuntu 20.04 and Debian 10. Repair MySQL databases on Ubuntu Linux sudo mysqlcheck --defaults-file=/etc/mysql/debian.cnf --auto-repair --optimize --all-databases MySQL database repair on Debian mysqlcheck --defaults-file=/etc/mysql/debian.cnf --auto-repair --optimize --all-databases The benefit of ... Read more

How to enable port 587 (submission) in postfix

Postfix Port 587

Some internet access providers have port 25 disabled in their routers to prevent spam. If you run your own email server in a data center, you might have to enable the submission port (587) in postfix to be able to send emails from your local email client to your own mail server. Enable Submission Port ... Read more

Optimize MySQL Performance with Mysqltuner

MySQL Optimization

This short tutorial describes the steps to optimize the performance of a MySQL database with the mysqltuner script. This tool can be used for MySQL and MariaDB. Install mysqltuner The mysqltuner High-Performance MySQL Tuning Script is available as a package on Debian 10 and Ubuntu 20.04, install it with at: sudo apt install mysqltuner For ... Read more

How to add PHP support for jailed SSH users in ISPConfig 3

ISPConfig PHP Jail

Jailkit is an easy-to-use tool to create and maintain jail environments for shell users on Linux. In this guide, I will show you how to move PHP and its dependencies into the jail so that the jailed user can execute PHP scripts inside the jail on an ISPConfig server. Edit the jailkit .ini file and ... Read more

Redirect a subdomain in Apache and keep the URL in the address bar

Apache Redirect

This tutorial shows you how to use redirect rules in the Apache web server. If you want to redirect a subdomain like sub.domain.tld into a subdirectory of the website and keep the original URL in the browser location bar, you may use the following apache directive. RewriteEngine on RewriteCond %{HTTP_HOST} ^sub.domain.tld [NC] RewriteRule ^/(.*)$ /sub/$1 ... Read more

How to convert filenames or text to lowercase on the Linux command line

Linux tolower command

There is no simple 'tolower' command on the bash, but you can convert uppercase characters to lowercase with a little shell script. The script uses the tr command internally for converting the chars. Create a shell script with the name 'tolower' that converts all text that is given as a command-line argument to lower case: ... Read more