Linux - NewbieThis Linux 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!
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am trying to better understand how applications are installed. Let's say I run the following two lines.
The first line upgrades (or installs if not existing) either a file on my hard drive or a file on the internet, and displays verbose information and hash marks. Where does it get installed? Is it just one application/file? What is being installed?
The next line then installs php54. Is yum looking at all my repositories, and looking for php54? Before it does so, how can I tell what is being installed?
I am not sure that I even asked the right questions, and appreciate any clarification. Thanks!
This upgrades or installs the package currently installed to a newer version. This is the same as install, except all other version(s) of the package are removed after the new package is installed.
Print verbose information - normally routine progress messages will be displayed.
Print 50 hash marks as the package archive is unpacked. Use with -v|--verbose for a nicer display.
Is used to install the latest version of a package or group of packages while ensuring that all dependencies are satisfied. (See Specifying package names for more information) If no package matches the given package name(s), they are assumed to be a shell glob and any matches are then installed. If the name starts with an @ character the rest of the name is used as though passed to the groupinstall command. If the name starts with a - character, then a search is done within the transaction and any matches are removed. If the name is a file, then install works like localinstall. If the name doesn't match a package, then package "provides" are searched (e.g. "_sqlitecache.so()(64bit)") as are filelists (Eg. "/usr/bin/yum"). Also note that for filelists, wildcards will match multiple packages.
rpm is really a pkg format, but you can also do operations with the rpm cmd.
However, the rpm cmd does not handle dependencies, whereas the yum cmd does operations with rpm files, but DOES handle dependencies automatically, so normally you'd use this, not rpm cmd.
What actually gets installed by any pkg is defined within the pkg and is unique to that pkg.
There is some good info in the man pages, as you seem to have found, but there are also lots of HOWTOs on the web.
Feel free to ask some more if you need to.
actually, I presume "rpm -qlf http://mirror.webtatic.com/yum/el6/latest.rpm" would also work
and you'll be able to see what files are in it. One thing that is odd is that you'd really NEVER see a file called "latest"... what is it??? I presume it's some repo files or something... so how you're messing with that file now is not very typical, as it's surely not going to install a package called "latest" whereas "php54" is the package (NOT the file) you're after, so that's more normal.
How can you tell what's being installed? it'll tell you at the time. Note that until you ask to install it, it's not going to check what is needed on your specific system in terms of dependencies.
I too had difficulties understanding yum and rpm when getting started. I will attempt to reply to your individual questions.
For starters, forgive me if this is redundant to you.
rpm is a package management tool that installs, queries, removes, updates, and performs integrity checks (among other things) with *.rpm packages. yum is a tool used to download and install rpm packages, along with any packages the new package may be dependent on. With that being said, I will now address your questions.
You said 'Where does it get installed?
Depending on the package, it may go in several locations. For instance, the most typical location will be under '/usr/bin/'. This is where executable files are commonly installed. Still, there may be what is called a 'modular' package, which is a package that contains many (more than one) associated file. Such files may be an executable (located in /usr/bin/) and a configuration file (located in /etc/). To solve the seemingly ridiculous riddle of 'where are the installation files', you can run the below rpm command:
rpm -qc [package name] (e.g. rpm -qc php54w)
The '-q' option enables a query, while the '-c' option enables a listing of all configuration files associated with the package name; this will also list the locations of those files.
You said 'Is it just one application/file?
When installing a package via rpm, it may be one file or multiple files. Its important to note that an rpm 'package' may be a combination of several files that work together to make a complete application. So, to answer this question, you may run the above-mentioned command, rpm -qc [package name] to list all associated configuration files for the package. If there are no files listed, the application is likely a standalone file. But chances are it contains at least one other files.
You said 'What is being installed?'
To find what's actually being installed on an rpm package, you can run the below command:
rpm -ql [package name] (e.g. rpm -ql systemd)
The -q option (of course) enables a query, while the -l option enables a listing of all associated files.
One more thing... when installing packages via yum, yum actually downloads and installs all packages the new package is dependent on; this is important for the above question of what's being installed. If yum is executed without any additional options (e.g. yum install [package]), it will report that it is downloading dependencies, and will even give a [y/n] prompt for approval before installed the additional packages. This too will help in understanding what's being installed.
I hope this info is helpful for both this post, as well as other rpm/yum usage for you.
Thank you mddesai, When I first used rpm to install the first application, did it ONLY install the following in the /etc/yum.repos.d/ directory? They yum looks at all my repos and tries to use one of them to install a given package?
When I first used rpm to install the first application, did it ONLY install the following in the /etc/yum.repos.d/ directory? They yum looks at all my repos and tries to use one of them to install a given package?
if you check the files that are contained in latest.rpm, it suggets so.
i suggest you to change enabled=1 to enabled=0 in webtatic.repo, so that every time you install any package it doesnt look in webtatic repository. when you want to install specific package from webtatic repo, you can use '--enablerepo=webtatic' option. to list available packages in webtatic repo, you can use following command.
# yum --disablerepo="*" --enablerepo="webtatic" list available
From the above response, you will know where files will be installed.
You can also use -i option to get more information
# rpm -qpi http://repo.webtatic.com/yum/el6/x86_64/php54w-5.4.16-1.w6.x86_64.rpm
warning: http://repo.webtatic.com/yum/el6/x86_64/php54w-5.4.16-1.w6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cf4c4ff9: NOKEY
Name : php54w Relocations: (not relocatable)
Version : 5.4.16 Vendor: Webtatic
Release : 1.w6 Build Date: Sun 09 Jun 2013 12:17:44 PM IST
Install Date: (not installed) Build Host: mock6.local
Group : Development/Languages Source RPM: php54w-5.4.16-1.w6.src.rpm
Size : 4657421 License: PHP
Signature : DSA/SHA1, Sun 09 Jun 2013 01:40:48 PM IST, Key ID b7434b06cf4c4ff9
Packager : Andy Thompson <firstname.lastname@example.org>
URL : http://www.php.net/
Summary : PHP scripting language for creating dynamic web sites
PHP is an HTML-embedded scripting language. PHP attempts to make it
easy for developers to write dynamically generated webpages. PHP also
offers built-in database integration for several commercial and
non-commercial database management systems, so writing a
database-enabled webpage with PHP is fairly simple. The most common
use of PHP coding is probably as a replacement for CGI scripts.
The php54w package contains the module which adds support for the PHP
language to Apache HTTP Server.