Advanced yum skills

Source: Internet
Author: User
Tags what parameter
As a RHCA, of course there are some tips for managing yum. I used to think that others would, but later I realized that only I knew that good things should be shared. In addition, I have some suggestions for installing software in the production environment. Use rpm, deb, and other packages for management and installation. do not use compilation and installation .... As a RHCA, of course there are some tips for managing yum. I used to think that others would, but later I realized that only I knew that good things should be shared. In addition, I have some suggestions for installing software in the production environment. Use rpm, deb, and other packages for management and installation. do not use compilation and installation. The reasons are as follows.
 
1. compilation and installation are troublesome and time-consuming.
2. you may not remember the compilation parameters in the future, and your next maintenance is also troublesome. because he does not know what parameter compilation you used at the time. your boss may be concerned about this.
3. of course, some people will say that the compilation performance is high, but it doesn't actually happen. the chance of a problem is also high. what is the purpose of a program performance improvement of 3%. In fact, there is not much use. of course, if you use the LFS system as the production environment, there will be differences, because any package you compile is your own. I believe you won't.
4. rpm-qf can check that the file is the package. if one day, one file in your system is broken. You can use the rpm method to find out one, but you have a headache after compiling and installing it. Oh, my God, this package is generated by the software.
5. I do not want to install it from the source program. Not because it is difficult. On the contrary, it is quite easy. I just don't want to mess up my system. If I update a program installed from the source, some files are often not deleted. Sometimes this situation may cause problems. If you want to delete this program, how do you ensure that all installed files are deleted? As much as possible, I would rather use RPM for installation. Use RPM to update and delete, and RPM is very clean.
 
 
 
Well, the following highlights:
 
Tip 1: Speed up your yum.
 
The yum extension yum-fastestmirror is used. I personally think this plug-in is very effective and the speed is significantly improved,
 
Yum-y install yum-fastestmirror note: on Centos 4, the name is yum-plugin-fastestmirror.
 
Tip 2: Expand Your rpm Package
 
Many packages are not officially available. how can I fix it? should I compile it myself? Okay. you have installed this package. this is from redhat5. You can select multiple options.
 
(1. use the source of wieers
 
You can come to http://dag.wieers.com/rpm/FAQ.php# B here to find # Red Hat Enterprise Linux 5/i386:
 
Rpm-Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm# Red Hat Enterprise Linux 5/x86_64:
 
Rpm-Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm (2. use RPEL source
 
This is RPEL's enhanced software package source for the rhora class RHEL system, also known as the unofficial source, the address http://fedoraproject.org/wiki/EPEL/FAQ for the project
 
Rpm-ivh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm # This is the source of Centos5 (3. use CentALT
 
This is an enhanced source for RHEL, with the latest such as nginx and mysql.
 
Rpm-ihv http://centos.alt.ru/repository/centos/5/i386/centalt-release-5-3.noarch.rpm (4. source of ATrpms
 
This warehouse provides many applications that use the latest technology and multimedia tools such as myth-TV. for example, multimedia tools have some patented technologies, such as mp3/rmvb decoding, at the beginning, we mainly provided some natural science software, especially software such as high-energy physical computing and numerical computing tools. After joining a lot of other software, this warehouse is no longer a single software warehouse.
 
Repository link: http://atrpms.net/
 
We recommend that you use the stable version of this source. if you want to test the latest technology, use bleeding and testing at your own risk.
 
View: http://dl.atrpms.net/el5-i386/atrpms/
 
Installation method:
 
First import PGP key
 
Rpm -- import external:
 
# Name: ATrpms
# URL: http://atrpms.net/
[Atrpms]
Name = Fedora Core $ releasever-$ basearch-ATrpms
Base url = http://dl.atrpms.net/el5-i386/atrpms/stable/
# Baseurl = http://dl.atrpms.net/el5-i386/atrpms/bleeding/
# Baseurl = http://dl.atrpms.net/el5-i386/atrpms/testing/
Enable = 1
Protect = 0
Gpgkey = http://ATrpms.net/RPM-GPG-KEY.atrpms
Gpgcheck = 1 Tip 3: rpm search.
 
What should I do if the rpm package cannot be found? go to the following website. Basically all collected, you can use advanced look to see. http://rpm.pbone.net/
 
Tip 4: Use the yum tool to download the RPM source package
 
The premise is that you have installed the yum-utils package.
 
Yumdownloader -- source RPM source package
Yumdownloader -- source vsftpd, of course, if there is no source package, you must add a source
 
[Linux-src]
Name = Centos $ releasever-$ basearch-Source
Baseurl = http://mirrors.163.com/centos/?releasever/ OS /srpms/
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release Tip 5: Software Group installation
 
Sometimes, after installing the system, we manage a type of software that is not installed. for example, for development kits, we can use software groups for installation. this is the most recommended method for installing software.
 
Yum grouplist # This will list all the software packages, for example, the packages related to installation and development.
 
Yum groupinstall "Development Libraries"
Yum groupinstall "Development Tools" Tip 6: Which rpm package kit is used to query files and paths
 
# File exists locally
Rpm-qf $ (which ls) # The file does not exist locally
How about yum whatprovides */bin/ls? is the above method useful to you?
Related Article

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.