I previously setup my server by downloading php from php.net, and using the configure, make make install to get it onto my apache centos server.
Now I want to upgrade and I'm not sure how to do it.
If I do what is said here: http://www.webtatic.com/packages/php53/ It will attempt to upgrade php to 5.3.8. that's not an issue for me, but my concern is that it won't work because I have php 5.2.14 installed through the compile, rather than through YUM
What should I do - is there a way to save the current state of the server in order to reverse changes if it breaks?
Does anyone have any experience with this?
thanks
Jason
If you want to switch to maintained packages, once you have been compiling from source it's safest to remove all of the files from your previous installation first. Note that some of these files may have been edited by yourself (such as
php.ini
) so you should take a backup of all of them first.To do this, download the original source code (5.2.14) and compile and install it again but this time run your configure command with
--prefix=/home/jason/build/
and create thebuild/
directory in your home. When you runmake install
, all of the files will be installed in the build directory. Runningcd ~/build/; find . -type f > ~/php-5.2.14-file-list.txt
will give you a list of all the files that you installed when you originally compiled PHP.Once you have deleted all those files, check all the directories it installed (
cd ~/build/; find . -type d
) and for each of those, if it's empty you can remove it.After that you should be safe to switch to RPMs without any fear of having two different version of PHP installed in different paths on your system.
It is not recommended to install the same package twice: one from source and one from yum. If you do so, you may end up having the package installed in two different locations (duplicated files). This may cause you troubles and confusion.
I suggest you try to upgrade by downloading the new source code and build it as you have done this before. Your system will not be changed unless you type
make install
.