arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SOME EVERGREEN USEFUL LINUX COMMANDS
#6
Some Basic Commands For CentOS are not too different as Debian or Ubuntu.
For example

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. 

yum provides <file name>


Used to determine which packages provide a specific file or feature.


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.


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

# 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:

# 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


# 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:

# 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

# 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


# rpm -e vsftpd-2.2.2-11.el6_4.1.i686 --nodeps
[code]
[/code]

Regards:
Sagher


Heart LOVE FOR ALL  HATRED FOR NONE Heart


Messages In This Thread
SOME EVERGREEN USEFUL LINUX COMMANDS - by sagher - 03-13-2017, 06:08 AM
RE: SOME EVERGREEN USEFUL LINUX COMMANDS - by sagher - 03-18-2017, 05:28 AM

Possibly Related Threads…
Thread
Author
Replies
Views
Last Post

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting