LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   virtual machine with centos 5 (https://www.linuxquestions.org/questions/centos-111/virtual-machine-with-centos-5-a-4175721767/)

mark608 02-07-2023 02:14 AM

virtual machine with centos 5
 
Hello everyone,
Is there a way to get a virtual machine with centos 5? With apache, php and mysql.
I can install from the iso, but when installing packages with yum it gives an SSL connection error.
(I have changed to the vault option in the repositories)

Thanks in advance

pan64 02-07-2023 02:30 AM

Hi, and welcome here, at LQ

CentOS 5 had reached its end of life long time ago, therefore you will get no uptodate software for it. From the other hand what you wrote is vague. An SSL connection error is definitely just a configuration problem somewhere.
http://www.catb.org/~esr/faqs/smart-...html#beprecise

michaelk 02-07-2023 02:53 AM

Why do you need to install centos 5? Do you need specific version of mysql or php?

It is probably a ca certificate problem and switching to http from https in yum repository list might work. If versions do not matter then CentOS 7 is good for another year or go with Alma or Rocky linux.

mark608 02-07-2023 06:15 AM

Thank you for your answers.
I have an old web application (made with codeigniter) that works on a server with centos 5.This server can die at any time.
That is why I would like an environment that is the same or similar to the one in which I already have the application running.

centos 5.9

PHP 5.2.10 (cli) (built: Nov 13 2009 11:24:03)

mysql Ver 14.12 Distrib 5.0.95, for redhat-linux-gnu (i386) using readline 5.1

On a clean install of centos 5, when doing yum update, I get this error:

Code:

[root@localhost ~]# yum update
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base

/etc/yum.repos.d/CentOS-Base.repo

Code:

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


I have made several changes to the repository without success on other installations.

I just did this installation to test your suggestions.

Thanks in advance

pan64 02-07-2023 06:54 AM

Quote:

Originally Posted by mark608 (Post 6409651)

On a clean install of centos 5, when doing yum update, I get this error:

Code:

[root@localhost ~]# yum update
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base


Because it is not available any more. You need to upgrade your system. Not only because it is over, but also your product is currently using/running on a system which is not supported any more.

mark608 02-07-2023 07:58 AM

I know that it is not correct, but it is an application that is not connected to the network.
and I just want to have it replicated in case the server dies.
I have tried newer versions but it doesn't work.
That's why I want only one (virtual) machine with these versions:
-Centos 5.9
-PHP 5.2.10 (cli) (built: Nov 13 2009 11:24:03)
-mysql Ver 14.12 Distrib 5.0.95, for redhat-linux-gnu (i386) using readline 5.1

do you think it is possible to achieve?

TenTenths 02-07-2023 08:17 AM

Shut down your existing server, then use something like clonezilla to take a full backup to external media, that way you've at least got a backup in the event of hardware failure.

You may also find that unless your existing server has weird hardware like proprietary RAID controllers that you may be able to restore your clonezilla backup into a VM

michaelk 02-07-2023 02:46 PM

As posted the ssl is way out of date and it isn't not worth my time to see if updating is possible.

I did install 5.9 in a VirtualBox VM and it is possible to manually install RPMs from the archive but you need to resolve dependencies. As a workaround I downloaded the desired RPMs to the host and then created a CD ISO that I could "insert" into the guest. The 5.9 archive has php 5.3 not 5.2.


All times are GMT -5. The time now is 11:35 PM.