RPM or Red Hat Package Manager is the default package management solution for Linux distributions based on Red Hat Linux. RPM vai Red Hat Package Manager ir noklusējuma pakete pārvaldības risinājumu Linux sadali, pamatojoties uz Red Hat Linux. It's a pretty useful way to easily install, upgrade, and un-install packages on Linux machines. Tas ir diezgan noderīgs veids, kā viegli uzstādīt, modernizāciju, un ANO programmu nodrošinājuma paketēm Linux machines. I remember the days when every Linux package had to be compiled. Es atceros dienu, kad katra Linux pakete bija jāapkopo. Let's see how to perform some basic tasks with RPM. Let's redzēt, kā veikt dažas pamata uzdevumus, apgr. / min.
List All Packages Speciālie piedāvājumi
Before installing a new package or upgrading and old one you sometimes want to check to make sure that it isn't already installed. Pirms uzstādīt jaunas iepakojuma vai modernizāciju un vecajam tu dažreiz vēlaties pārbaudīt, lai pārliecinātos, ka nav jau instalēti. Here's how you can get a list of all installed RPM packages: Lūk, kā jūs varat iegūt sarakstu ar visām instalētajām RPM iepakojumiem:
# rpm -qa # Rpm-qa
gawk-3.1.3-10.1 mūlāps-3.1.3-10.1
pax-3.0-9 pax-3,0-9
krbafs-1.2.2-6 krbafs-1.2.2-6
esound-0.2.35-2 esound-0.2.35-2
perl-XML-Encoding-1.01-26 perl-XML-Encoding-1,01-26
perl-Digest-SHA1-2.07-5 perl-Digest-SHA1-2,07-5
… ...
Now a list of this kind can be pretty confusing. Tagad šāda veida sarakstu var diezgan mulsinoša. What I like to do is use this command along with grep . Tas, ko es vēlētos darīt, ir izmantot šo komandu kopā ar grep. I filter the search with the package I'm looking for. Es filtrs meklēšanu paketi I'm looking for. So, if I'm trying to check if a certain PHP package is installed I would run the following search: Tātad, ja es cenšos, lai pārbaudītu, vai noteiktu PHP pakete ir uzstādīts es palaist šādu meklēšana:
# rpm -qa | grep php # Rpm-qa | grep php
php-pdo-5.2.0-1.rhel4.ct php-CAN-5.2.0-1.rhel4.ct
php-mbstring-5.2.0-1.rhel4.ct php-mbstring-5.2.0-1.rhel4.ct
php-mysql-5.2.0-1.rhel4.ct php-mysql-5.2.0-1.rhel4.ct
php-imap-5.2.0-5 php-IMAP-5.2.0-5
php-5.2.0-1.rhel4.ct php-5.2.0-1.rhel4.ct
php-cli-5.2.0-1.rhel4.ct php-CLI-5.2.0-1.rhel4.ct
php-gd-5.2.0-1.rhel4.ct php-gd-5.2.0-1.rhel4.ct
I can see what's already installed and then decide if I need to install, upgrade, or remove anything. Es varu redzēt, kas jau ir uzstādītas un tad izlemt, vai man ir nepieciešams instalēt, modernizāciju, vai noņemt neko.
Install and Upgrade Packages Uzstādīt un Upgrade Paketes
There are a couple of websites I use to get my RPM packages – Ir tīmekļa vietņu varu izmantot, lai saņemtu manu RPM paketes pāris -- rpm.pbone.net rpm.pbone.net and un RPM Find RPM Meklēt . . After downloading the .rpm file here's how you can install a package: Pēc lejupielādes. Rpm faila šeit, kā jūs varat instalēt iepakojumā:
# rpm -ivh package-name.rpm # Rpm-plain kompleksa name.rpm
To upgrade a package: Lai uzlabotu iepakojumā:
# rpm -Uvh package-name.rpm # Rpm-Uvh kompleksa name.rpm
You will quite often get an error from RPM saying it needs some other packages installed to install or upgrade the package you are trying to install. Jūs diezgan bieži saņemt kļūda no RPM sakot, ir vajadzīgas dažas citas paketes uzstādīt instalēt vai atjaunināt paketi, kuru jūs mēģināt instalēt. This is commonly referred to as “dependancy hell”. Tas ir parasti sauc par "dependancy ellē". You just have to go back to the website from where you downloaded the package and look for the packages it depends on, and install them first. Jums tikai jādodas atpakaļ uz tīmekļa vietni, no kurienes jums lejupielādēt lietošanas un meklēt iepakojumu tā ir atkarīga, un tos instalēt vispirms.
Remove Packages Noņemt Packages
Removing packages with RPM is just as simple as installing or upgrading them. Noņemot iepakojumu ar RPM ir tikpat vienkārša kā aprīkošanas un modernizācijas viņiem. You need to make sure you get the complete name of the package you are trying to remove. Jums nepieciešams pārliecinieties, ka saņemat pilnu nosaukumu, iepakojuma Jūs mēģināt izņemt. Use the command to list the packages as shown above to get the full name of the package. Izmantojiet komandu sarakstu, iepakojumu, kā norādīts iepriekš, lai iegūtu pilnu nosaukumu paketi. Then run the following command: Tad palaidiet komandu:
# rpm -e package-name.rpm # Rpm-e kompleksa name.rpm
Beware of getting into dependancy issues here as well. Uzmanieties no nokļūst dependancy jautājumi here as well.























One Response One Response
Stay in touch with the conversation, subscribe to the Uzturēt kontaktus ar sarunu, abonēt RSS feed for comments on this post RSS barību komentārus par šo ziņu . .
Continuing the Discussion Turpinot iztirzājumu