RPM Signifie Redhat Package Manager . La commande RPM est utilisée pour gérer les packages logiciels rpm sur votre machine Linux. En utilisant la commande rpm, nous pouvons installer , mise à niveau , supprimer , liste colis.
1. Installation de RPM dans le système.
Utilisez la commande ci-dessous pour installer et vsftpd RPM dans le système.
# rpm -ivh vsftpd-2.3.5-2.el6.i686.rpm
Exemple de sortie :
warning: vsftpd-2.3.5-2.el6.i686.rpm: Header V3 DSA/SHA1 Signature, key ID e9bc4ae1: NOKEY Preparing... ########################################### [100%] 1:vsftpd ########################################### [100%]
2. Mettez à jour le package RPM installé.
Si vous avez déjà installé un RPM, vous pouvez simplement le mettre à niveau avec une nouvelle version.
# rpm -Uvh vsftpd-2.3.5-2.el6.i686.rpm
3. Vérifiez le package RPM installé.
Après l'installation d'un package pour vérifier la bonne installation, utilisez -q pour interroger le package installé.
# rpm -q vsftpd vsftpd-2.3.5-2.el6.i686
4. Répertorier tous les packages RPM installés.
L'exemple ci-dessous répertorie tous les packages installés sur votre système.
# rpm -qa
Exemple 5 :supprimer le package RPM installé.
La commande ci-dessous effacera (désinstallera) le package rpm de votre système.
# rpm -e vsftpd vsftpd-2.3.5-2.el6.i686
6. Obtenez plus de détails sur le package RPM.
Cette commande vous montrera des détails sur un RPM, comme le nom, la version et une courte description.
# rpm -qip vsftpd-2.3.5-2.el6.i686.rpm
Exemple de sortie :
warning: vsftpd-2.3.5-2.el6.i686.rpm: Header V3 DSA/SHA1 Signature, key ID e9bc4ae1: NOKEY Name : vsftpd Relocations: (not relocatable) Version : 2.3.5 Vendor: (none) Release : 2.el6 Build Date: Thu 23 Feb 2012 07:38:59 AM IST Install Date: (not installed) Build Host: localhost Group : System Environment/Daemons Source RPM: vsftpd-2.3.5-2.el6.src.rpm Size : 453460 License: GPLv2 with exceptions Signature : DSA/SHA1, Fri 11 Jan 2013 06:48:45 PM IST, Key ID 8fbd1684e9bc4ae1 URL : http://vsftpd.devnet.ru Summary : Very Secure Ftp Daemon Description : vsftpd is a Very Secure FTP daemon. It was written completely from scratch.
7. Répertorier tous les fichiers du package RPM.
Cette commande listera tous les fichiers à l'intérieur d'un package RPM. Ceci est utile pour trouver des fichiers importants de RPM.
# rpm -qlp vsftpd-2.3.5-2.el6.i686.rpm
Exemple de sortie :
warning: vsftpd-2.3.5-2.el6.i686.rpm: Header V3 DSA/SHA1 Signature, key ID e9bc4ae1: NOKEY /etc/logrotate.d/vsftpd /etc/pam.d/vsftpd /etc/rc.d/init.d/vsftpd /etc/vsftpd /etc/vsftpd/ftpusers /etc/vsftpd/user_list /etc/vsftpd/vsftpd-403-serv.html /etc/vsftpd/vsftpd-403.html /etc/vsftpd/vsftpd-404.html /etc/vsftpd/vsftpd-browse.html /etc/vsftpd/vsftpd-browse_line.html /etc/vsftpd/vsftpd-site.conf.sample /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.pasv_rules /etc/vsftpd/vsftpd_conf_migrate.sh /usr/sbin/vsftpd /usr/share/doc/vsftpd-2.3.5 /usr/share/doc/vsftpd-2.3.5/AUDIT /usr/share/doc/vsftpd-2.3.5/BENCHMARKS /usr/share/doc/vsftpd-2.3.5/BUGS /usr/share/doc/vsftpd-2.3.5/COPYING /usr/share/doc/vsftpd-2.3.5/Changelog /usr/share/doc/vsftpd-2.3.5/Example /usr/share/doc/vsftpd-2.3.5/Example/HTTP_TEMPLATES /usr/share/doc/vsftpd-2.3.5/Example/HTTP_TEMPLATES/403-serv.html /usr/share/doc/vsftpd-2.3.5/Example/HTTP_TEMPLATES/403.html /usr/share/doc/vsftpd-2.3.5/Example/HTTP_TEMPLATES/404.html /usr/share/doc/vsftpd-2.3.5/Example/HTTP_TEMPLATES/browse.html /usr/share/doc/vsftpd-2.3.5/Example/HTTP_TEMPLATES/browse_line.html /usr/share/doc/vsftpd-2.3.5/Example/INTERNET_SITE /usr/share/doc/vsftpd-2.3.5/Example/INTERNET_SITE/README /usr/share/doc/vsftpd-2.3.5/Example/INTERNET_SITE/vsftpd.conf /usr/share/doc/vsftpd-2.3.5/Example/INTERNET_SITE/vsftpd.xinetd /usr/share/doc/vsftpd-2.3.5/Example/INTERNET_SITE_NOINETD /usr/share/doc/vsftpd-2.3.5/Example/INTERNET_SITE_NOINETD/README /usr/share/doc/vsftpd-2.3.5/Example/INTERNET_SITE_NOINETD/vsftpd.conf /usr/share/doc/vsftpd-2.3.5/Example/PER_IP_CONFIG /usr/share/doc/vsftpd-2.3.5/Example/PER_IP_CONFIG/README /usr/share/doc/vsftpd-2.3.5/Example/PER_IP_CONFIG/hosts.allow /usr/share/doc/vsftpd-2.3.5/Example/README /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_HOSTS /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_HOSTS/README /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_USERS /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_USERS/README /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_USERS/logins.txt /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_USERS/vsftpd.conf /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_USERS/vsftpd.pam /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_USERS_2 /usr/share/doc/vsftpd-2.3.5/Example/VIRTUAL_USERS_2/README /usr/share/doc/vsftpd-2.3.5/FAQ /usr/share/doc/vsftpd-2.3.5/INSTALL /usr/share/doc/vsftpd-2.3.5/LICENSE /usr/share/doc/vsftpd-2.3.5/README /usr/share/doc/vsftpd-2.3.5/README.security /usr/share/doc/vsftpd-2.3.5/REWARD /usr/share/doc/vsftpd-2.3.5/SECURITY /usr/share/doc/vsftpd-2.3.5/SECURITY/DESIGN /usr/share/doc/vsftpd-2.3.5/SECURITY/IMPLEMENTATION /usr/share/doc/vsftpd-2.3.5/SECURITY/OVERVIEW /usr/share/doc/vsftpd-2.3.5/SECURITY/TRUST /usr/share/doc/vsftpd-2.3.5/SIZE /usr/share/doc/vsftpd-2.3.5/SPEED /usr/share/doc/vsftpd-2.3.5/TODO /usr/share/doc/vsftpd-2.3.5/TUNING /usr/share/doc/vsftpd-2.3.5/vsftpd.xinetd /usr/share/man/man5/vsftpd.conf.5.gz /usr/share/man/man8/vsftpd.8.gz /var/ftp /var/ftp/pub
8. Rechercher RPM auquel appartient un fichier.
En utilisant la commande ci-dessous, vous pouvez trouver le fichier auquel rpm il appartient.
# rpm -qf /etc/vsftpd/ftpusers vsftpd-2.3.5-2.el6.i686
9. Lister les dépendances du package RPM.
Cette commande listera toutes les dépendances de rpm.
# rpm -qpR vsftpd-2.3.5-2.el6.i686.rpm
10. Rétablissez le package RPM vers une version plus ancienne.
Si vous avez accidentellement mis à niveau votre rpm vers une version plus récente, vous pouvez le rétrograder à nouveau en utilisant la commande ci-dessous.
rpm -Uvh --oldpackage vsftpd-<old-version>.el6.i686.rpm