Yum库配置简单方法
好久没写博客了,正如我之前所说,在考试。大学考试就是一堆理论考来考去,我不是一个善于高谈阔论的人,也不是一个擅长考试的人,考的很糟糕,可以说,学习越深入,我就越不擅长考试了。
更多语法还是请参考已有的repo文件。
完事后,作为用户其实就没啥事了。而Yum库本身还是需要一定的配置,否则不能正常工作。
为什么要配置呢?不配置Yum怎么知道他的库里有哪些包呢?包的详细信息呢?怎么做分组呢?怎么知道包与包之间的依赖关系呢?正是因为不知道,所以要有个配置文件,其实准确的说是源文件,来告诉别人这个Yum库的若干国情。
Yum库的软件,作为实验我挑选了google-chrome-stable和linuxqq的rpm包,这两个软件都是闭源的,所以一定不会出现在官方的Yum库里。
Yum的配置文件有五个,必须放在Yum库的repodata文件夹下,其中有四个(他们是filelists.xml.gz other.xml.gz primary.xml.gz repomd.xml)可以由一句命令createrepo(可能需要安装同名rpm包)自动生成,但最后一个文件比较难对付,第一,他不可能手写,打开就知道,多国语言,想必不可能有人懂这么多语言。第二,可以有命令来生成,和生成前四个文件的命令还是同一个,但他有个古怪的要求,必须有一个其他库的这个文件作为模板,才可以生成,说真的,玩这么多年电脑从没见过这种要求,如果你的电脑上或光盘里已经有Yum库(DVD版本的安装光盘几乎都有),并且有名字中带comps的那个xml配置文件(可能已经被gzip压缩),就可以用他,如果没有,用find命令全系统搜索,关键字是*comps*xml*,我的fedora就有这样一个文件。如果这样都没有找到,那么只能从其他电脑上找了,网上我Google过,没有发现人家把这个文件挂上来。
假设已经找到(不会找不到吧,DVD里真有),生成配置文件的整个命令如下:createrepo -g [该模板文件地址,注意后缀名是xml] [Yum库地址],在我的电脑上,这条命令是这样的,createrepo -g /var/cache/yum/i386/14/fedora/2d112e279cf18476b72e5b30f60c1aa55e0297e7a05f4d9891879ee83d298e11-comps-f14.xml /home/bachue/Downloads/。这条命令将自动在库文件下创建repodata文件夹,并创建好五个配置文件。这样,配置就算完成了。
如果要去试试这个库能否正常工作,一定不要忘了,Yum是有缓存的,如果不久前刚刚扫描过这个Yum库,就不会再去扫描一遍,但你其实已经改过他的配置,或是有新软件入库了,而Yum却不知道,以至于你的操作看上去就像没有生效,这样可能会让你以为Yum没有正常工作。我就出过这样的糗事。清除缓存的命令是yum clean all,一定不要忘了。
讲解完毕,是否很简单呢?
在没学RHCE以前,感觉deb包很强,毕竟不容易出现依赖性问题,学了RHCE,感觉rpm才是真的好,功能实在太强大了。
2023年12月12日 01:27
Starting your journey to 구글 상위노출 excellence begins with in-depth keyword research, ensuring you target the right audience.
2023年12月12日 19:40
제주오피 redefined my Jeju trip. Its versatility and amenities made it a memorable journey.
2023年12月12日 20:41
English-speaking 러시아마사지 therapists ensure you get the massage you desire.
2023年12月14日 23:59
This is a well crafted article, if perhaps just about all bloggers provided the same worth of content while you, the web will be a far better place. Please keep it up! 스포츠중계
2023年12月17日 15:34
Explore the wonders of 울산오피, a sanctuary for rejuvenation, where stress melts away and holistic well-being takes center stage.
2023年12月19日 01:33
누누티비's seamless streaming experience sets the standard for other platforms.
2023年12月21日 23:17
부달's support for local businesses is commendable. It connects travelers with unique experiences and services in Gyeongnam and Busan.
2023年12月23日 20:30
뉴토끼 is my trusted companion on my webtoon journey, guiding me to the best stories.
2023年12月24日 14:13
I confidently recommend Tipping for all your 설문조사 사이트 추천 needs.
2023年12月26日 22:06
I really treasure your piece of work, Great post. 카지노사이트
2023年12月26日 22:48
Reliability is the name of the game at 축구중계.
2023年12月27日 04:36
The rise of self-publishing has contributed to the growth of independent book festivals and events. self publishing on amazon
2023年12月30日 23:05
충주휴게텔 exceeded my expectations. The staff is professional, and the Swedish massage was heavenly.
2023年12月31日 13:50
Your article has proven useful to me. It’s very informative and you are obviously very knowledgeable in this area. You have opened my eyes to varying views on this topic with interesting and solid content. Divine Revelations
2024年1月06日 22:09
After a hectic week, a visit to 부천출장마사지 was just what I needed. Total relaxation and skilled therapists!