Centos -- yum to configure the local data source preparation tool: centos installs image file 1 and mounts the image file. I will use the virtual machine to set it here. if the device status is already connected, 2 copies the image file to the server directory, after copying the data in the opt directory 3, go to the yum configuration directory and edit Centos -- yum to configure the local data source.
Preparation Tool: centos installation Image File 1. mount the image file. I will use the virtual machine to set it here. the device status has been checked. 2. copy the image file to the server directory. put it in the/opt directory. after copying, go to the yum configuration directory and edit the yum configuration file # cd/etc/yum. repos. d/# vi CentOS-Media.repo
Modify the baseurl content so that it points to the local image file directory:
Baseurl = file: // opt/soft/CentOS_6.3_Final/-- Local disk Mount Directory
Gpgcheck = 0 -- check GPG-KEY, 0 is not checked, 1 is checked
Enabled = 1 -- enable yum source, 0 is not enabled, 1 is enabled 4. centOS-Debuginfo.repo, CentOS-Base.repo and other configuration renamed or deleted, you can bypass the network for the installation # mv CentOS-Base.repo CentOS-Base.repo.backup
# Music CentOS-Debuginfo.repo
CentOS-Debuginfo.repo.backup5. execute the yum update command # yum clean all
# Yum update displays the following picture, indicating that the configuration is successful.
6. install mysql example 7. detailed description of the yum command
Install yum <选项> <软件包|软件名|组名> Install package install specified installation package localinstall package local installation package groupinstall package group install upgrade yum <选项> <软件包|软件名|组名> Update all software packages that can be updated update package update the specified package check-update checks the software packages that can be upgraded in the system. Groupupdate group1: update the software package in group1. Uninstalling (it is strongly not recommended to use yum to uninstall the package) will also detach other associated packages when uninstalling the package, causing serious system crash yum <选项> <软件包|软件名|组名> Remove package1: uninstall package1 erase package1: uninstall package1 groupremove group1: uninstall the packages included in group1. Query yum <选项> <软件包|软件名|组名> Info : Display the installation package information list: displays the list of all packages that have been installed and can be installed in the repository : Displays the installation status of the specified package grouplist: displays the groups of deplist in the repository. : View package1 dependency groupinfo : Display the program group group1 information search : Find a software package
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.