Showing posts with label MySQL. Show all posts
Showing posts with label MySQL. Show all posts

Wednesday, June 3, 2020

How to Install Virtualmin with Multiple PHP and MySQL Versions on CentOS 8

Deploying a production web hosting stack on CentOS 8 with Virtualmin requires modern multi-PHP support (allowing legacy applications to run PHP 5.6 or 7.2 while modern apps run PHP 7.4 or 8.0) and reliable database server management via Remi repositories.

Stack: CentOS 8 • Virtualmin 6.x • Remi Software Collections (SCL) • MySQL 8.0 • Multi-PHP

1. Fix Perl UTF-8 Locale Warnings

cat << 'EOF' > /etc/environment
LANGUAGE=en_US.utf8
LC_ALL=en_US.utf-8
LANG=en_US.utf8
LC_TYPE=en_US.utf8
EOF

2. Enable EPEL and Remi Repositories

dnf install epel-release -y
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm -y
dnf module reset php -y
dnf module enable php:remi-7.4 -y

3. Installing Parallel PHP Versions

dnf install php56-php-fpm php72-php-fpm php74-php-fpm php80-php-fpm -y

4. Install Virtualmin

wget http://software.virtualmin.com/gpl/scripts/install.sh
sh install.sh

Monday, December 24, 2012

Linux Server Performance Tuning: Reducing Disk I/O and System Load

When optimizing a high-traffic dedicated Linux server, disk I/O bottlenecks are often the primary cause of sluggish response times and elevated load averages. Here are several practical server-tuning techniques I applied to a heavily loaded production server, resulting in a dramatic reduction in disk I/O and much faster throughput.

Key Optimizations: RAM-backed /tmp mount • Dedicated SSD for MySQL data • FastCGI process management with Nginx + PHP-FPM

1. Mount /tmp as a Ramdisk (tmpfs)

Many web stacks heavily utilize /tmp for transient disk writes:

  • PHP Sessions: Default PHP configurations store active session files in /tmp (session.save_path).
  • MySQL Temporary Tables: Heavy queries with extensive JOIN or GROUP BY clauses frequently write temporary on-disk tables to /tmp (verify your path using mysqladmin variables | grep tmpdir).

Mounting /tmp directly into RAM eliminates spinning disk access for these operations. Add the following entry to your /etc/fstab:

none /tmp tmpfs nr_inodes=200k,mode=01777,nosuid,nodev 0 0

Remount or apply without rebooting:

mount -o remount /tmp

2. Isolate MySQL Datadir to High-Performance Storage (SSD)

Moving the MySQL database directory (/var/lib/mysql) to dedicated high-speed SSD storage removes the database write bottleneck and dramatically lowers IO wait times (%iowait) during peak traffic.

3. Adopt Nginx with PHP-FPM

Switching from Apache's traditional prefork MPM / mod_php handler to Nginx + PHP-FPM significantly cuts memory footprint per connection, handles concurrency gracefully, and frees up system resources for database caching.

How Google Antigravity Solved the Mysterious NVIDIA Sleep Reboot on My Dell Inspiron 7567 (Ubuntu Linux)

If you run modern Ubuntu or Linux on a Dell Inspiron 15 Gaming (7567) or a similar 7th-gen Intel laptop paired with an NVIDIA GeForce GTX ...