The hot summer is over and a harvest season is coming!
I should also summarize the results of my study ...
August 5 began to join the "caravan", with Marco Learning Linux operation and maintenance knowledge; I quoted the network class, can only work through video courseware to learn, do not learn to learn to scare a jump, Linux really is not so easy, which script needless to say, the right expression is enough head big ... (omit n words here)! Anyway, after listening to the configuration of Yum, I summarize and record it to make it easier to check later.
First, what is Yum
Yum is a front-end tool for RPM and is widely used to solve RPM dependencies.
Second, what is the Yum source
The Yum source is a part of the rpm that is put together into a warehouse, and in this warehouse there is a corresponding table (or database) to resolve the dependency, so the Yum command will call the RPM package in this warehouse when the program is installed, and if it encounters a dependency, the database will be resolved automatically. This will reduce the amount of work for the administrator.
Three, yum source sub-local source and network source 2 categories
1, local source can build local warehouse, also can build HTTP, NFS, FTP protocol network warehouse according to need.
(1) Local repository-local source
A. Insert the Centos6.5 mirror disc or locate the image file
Create disc mount point # Mkdir/media/cdrom
Mount Disc # Mount/dev/cdrom/media/cdrom
Create a local warehouse location # Mkdir/home/repo
Copy the RPM package on the disc past # cp/media/cdrom/packages/*/home/repo/pachages
After a period of time command completion, RPM package a lot of, so the time is long.
B. Editing a repo file
The file directory (etc/yum.repos.d/) suffix must be. Repo end, for experimental purposes, use my local Yum source, remove the system comes with 4. Repo (rm-fr./*) so they don't take effect!
Edit your own repo file
# Vi Local.repo
"Local-repo" #自己本地的库的名字随意起.
Name=wenjia ' s local repo (a description of the library)
Baseurl=file:///home/repo (the repository address of the Yum source)
ENABLE={1|0} #是否启用该yum源
GRPCHECK={1|0} #是否检查包的完整性
Gpgkey=file:///home/repo/rpm-gpg-key-centos-6
#在光盘目录中能找到该文件, placed in the specified path, such as/home/repo
Save exit! OK, my local source to create success, sense of accomplishment! I do this for the first time, but the installation test found error 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0024.gif "alt=" J _0024.gif "/> ...
C. Think carefully, as if something is missing????? Why do you have to install a package that will know your dependencies? Oh, yes, that database hasn't been created yet! That is, you just put the package in a local directory, not really a YUM warehouse!!!!!
Okay, all right! Install the Createrepo command first
#cd/home/repo/packages
#rpm-IVH createrepo-#####
#createrepo-V/home/repo (This step is very important, create the index information repodate, under the repository address of the configuration file Yum source must have repodate directory, In other words: The parent directory where repodate is the Yum source)
D. Check/home/repo under the Repodate directory, let's test, #yum clean all clears the cache, everything ok!
Oops, 18:02, off duty! Although not, a little ugly, but still small achievements ... (never copied), another day to refine the content behind ...
Centos 6.5 Yum Source Configuration summary