Skip to content

Repository files navigation

ATLAS Apache Web Server Migration (Thuner Tier3s)

This document describes the migration of the Apache web server and TWiki application from a legacy RHEL6-based system to a modern RHEL9-based system.


System Description

Let's summarize the hardware, OS, kernel, and HTTP-related software stack for both Apache web server systems.

Source System (thuner-gw)

[root@thuner-gw ~]# cat /etc/redhat-release 
Scientific Linux release 6.10 (Carbon)
[root@thuner-gw ~]# uname -r
2.6.32-754.11.1.el6.x86_64
[root@thuner-gw ~]# dmidecode -t system | grep -E "Product|Manufacturer"
	Manufacturer: HP
	Product Name: ProLiant DL145 G2
[root@thuner-gw ~]# rpm -qi perl | grep "Version"
Version     : 5.10.1                            Vendor: Scientific Linux
[root@thuner-gw ~]# rpm -qi httpd | grep "Version"
Version     : 2.2.15                            Vendor: Scientific Linux

Notes:

  • Legacy system (~2005–2007 hardware)
  • Based on RHEL6 (End of Life)
  • Limited performance and security support
  • perl: 5.10.1
  • httpd: 2.2.15

Target System (thuner-gw07)

[root@thuner-gw07 ~]# cat /etc/almalinux-release 
AlmaLinux release 9.7 (Moss Jungle Cat)
[root@thuner-gw07 ~]# uname -r
5.14.0-611.9.1.el9_7.x86_64
[root@thuner-gw07 ~]# dmidecode -t system | grep -E "Product|Manufacturer"
	Manufacturer: Dell Inc.
	Product Name: PowerEdge R410
[root@thuner-gw07 ~]# rpm -qi perl | grep "Version"
Version     : 5.32.1
[root@thuner-gw07 ~]# rpm -qi httpd | grep "Version"
Version     : 2.4.620

Notes:

  • Modern RHEL9-based system
  • Improved security (SELinux, updated TLS)
  • perl: 5.32.1
  • httpd: 2.4.620

Web Server Architecture

The Apache web server is structured in a layered architecture composed of configuration, content delivery, application logic, security, and logging components. Apache uses configuration files in /etc/httpd to map incoming requests to the appropriate content, application logic, and security settings. /etc/httpd acts as the brain, Apache reads it and then decides paths or serves files or executes scripts.

Web Server Architecture

The architecture follows a traditional CGI-based model, where Apache acts as the web server and delegates dynamic content generation to Perl-based TWiki scripts.

Components:

  • Apache Configuration (/etc/httpd): Defines virtual hosts, CGI handling, and access control policies.
  • Web Content (/var/www): Hosts static files and CGI entry points.
  • Application Layer (TWiki) (/home/Downloads/TWiki/twiki): Perl-based web application executed via Apache CGI.
  • Security Layer (/etc/pki/tls): Stores SSL/TLS certificates and private keys.
  • Logging Layer (/var/log/httpd): Captures access and error logs for monitoring and debugging.

Legacy Dependency Resolution (GNU RCS / TWiki)

The binary rlog is required by TWiki and it is not integrated on the target system by default.

[root@thuner-gw07 ~]# which rlog
/usr/bin/which: no rlog in (/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)
[root@thuner-gw07 ~]# ls /usr/bin/rlog
ls: cannot access '/usr/bin/rlog': No such file or directory
[root@thuner-gw07 ~]# rpm -qa | grep rcs

Attempts to install directly failed:

[root@thuner-gw07 ~]# dnf install rcs
Last metadata expiration check: 3:25:23 ago on Sun Mar 15 11:59:02 2026.
No match for argument: rcs
Error: Unable to find a match: rcs

Root cause: TWiki depends on GNU RCS (rlog, ci, co), but in RHEL/AlmaLinux 9, the rcs package is no longer in base repositories. It is available via EPEL (Extra Packages for Enterprise Linux).

Install rcs from epel:

[root@thuner-gw07 ~]# dnf install epel-release
Last metadata expiration check: 0:03:48 ago on Fri Mar 20 14:47:52 2026.
Package epel-release-9-9.el9.noarch is already installed.
Dependencies resolved.
=================================================================================================================================================================================
 Package                                        Architecture                             Version                                    Repository                              Size
=================================================================================================================================================================================
Upgrading:
 epel-release                                   noarch                                   9-10.el9                                   epel                                    19 k

Transaction Summary
=================================================================================================================================================================================
Upgrade  1 Package

Total download size: 19 k
Is this ok [y/N]: y
Downloading Packages:
epel-release-9-10.el9.noarch.rpm                                                                                                                 209 kB/s |  19 kB     00:00    
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                             35 kB/s |  19 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                         1/1 
  Upgrading        : epel-release-9-10.el9.noarch                                                                                                                            1/2 
  Running scriptlet: epel-release-9-10.el9.noarch                                                                                                                            1/2 
  Cleanup          : epel-release-9-9.el9.noarch                                                                                                                             2/2 
  Running scriptlet: epel-release-9-9.el9.noarch                                                                                                                             2/2 
  Verifying        : epel-release-9-10.el9.noarch                                                                                                                            1/2 
  Verifying        : epel-release-9-9.el9.noarch                                                                                                                             2/2 

Upgraded:
  epel-release-9-10.el9.noarch                                                                                                                                                   

Complete!
[root@thuner-gw07 ~]# dnf install rcs
Last metadata expiration check: 0:00:10 ago on Sun Mar 15 15:25:50 2026.
Dependencies resolved.
=================================================================================================================================================================================
 Package                                Architecture                              Version                                          Repository                               Size
=================================================================================================================================================================================
Installing:
 rcs                                    x86_64                                    5.10.1-12.el9                                    epel                                    231 k

Transaction Summary
=================================================================================================================================================================================
Install  1 Package

Total download size: 231 k
Installed size: 504 k
Is this ok [y/N]: y
Downloading Packages:
rcs-5.10.1-12.el9.x86_64.rpm                                                                                                                     1.2 MB/s | 231 kB     00:00    
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                            498 kB/s | 231 kB     00:00     
Extra Packages for Enterprise Linux 9 - x86_64                                                                                                    53 kB/s | 1.6 kB     00:00    
Importing GPG key 0x3228467C:
 Userid     : "Fedora (epel9) <epel@fedoraproject.org>"
 Fingerprint: FF8A D134 4597 106E CE81 3B91 8A38 72BF 3228 467C
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-9
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                         1/1 
  Installing       : rcs-5.10.1-12.el9.x86_64                                                                                                                                1/1 
  Running scriptlet: rcs-5.10.1-12.el9.x86_64                                                                                                                                1/1 
  Verifying        : rcs-5.10.1-12.el9.x86_64                                                                                                                                1/1 

Installed:
  rcs-5.10.1-12.el9.x86_64                                                                                                                                                       

Complete!

So let's verifiy it:

[root@thuner-gw07 ~]# which rlog
/usr/bin/rlog
[root@thuner-gw07 ~]# rlog -h
rlog: no input file
rlog aborted
[root@thuner-gw07 ~]# ls -l /usr/bin/rlog
-rwxr-xr-x. 1 root root 817 May 12  2025 /usr/bin/rlog

TWiki relies on legacy version control tools (GNU RCS), which are no longer part of the default RHEL9 repositories (even though it was implicitly available in Scientific Linux) and must be installed via EPEL.

Backup Procedure (Source System)

Perform a full backup of the Apache web server and TWiki environment on the source system (thuner-gw) prior to migration by running as root on the background:

[root@thuner-gw ~]# nohup bash FullWebServerBackup.sh > FullWebServerBackup_$(date +%F_%H-%M-%S).out 2>&1 &
[root@thuner-gw ~]# cat FullWebServerBackup_2026-03-18_13-11-26.out
Starting full web server backup...
Log file: /root/FullBackup_2026-03-18_13-11-26.log

Estimating backup size...
5.7G	/var/www
164K	/etc/httpd
1.4M	/etc/pki/tls
6.4M	/var/log/httpd
232M	/home/Downloads/TWiki/twiki
Total size: 5.9G	total

Creating backup: /root/Full-ATLAS-Alberta-Web-Server-backup-2026-03-18_13-11-26.tar.gz
tar: Removing leading `/' from member names

Backup created successfully:
-rw-r--r-- 1 root root 5.8G Mar 18 13:22 /root/Full-ATLAS-Alberta-Web-Server-backup-2026-03-18_13-11-26.tar.gz

Backup process completed.
[root@thuner-gw ~]# tar -tzf Full-ATLAS-Alberta-Web-Server-backup-2026-03-18_13-11-26.tar.gz | head
var/www/
var/www/html/
var/www/html/index.html
var/www/html/cpp_dir/
var/www/html/cpp_dir/update.cpp~
var/www/html/cpp_dir/bck/
var/www/html/cpp_dir/cpp.backup.Dec.17.2012_1139.tgz
var/www/html/cpp_dir/update.prototype.cpp~
var/www/html/cpp_dir/access/
var/www/html/cpp_dir/access/.csr_prototype.users

This step is mandatory before performing any system migration or configuration changes.

Restore Procedure (Target System)

Run the extraction as root on the target system (thuner-gw07) background:

[root@thuner-gw07 ~]# nohup tar -xzvf Full-ATLAS-Alberta-Web-Server-backup-2026-03-18_13-11-26.tar.gz -C / > FullWebServerRestore_$(date +%F_%H-%M-%S).out 2>&1 &

The restore process preserves the original filesystem structure, enabling a consistent migration of the web server environment.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages