03-18-2017, 05:28 AM
Some Basic Commands For CentOS are not too different as Debian or Ubuntu.
For example
Used to remove specified packages, along with any other packages dependent on the packages being removed.
Used to determine which packages provide a specific file or feature.
This command is used to find any packages containing the specified keyword in the description, summary, packager and package name fields of RPMs in all repositories.
Second is to install RPM packages.
if you have backup of package
Use -ivh switch along with rpm command as shown below
If directly from web link.But for this you need to have the proper link of the rpm you want to download or install:
if not don normally then use force installation method.Use --force argument along with -ivh switch as shown below to install forcefully without dependencies
Finally. Upgrading or removing the RPM packages.Use -Uvh switch along with rpm command
Upgrade:
Remove:
You can uninstall a package using -e switch along with rpm command
Use an extra argument --nodeps along with rpm command to remove/uninstall a package without dependencies
[/code]
Regards:
Sagher
For example
Code: (Select All)
yum install <package name>
yum update <package name>
yum check-update
yum remove <package name>
Used to remove specified packages, along with any other packages dependent on the packages being removed.
Code: (Select All)
yum provides <file name>
Used to determine which packages provide a specific file or feature.
Code: (Select All)
yum search <keyword>
This command is used to find any packages containing the specified keyword in the description, summary, packager and package name fields of RPMs in all repositories.
Code: (Select All)
yum localinstall <absolute path to package name/s>
Second is to install RPM packages.
if you have backup of package
Use -ivh switch along with rpm command as shown below
Code: (Select All)
# cd /root/rpms
# rpm -ivh cvs-1.11.23-16.el6.i686.rpm
Preparing... ########################################### [100%]
1:cvs ########################################### [100%]
If directly from web link.But for this you need to have the proper link of the rpm you want to download or install:
Code: (Select All)
# rpm -ivh ftp://ftp.pbone.net/mirror/ftp.centos.org/6.5/os/i386/Packages/cvs-1.11.23-16.el6.i686.rpm
Retrieving ftp://ftp.pbone.net/mirror/ftp.centos.org/6.5/os/i386/Packages/cvs-1.11.23-16.el6.i686.rpm
warning: /var/tmp/rpm-tmp.z3VsTc: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:cvs ########################################### [100%]
if not don normally then use force installation method.Use --force argument along with -ivh switch as shown below to install forcefully without dependencies
Code: (Select All)
# rpm -ivh vsftpd-2.2.2-11.el6_4.1.i686.rpm --force
warning: vsftpd-2.2.2-11.el6_4.1.i686.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:vsftpd ########################################### [100%]
Finally. Upgrading or removing the RPM packages.Use -Uvh switch along with rpm command
Upgrade:
Code: (Select All)
# rpm -q vsftpd
vsftpd-2.0.5-28.el5.i386
# rpm -Uvh vsftpd-2.2.2-11.el6_4.1.i686.rpm
warning: vsftpd-2.2.2-11.el6_4.1.i686.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:vsftpd ########################################### [100%]
Remove:
You can uninstall a package using -e switch along with rpm command
Code: (Select All)
# rpm -qa | grep cvs
cvs-1.11.23-16.el6.i686
# rpm -e cvs-1.11.23-16.el6.i686
Use an extra argument --nodeps along with rpm command to remove/uninstall a package without dependencies
Code: (Select All)
# rpm -e vsftpd-2.2.2-11.el6_4.1.i686 --nodeps
[code]
Regards:
Sagher
![Heart Heart](https://post4vps.com/images/emoji/heart.png)
![Heart Heart](https://post4vps.com/images/emoji/heart.png)