Use the installation CD to create a local yum source to install the RPM package-in command line mode
Source: Internet
Author: User
Suddenly I want to write this article because the company's computer does not have a corresponding driver when installing Linux, or the graphics card is too bad. Linux can only be installed in the minimal form. the final installation result is: no GCC, no Firefox or GNOME. I can only install it myself. I wrote this article because the company's computer didn't have the corresponding driver when installing Linux, or the graphics card was too bad. Installation can only be minimized
Linux: no GCC, Firefox, or GNOME. You can only install it by yourself. write down this article as a note,
Prevent yourself from forgetting.
Er .... I installed it through a virtual machine and used a CentOS CD image. Attach the CD first. we strongly recommend that you operate it under the root user. the command is as follows: (operate in order)
1. mkdir/media/cdrom
2. mount-t iso9660/dev/cdrom/media/cdrom
After mounting the optical drive, you need to configure the yum configuration file before using the yum command. generally, yum searches for the local path or network path of the installation file in the configuration file during execution, therefore, modify the configuration file so that yum can find the local CD. the operation command is as follows: (operate in order)
1. cd/etc/yum. repos. d
2. cp *. repo/home (this is because the yum default configuration file is already available. this is the main configuration file by default when you are looking for the installation package. it will interfere with the configuration file to be written later and back up it slightly)
3. rm *. repo
4. vi local. repo (create a new configuration file)
The statement is as follows:
[Dvd]
Name = install CentOS DVD
Baseurl = file: // media/cdrom (the path of the attached disc)
Enabled = 1
Gpgcheck = 0
Save it. Before you talk about installing the software package, let's talk about the commands that yum usually uses:
Yum list (display which software can be installed on the installation source, such as MySQL, GCC ...)
Yum grouplist (in classification mode, it shows which types of software can be installed, such as Additional Development and Debugging tools)
Yum groupinstall "Enter the software type name" (for example, yum groupinstall "Debugging tools ")
Yum clean all (clear the cache of yum during use)
I will only talk about the yum command used in this article. for the remaining parameters, please go to Baidu. In addition, I am using different types of software installation. I am too lazy to install them one by one, and I will install them all at once. The operation command is as follows: (operate in order)
1. yum grouplist>/home/list (store the searched list in the list text file to see which software types are available)
2. yum groupinstall "Enter the software type you want to install"
In this way, you can install the software you want. Yum will handle the dependencies of each software, so you don't have to work hard to find the dependencies, so as not to bother. In the end, this is in CentOS, RedHat, fedora and other publishers should use the same source code. However, other vendors in Ubuntu do not know. if there is a better method, I hope you can tell me. I am very grateful.
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.