F
F
felengir2022-01-12 10:32:22
linux
felengir, 2022-01-12 10:32:22

How to build a server on outdated software?

"Why do you need it?"
There is a server working on OS FreeBSD 7.2. It stands in a regular library (in which the books are paper), and on it is software written in PHP, which is an electronic library catalog. This software can run on PHP versions up to 5.2 and MySQL up to 5. There is a need to port it to newer hardware.

At the moment it all works on the following versions:

  • OS FreeBSD 7.2
  • Lighttpd 1.4.25
  • PHP 4.4.9
  • MySQL 4.1.25


What can be done?
How can older versions of all of the above be installed? Do I need to install the OS of the old version for this, or will all this work on the latest ones? Are there other ways to solve this problem, for example, I xs, moving the current server to the new hardware entirely?

Just in case, I apologize to people offended by the stupidity of the question. My work in this institution is not entirely about this, but such a task fell on me.

Answer the question

In order to leave comments, you need to log in

7 answer(s)
C
CityCat4, 2022-01-12
@felengir

Virtualize the machine and let it plow itself to the point of exhaustion.
How to virtualize? This is where you have to mess around a bit. (I had to do about the same not so long ago, only the FreeBSD version was even older - installed (by me) in 2004!)
- Remove the screw and stick it into the machine, where there is a place equal to double the volume of the screw
- Make a dumb sector-by-sector image screws (dd in linux, WinDD in Windows)
- Convert the resulting image into an image suitable for hyper - vdi, vmdk, vhd, depending on which hyper it will be
- Create a machine, specify the resulting image as a screw, do not fantasize with iron, set what exactly is in the kernel (in FreeBSD the kernel is monolithic, the practice of loading modules is not particularly used if there are no firewood in the kernel - most likely there are none at all)
- Zabutitsya and check that everything works / does not work. If you suddenly need some kind of program, you will have to manually download the very version that the port wants, put it in /usr/ports/distfiles and compile it.
If you feel confident in your abilities - you can not dig out the stewardess - this is absolutely true (alas, FreeBSD is moving more and more ... to nowhere) - but pick up linux, the one you know and put the necessary software versions there, and just stupidly transfer the site .

A
Adamos, 2022-01-12
@Adamos

Software written in PHP, which is an electronic library catalog. This software can run on PHP versions up to 5.2 and MySQL up to 5.

I would not dig out the stewardess, but rewrite this ancient shit code (most likely, the most primitive) on a modern stack and get the opportunity to raise it on anything without bothering with the support of new hardware with ancient engines.
There is, of course, an option to install a normal OS on a new server, and raise a virtual system with this fossil in it, but this, IMHO, will only accumulate problems, and will not solve it.

P
paran0id, 2022-01-12
@paran0id

The OS and the web server do not matter - in principle, any will do. Softina can be containerized in the docker, the base too - you get isolated containers with junk inside a modern OS.
You can also download the image of the old version of the OS and install from it, then mount this image as a repository of old packages.
You can do the same in a virtual machine, abstracting from the hardware.

R
rPman, 2022-01-12
@rPman

One word - virtualization.
Since when you try to install an old version of the OS on new hardware, you can get strange problems (or you can’t get it, you won’t know if you don’t try), but the main thing is that outdated software has not been supported for a long time and no one fixes bugs in it. It is most logical to close the virtual machine with a firewall (just when it is already good behind nat).
Therefore, you install a modern OS, and inside using virtualization tools or any sandbox creation tools (even chroot will help), you install an obsolete version of the OS and applications. In a simple version, just migration (read copying) from the old hardware into the virtual machine as is may be suitable, it remains to set up the network and everything will continue to work as it worked.

OS FreeBSD 7.2
get away from this, on linux, I recommend for beginners - on ubuntu, freebsd itself may be fine, but setting up something non-standard will be an order of magnitude harder for beginners
With a high probability, Lighttpd and MySQL will suit new versions, and most of the problems will be created by code written for the old version php, i.e. why not try to install only it on a modern OS (but you will have to build it from sources, I have not seen php backports of such an old version for new ones) i.e. all the fuss, find the highest version of the OS to run in a virtual machine for which there is php4
To install the old version of ubuntu, you can use the old-releases.ubuntu.com archive and specify their turnips in debootstrap to collect any old version of the miniassembly into a directory that you can already virtualize at least chroot at least lxc at least with a full-fledged virtual machine

S
Saboteur, 2022-01-12
@saboteur_kiev

OS FreeBSD 7.2
Lighttpd 1.4.25
PHP 4.4.9
MySQL 4.1.25

I am sure that all this will also easily rise on Linux. You may not have to install the latest version, but try to install the latest one, try to install these versions, if it doesn’t work, install an older version And so on until it starts.
Linux will be easier to start and maintain in a virtual machine than FreeBSD.
In general, if you have at least minimal programming skills, copy the entire site and try to rewrite errors and their solutions for new versions of php, Google. A lot of different products in the world had to be upgraded. You may not know php at all, and with google-development or stackoverfow-development, you can start everything on modern versions.

A
Alexey Cheremisin, 2022-01-12
@leahch

I will support everyone for the virtual machine.
Copy entire partitions to a qcow2 format disk image and run in a virtual machine on new hardware.
A bunch of old systems work for me in virtual machines.

X
xotkot, 2022-01-12
@xotkot

so what are the difficulties?

This software can run on PHP versions up to 5.2 and MySQL up to 5.

you can take the linux of those times which has packages of the required versions
for this case, Debian Lenny of the latest version 5.0.10
is ideally suited where the versions of the required packages meet the requirements, just a little bit
archive.debian.org/debian/dists/lenny/main/binary -...
Package: lighttpd
Version: 1.4.19-5+lenny3
Package: php5
Version: 5.2.6.dfsg.1-1+lenny16
Package: mysql-server
Version: 5.0.51a-24+lenny5
all iso c images installer and programs can be downloaded from here
install the OS and programs, configure, transfer your Web Liber

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question