Solved

May I have to delete old version modules?

Posted on 2002-05-30
12
252 Views
Last Modified: 2013-11-13
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?
0
Comment
Question by:mikezang
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
12 Comments
 
LVL 3

Expert Comment

by:tibori
ID: 7045032
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.
0
 
LVL 5

Author Comment

by:mikezang
ID: 7045285
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
0
 
LVL 3

Expert Comment

by:tibori
ID: 7045489
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

0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
LVL 5

Author Comment

by:mikezang
ID: 7046326
But is it no problem for installing directory and so on? I mean RH installed apache in different directory from default installation.
0
 
LVL 3

Expert Comment

by:tibori
ID: 7051535
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.
0
 
LVL 5

Author Comment

by:mikezang
ID: 7053605
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?
0
 
LVL 5

Author Comment

by:mikezang
ID: 7053794
If I can get both rpm and source version, which one is the best for upgrading?
0
 
LVL 3

Expert Comment

by:tibori
ID: 7054932
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
0
 
LVL 5

Author Comment

by:mikezang
ID: 7055445
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?
0
 
LVL 3

Accepted Solution

by:
tibori earned 50 total points
ID: 7063805
I would just save the "httpd.conf" file, and once you install the new version, just replace the standard httpd.conf there with your saved one. If you want to find out all the files that an rpm installed, you can do:
rpm -ql <packagename> (so rpm -ql apache). This includes binaries, config files and docs. IMHO, you should be fine, if you just transfer httpd.conf....
0
 
LVL 5

Author Comment

by:mikezang
ID: 7063983
Thanks for your answer!
0
 
LVL 5

Author Comment

by:mikezang
ID: 7064006
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.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

717 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