Link to home
Start Free TrialLog in
Avatar of mikezang
mikezang

asked on

May I have to delete old version modules?

I installed RadHat7.2 server with all packages, but I found most of them are old version, I want to install newest version, my problem is that I have to delete old version before install new version, then I heard the packages's directory in RH are different from standard, how can I install new version in the same directory?
Avatar of tibori
tibori

Are you talking about upgrading your OS(operating system) to RH7.3 or just upgrading certain packages? If it's the latter, you can go to http://rpmfind.net/linux/RPM/redhat/updates/7.2/i386/index.html
download the package that you want to upgrade, then upgrade it via:
rpm -Uvh <packagename>
You don't have to delete the old package, this will upgrade it.
Avatar of mikezang

ASKER

Maybe I didn't explain clear, I mean packages like apache, PostgreSQL or PHP and so on, the newest release is newer than inside RH7.2, but RH7.2 install them not in standard place, so I want to know if I need to delete old or how can I install them
It depends on if you want to install those packages from source(tgz file) or from an RPM. An RPM is cleaner(easier to uninstall), but it may not give you all the features you can compile in with a source file. I'm guessing from your package list that you plan to compile the source. In that case it's best to remove the existing RPM packages(so the binaries don't conflict). To delete an RPM package you need to do:
rpm -e <packagename>
To see what you have installed, you can do:
rpm -qa
The steps to install a source(gz or tgz) tarball(these almost always work):
tar -zxvf <tarfile>
cd <packagename>
./configure
make
make install

But is it no problem for installing directory and so on? I mean RH installed apache in different directory from default installation.
It depends if any of the files overlap(i.e. overwrite each other during install). So, the safest thing to do is uninstall. But, if you're talking about strictly RPM's, they're usually designed to use the same directory structure as previous rpm's. So for example, for apache the rpm will install the config files in /etc/httpd, the html root in /var/www/html, log files in /var/log, and so on. The source(tgz) install will put almost everything in /usr/local/apache...so they shouldn't conflict...but experience shows that some libraries will. So bottom line:
If you have an RPM install of a software, it's safe to do an upgrade(rpm -Uvh <software>).Same is true if you have a source install, and you want to upgrade it. HOWEVER, if you have an RPM install, and you want to install source for the newer version, it's safest to uninstall first. This won't hurt anything, and you can always put back the old version easily if you need to(especially with RPM's). You should of course back up your config and data files, although RPM uninstalls are pretty good about not deleting/overwriting these.
Thanks!
Can I get the newest rpm based on the newest source? I am afraid there is no the newest rpm, so that I have to upgrade by source. In this case, as my rpm set html root as /var/www/html, but when I install by source, is it also set html root as /var/www/html?
If I can get both rpm and source version, which one is the best for upgrading?
If I can get both rpm and source version, which one is the best for upgrading?
---
I would recommend you try the RPM. This is because it's very easy to uninstall and leaves your system clean. Source may or may not, depending if someone took the effort to make the uninstall script. I would only recommend source if the rpm doesn't have a feature that you need.

--
 but when I install
by source, is it also set html root as /var/www/html?
You can tell the "configure" script to do so by specifying a flag to it(I think it's htmlroot=/var/www/html, but I'm not sure. You should read the README or INSTALL docs that usually come with source to find out the correct flag.(you can also do a ./configure --help) By default is /usr/local/apache/htdocs which IMO is just as good. If you don't have enough space on your /usr partition you can always symlink it back to /var/www/html.
Let me know if I didn't make myself clear and good luck.
tibori
Well, so how can I know all configuration of old version rpm package? for example, RH7.2 installed apache 1.3, now I want to upgrade to Apache 2.0 by source, but I want to install it with the same config as old. May I make sense?
ASKER CERTIFIED SOLUTION
Avatar of tibori
tibori

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your answer!
One more additional question, there are *.i386.rpm, *.i586.rpm and *.i686.rpm, what should I use? By the way, I am using P4 CPU.