Replacing (yum- plugin- replace) one yum install package (php) with another on Linux (Cent. OS 6)If you have installed software from one yum repository and want to upgrade it using packages in a different yum repository you may encounter some problems because of conflicts in packages. In those cases you would have to remove the old packages then install the new ones. For example I have installed php using the default yum repository (5. I want to upgrade it to let’s say php 5. Checking My Available Packages[ahmed@amayem ~]$ rpm - q php. Looks like we have our php at version 5. I want to upgrade it to version 5. The default repository only has 5. Tells us the following: Version : 5. Release : 2. 7. Size : 3. 5 M. Repo : installed. From repo : updates. To update it I would need to use a different repo like the webtatic repository. Installing the webtatic- release RPMCheck here to choose your OS. Download Audacious. Looking for the Windows installer? Click here or scroll down for more info. Source code. The Audacious source is split into two packages. Q. 14: How can I tell yum to download a source package (i.e., a.src.rpm file)? A. The main yum program doesn't do this -- it's not within the scope of the program's. I am using Cent. OS 6 so I will do the following: [ahmed@amayem ~]$ sudo rpm - Uvh http: //mirror. Retrieving http: //mirror. GVmx. Ow: Header V4 DSA/SHA1 Signature, key ID cf. NOKEY. Preparing.. Replacing (yum-plugin-replace) one yum install package (php) with another on Linux (CentOS 6). Installing Cement Board Over Subfloor more. Antivirus Software Free Download Reviews on this page. Check here to see how to give a linux user sudo powers. Checking the Available Packages in the Other Repo[ahmed@amayem ~]$ yum info php. Tells us the following: Version : 5. Release : 1. w. Size : 2. 5 M. Repo : webtatic. So we have a new version but from a different repo. Let’s try updating the installed php package we installed with the new one: Trying to Update Using yum update: [ahmed@amayem ~]$ sudo yum update php. Will give us the following: No Packages marked for Update. It didn’t recognize that php. That is to be expected because they have different names. In fact they are considered two different programs because of the different names, so to update it we would need to uninstall the old one and install the new one: Updating Using yum remove then yum install. For install and remove we will be using the php- common name so that all the files related to that version are removed together. What is php- common?[ahmed@amayem ~]$ yum info php- common. Tells us the following: Description : The php- common package contains files used by both the php. Removing php- common[ahmed@amayem ~]$ sudo yum remove php- common. Enter y when you see the following: Remove 4 Package(s). Installed size: 1. M. Is this ok [y/N]. It will end with the following: Complete! Installing php. 55w and php. This time we need to specify the php. When prompted enter y. Install 3 Package(s). Total download size: 6. M. Installed size: 2. M. Is this ok [y/N]. And it will end with the following: Complete! Testing the Current Version. Make a phpinfo file as outlined here to test the newly installed php. For the configuration to take effect we need to restart apache: [ahmed@amayem ~]$ sudo apachectl restart. Now try opening the php page. If it still doesn’t work then try rebooting the server: [ahmed@amayem ~]$ sudo reboot. Now it should show the new version. Installing using yum- replace- plugin. As seen earlier we have to issue two commands, one to remove the old version and one to install the new version. There is a nice plugin called yum- replace- plugin that will do the two for you. It was developed by IUS, which provides repos other than the original for RHEL. Let’s take a look at it.[ahmed@amayem ~]$ yum info yum- plugin- replace.Gives us the following information: Description : This plugin enables the ability to replace an installed package, with another. Installer Live Messenger 2009 Gratuitous Definition here. It was developed specifically for the.IUS Community Project whose packages have alternative names as to not.They also do not Obsolete the packages.For. : example upgrading 'mysql' to 'mysql.Let’s install it: [ahmed@amayem ~]$ sudo yum install yum- plugin- replace. As usual enter y when prompted. Now time to use it to switch back to the old php. Updating using yum- plugin- replace[ahmed@amayem ~]$ sudo yum replace php. You will get a warning, which is normal, continue by entering y. WARNING: Unable to resolve all providers. With the next prompt enter y again. Now test the installed php again as mentioned before and Voila, we have done it. References. Installing Different Versions of php Using yum on Linux (Cent. OS 6)Webtatic repositories. IUS Client Usage Guide.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2017
Categories |