Solved

Centos: Replace remi php with Centos repo

Posted on 2015-02-23
20
280 Views
Last Modified: 2015-03-02
I was using remi php and other related tools for some time now because I needed certain versions for certain sites.
Now that Centos is 5.4 or higher by default, I'd like to get rid of remi so that I have all Centos packages.

The server I need to do this on is 6.5 and I need to do this without disrupting anything and from remote.

Can someone walk me through the process, making sure that I don't take the system down.
0
Comment
Question by:projects
  • 11
  • 5
  • 4
20 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 250 total points
ID: 40626235
No.  CentOS 6.6 PHP version from the repository is only 5.3.3.  You would have to get CentOS 7 to get a newer version.
0
 
LVL 61

Assisted Solution

by:gheist
gheist earned 250 total points
ID: 40626518
You can add centos SCL repo and have php 5.4
0
 

Author Closing Comment

by:projects
ID: 40626936
Yes, both options are right. I forgot that I had asked about this.

Thanks.
0
 

Author Comment

by:projects
ID: 40626939
One quick question would be... can I upgrade Centos 6.5 to 6.66?
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40626943
I upgraded from 6.5 to 6.6 thru the Software Update function.  You have to have the 'root' password to do that but it was 'automatic' otherwise.  Since you have non-repo software on your system, you might want to do a complete backup first in case there are conflicts.
0
 

Author Comment

by:projects
ID: 40626948
If this server were a VM, it would be dirt simple but since it's a hardware server, remote and with only one drive, I am finding my options limited at this point.
0
 
LVL 61

Expert Comment

by:gheist
ID: 40626999
You can update centos 6.0 to 6.any directly
or 5.0 to 5.11

That is the long term support redhat sells.
0
 

Author Comment

by:projects
ID: 40634389
I reactivated remi and epel repos, then ran the following;

 yum clean all && yum update

This updated the system. Once it rebooted, I yum removed all of the php packages, then re-installed them using centos repo. That broke something in the web site on that test server but otherwise, it worked perfectly.
0
 
LVL 61

Expert Comment

by:gheist
ID: 40634824
Probably you need to swap more packages:
yum --enablerepo=remi list installed
0
 

Author Comment

by:projects
ID: 40636031
Yup, there were a few mysql things left over. I removed and re-installed those along with re-installing the mysqld server which seemed to have gotten removed without my noticing.

Server is now running but the web app has a broken top page. The httpd error is;

PHP Fatal error:  Call to undefined function cIsPlural()
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:projects
ID: 40637215
Turns out even after upgrading to centos 6.6, I still need to use remi because default php is only 5.3 and I need 5.4 on some apps.
0
 
LVL 61

Expert Comment

by:gheist
ID: 40637238
Try centos SCL (yum install centos-release-SCL)
0
 

Author Comment

by:projects
ID: 40638666
I am trying to avoid this but am not sure how long I can avoid it. I need to find out when php 5.4 will become standard on centos.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40638683
For what it's worth, this page says you need CentOS 7 to get PHP 5.4.  http://distrowatch.com/table.php?distribution=centos
0
 

Author Comment

by:projects
ID: 40638689
So, now I would need to know if I can upgrade all the way from centos 6.5 to 7 then?
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40638692
This search https://www.google.com/search?q=upgrade+centos+6.5+to+7 lists a lot of 'answers' to that question.
0
 

Author Comment

by:projects
ID: 40638696
I am testing it right now on a server
0
 

Author Comment

by:projects
ID: 40638790
The very first thing that is incorrect in that article is that there is a new program called preupg.
After upgrading to 6.6, there is no such program.

You have to follow these steps;

Create a file in /etc/yum.repos.d/, named something like upgrade.repo

Add the following lines to the file:

[upg]
name=CentOS-$releasever - Upgrade Tool
baseurl=http://dev.centos.org/centos/6/upg/x86_64/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

Open in new window


Then you need to install the proper tools;

yum install redhat-upgrade-tool preupgrade-assistant-contents

After running the program, it showed some possible problems but for testing, I don't care.

However, then it is suggested you install the GPG key for centos7 and that fails.
# rpm --import http://isoredirect.centos.org/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
curl: (22) The requested URL returned error: 404 Not Found
error: http://isoredirect.centos.org/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7: import read failed(2).

There is also this nice little piece of information. Look at the top warning;
http://wiki.centos.org/TipsAndTricks/CentOSUpgradeTool

Anyhow, I give up for now, I ran out of space and that killed the upgrade.
0
 
LVL 61

Expert Comment

by:gheist
ID: 40639019
SCL is the way they provide new versions. Like MySQL 5.5 from SCL once became only supported on RHEL5.... Or bind97 version bump etc.
You must use php54 from scl.
0
 

Author Comment

by:projects
ID: 40640575
I am nervous about installing yet more things that will end up causing conflicts. I don't know enough about using SCL to use it. It seems like a problem waiting to happen.

There doesn't seem to be any clear known way of getting rid of the remi stuff.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Application launch issue with Apache Tomcat 5 18
CentOS 7 Installation 7 57
How to use md5 hashing 3 25
Session timeout 5 13
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now