Linux - NewbieThis forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am new to Linux and have some problems understanding the differences between the different ways to install software.
As an example I want to setup Apache to use SSL, PHP, and MySQL.
I have found numerous documents on the web on how to do this in RedHat Linux.
I completed my RedHat 9 fresh install without any problems. During the install process I picked several packages including apache, mod_ssl, openssl, mysql.
I understand that I can add new packages to the system by running this command.
# rpm –ivh filename.rpm
All the documentation on how to setup Apache/SSL/PHP/MySQL say to download the source files like openssl-0.9.4.tar.gz and to extract them and then install them by ./configure, make, make install.
My first question is if I download a new program in a non-rpm format "program.tar.gz" and then I install it using make, etc. how would I be able to update it later?
With the RPMs it is very easy to do, but if I just build the program using the .tar.gz file it will not show up in the RPM database.
If I follow the directions to setup Apache/SSL/PHP/MySQL it says to run this command to install Apache with mod_ssl:
$SSL_BASE=…/openssl-0.9.4 ./configure –prefix=/usr/local/apache –active-module=src/modules/php4/libphp4.a –enable-module=php4 –enable-module=ssl.
The problem I have is that the Apache, MySQL, and openssl were all installed when RH was installed as RPMs. I no longer have the source to find "configure". How would I get Apache to recompile with MySQL, PHP, and openssl if they are already installed as RPMs?
Would I have to un-install the RPMs, then download the .tar.gz sources follow the directions on the web? Then I would not be able to update these programs using RPM.
What process should I follow for installing new software RPM or .tar.gz? If RPM then how do I recompile it later as in my Apache example?
Originally posted by Ani
My first question is if I download a new program in a non-rpm format "program.tar.gz" and then I install it using make, etc. how would I be able to update it later?
You download a new version or a patch if it's provided. Then there's recompilation.
Quote:
With the RPMs it is very easy to do, but if I just build the program using the .tar.gz file it will not show up in the RPM database.
When you're installing an RPM file, your RPM database is upgraded. When you compile from source, it isn't.
Quote:
The problem I have is that the Apache, MySQL, and openssl were all installed when RH was installed as RPMs. I no longer have the source to find "configure". How would I get Apache to recompile with MySQL, PHP, and openssl if they are already installed as RPMs?
You need to decide if you'd like to use RPMs or compile from source. It's very hard to mix them. In this case, the only option is to get Apache, MySQL, PHP and openssl source and compile everyting. Or just download RPMs...
Quote:
Would I have to un-install the RPMs, then download the .tar.gz sources follow the directions on the web? Then I would not be able to update these programs using RPM.
That's true. I suggest not to uninstall RPMs, keep them. I think that RH-compiled Apache should have support for all you need build in.
Quote:
What process should I follow for installing new software RPM or .tar.gz? If RPM then how do I recompile it later as in my Apache example?
That's your decision. And your personal preference. I rather suggest RPMs. Compiling from source can sometimes be hard when problems appear (they're sometimes really ahrd to solve). But source-compiled software, with optimalization for your machine gives better performance.
It seems then that it comes down to personnel preference as to what to use RPMs or source code.
Both have their strong points and weakness. Thus a decision would have to be made weighing the options of both.
Please correct me, but I would then deduce that although you could have a mixed system, RPM installed software + source code installed software it would not be advisable from an administrative point of view.
Is there no way to add a program that was downloaded, compiled, installed on a system to the RPM database so that later it can be upgraded if RH releases a new version of it in RPM format??
Example: say that RH does have a RPM for software "foobar2.rpm".
This is NOT installed on the computer.
Instead a download file "foobar3.tar.gz" IS downloaded and installed (tar, configure, make, make install).
Somehow the foobar3.tar.gz is added to the RPM database as foobar3.rpm
Later RH releases foobar4.rpm.
Use rpm –U foobar4.rpm
Originally posted by Ani
Please correct me, but I would then deduce that although you could have a mixed system, RPM installed software + source code installed software it would not be advisable from an administrative point of view.
Is there no way to add a program that was downloaded, compiled, installed on a system to the RPM database so that later it can be upgraded if RH releases a new version of it in RPM format??
Example: say that RH does have a RPM for software "foobar2.rpm".
This is NOT installed on the computer.
Instead a download file "foobar3.tar.gz" IS downloaded and installed (tar, configure, make, make install).
Somehow the foobar3.tar.gz is added to the RPM database as foobar3.rpm
Later RH releases foobar4.rpm.
Use rpm –U foobar4.rpm
Is this possible to do? How?
In theory, it is possible. But if you look into the method how to build an RPM file (http://www.rpm.org/support/RPM-HOWTO.html), it's not simple and IMHO it's not worth the time.
To install Apache+MySQL+Php, I think it's better to use source of Apache and Php but for MySQL, rpm is OK.
Because you can do a lot of settings(options) while compiling source, like prefix, enable-<modules>.
When compile MySQL into Php just use the option "--with-mysql"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
Advertisement
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Click Here to receive a complimentary subscription courtesy of LQ.