Solved

May I have to delete old version modules?

Posted on 2002-05-30
12
247 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
  • 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
 
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I have been scripting applications way too long and can never remember how to create an ISS file.  So I decided to write this article to act as my own knowledge base for future reference, and hope you will also benefit. An ISS file is a response …
If you don't know how to downgrade, my instructions below should be helpful.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

760 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

23 Experts available now in Live!

Get 1:1 Help Now