How to update yum and apt-get online in Centos

Source: Internet
Author: User

The rpm package and deb package are the most common installation packages in two Linux systems. When installing some software or services, you have to deal with them. The rpm package is mainly used in the RedHat series including ora and other released Linux systems. The deb package is mainly used in the Debian series, including the Popular Ubuntu and other released versions. We know that to install the ready-made packages, the command for installing the rpm package is "rpm-parameter", and the command for installing the deb package is "dpkg-parameter ". However, the Linux system is very convenient and user-friendly, that is, many software or services do not need to be downloaded, and the corresponding commands can be directly used for management, I think it is a concept of "Cloud. Yum can be used to run rpm packages, for example, managing a software on the Fedora system: install: yum install <package_name> uninstall: yum remove <package_name> Update: yum update <package_name> apt-get can be used to operate the deb package. For example, to manage a software on Ubuntu: install: apt-get install <package_name> uninstall: apt-get remove <package_name> update: apt-get update <package_name> 1. Install yum in redhat
In Linux Redhat 9.0, the YUM server is used to manage the rpm package upgrade method. Since Redhat has stopped operating Linux Redhat 9.0,
Therefore, we must find another way to upgrade our suite,
In this case, the YUM server is used to manage rpm kit upgrade because it can avoid suite dependency and Security loss.
To renew the policyum server, you must first upload the following program: yum-2.0.4-1.rh.fr.i386.rpm this case can go to http://ayo.freshrpms.net/#,
In this case, enter su in the terminal and then upload your root password,
After entering the root, enter the following command: rpm-ivh yum-2.0.4-1.rh.fr.i386.rpm security after this program, you can use the column command to use the YUM server to manage rpm kit upgrade. yum update upgrades your RPM suite. This command is equivalent to apt-get update and apt-get install. yum install new RPM suite.
Yum clean clears unnecessary memory programs that have been installed.
Yum remove your RPM kit. II. Use of yum
1. Redhat yum advanced package management
1). Use YUM to install and delete Software
It is common to install the system to add and delete software. yum is also competent for this task, as long as the software is installed by rpm. The installation command is: yum install xxx. yum queries the database to check whether this software package exists. If yes, check its dependency conflict. If no dependency conflict exists, download and install it; if yes, you will receive a prompt asking if you want to install dependencies at the same time or delete conflicting packages. You can make your own judgment. The DELETE command is yum remove xxx. Like the installation command, yum also queries the database and provides a prompt to solve the dependency.
2) install the software package with YUM
Command: yum install <package_name>
3). Use YUM to delete the Software Package
Command: yum remove <package_name> Use YUM to query Software Information
We often encounter such a situation. To install a software, we only know that it has something to do with it, but we cannot know its name exactly. In this case, the yum query function takes effect. You can use commands such as yum search keyword to search. For example, if you want to install Instant Messenger, but you don't know what it is, you can use commands such as yum search messenger to search, yum searches for all available rpm descriptions and lists all rpm packages related to messeger. Therefore, we may get gaim, kopete, and so on, and select from them. Sometimes we install a package without knowing its purpose. We can use the yum info packagename command to obtain information.
1). Use YUM to find the Software Package
Command: yum search <keyword>
2) list all installable software packages
Command: yum list
3). List all updatable software packages
Command: yum list updates
4). List all installed software packages
Command: yum list installed
5) list all software packages installed but not in Yum Repository
Command: yum list extras
6). List the specified software packages
Command: yum list <package_name> 3,
Use of apt-get
2. Advanced package management method apt-get In Ubuntu
In addition to the ease of apt, one of the major advantages of apt-get is that it greatly reduces the chance of a so-called dependency relationship nightmare (dependency hell), even if it falls into a dependency hell, apt-get also provides good assistance to help you escape from the magic cave.
Apt-get is usually found together with online compressed packages, which can be downloaded or installed from the Internet. There are more than 200 official debian images around the world, and a wide range of unofficial software packages provide websites. Different versions of the release based on D ebian are used. The software repository you use may need to be manually selected or set automatically. You can get a complete list of images from the Debian official website. Many unofficial websites provide unofficial software packages for various special purposes. Of course, using unofficial software packages poses more risks.
Software packages are prepared for a basic Debian release (from unstable to stable) and divided into different categories (such as main contrib nonfree ), this is based on the debian Free Software Program (also known as dfsg), because the United States restricts the export of encryption software, there is also a non-us category. 3. Common APT command parameter apt-cache search package
Apt-cache show package
Obtains information about the package, such as description, size, and version. sudo apt-get install package
Installation Package
Sudo apt-get install package--reinstall re-installation package
Sudo apt-get-f install fix and install "-f = -- fix-missing"
Sudo apt-get remove package Delete package
Sudo apt-get remove package--purge delete a package, including deleting a configuration file.
Sudo apt-get update source
Sudo apt-get upgrade updates installed packages
Sudo apt-get dist-upgrade System
Sudo apt-get dselect-upgrade using dselect
Apt-cache depends package for dependency usage
Apt-cache rdepends package is used to check which packages are dependent on this package.
Sudo apt-get build-dep package installation-related compilation environment
Apt-get source package download the source code of the package
Sudo apt-get clean & sudo apt-get autoclean clear useless packages
Sudo apt-get check whether any corrupted dependency exists

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.