Yum (full name Yellow dog Updater, Modified) is a shell front-end package manager in Fedora and Redhat and SuSE. Based on RPM package management, the ability to automatically download the RPM package from the specified server and install, can automatically handle dependency relationships, and install all dependent software packages at once, without the tedious download and installation. Yum provides commands to find, install, and delete one, a group, or even all of the packages, and the commands are concise and well-remembered.
Yum's command form is generally as follows: Yum [options] [command] [package ...]
The options are optional, including-H (Help),-y (when the installation process prompts you to select all "Yes"),-Q (does not show the installation process), and so on. [command] for the action you want to take, [package ...] Is the object of the operation.
Summarizes some of the commonly used commands include:
Automatically search for the fastest image plugin: Yum install Yum-fastestmirror
Installing the Yum graphics window plugin: Yum install Yumex
View a list of possible bulk installations: Yum Grouplist
1 installation
Yum Install all installed
Yum Install Package1 installs the specified installation package Package1
Yum groupinsall group1 Installer group group1
2 Updates and Upgrades
Yum Update all Updates
Yum Update Package1 updates the specified package Package1
Yum check-update Check for updatable programs
Yum Upgrade Package1 upgrade specified package Package1
Yum groupupdate group1 upgrade program group Group1
3 Finding and displaying
Yum Info package1 Displays installation package information Package1
Yum list shows all packages that are installed and can be installed
Yum List Package1 shows the installation of the specified package Package1
Yum groupinfo group1 Display program group group1 info Yum Search string finds the installation package based on the keyword string
4 Removing programs
Yum Remove & #124; Erase Package1 Remove Package Package1
Yum groupremove group1 Remove a program group group1
Yum deplist package1 Viewing program package1 dependencies
5 Clearing the Cache
Yum Clean packages clears the package from the cache directory
Yum clean headers clears the headers in the cache directory
Yum clean oldheaders Clear Cache directory for old headers
Yum Clean, yum clear all (= Yum packages; Yum oldheaders) clears the cache directory of packages and the old headers
For example, to install a game program group, first look for:
#:yum grouplist
It can be found that the installable game package name is "games and entertainment" so that it can be installed:
#:yum Groupinstall "Games and entertainment"
All the game packages are installed automatically. Here the name of games and entertainment must be selected in double quotes, because Linux encounters a space below that the file name ends, so you must tell the system that the package name is "games and entertainment" instead of "games."
In addition, you can modify the configuration file/etc/yum.conf Select the installation source. It can be seen how easy it is to configure the Yum program. More detailed options and commands, of course, just below the command prompt line: Man yum
Yum Groupinstall "KDE (K Desktop environment)"
Yum Install Pirut k3b mikmod
Yum Groupinstall "Server Configuration Tools"
Yum Groupinstall "Sound and Video"
#yum groupinstall "GNOME Desktop Environment"
Yum Groupinstall "Legacy software Support"
Yum Groupinstall "Development Libraries"
Yum Groupinstall "Development Tools"
#yum groupinstall "Windows File Server"
Yum Groupinstall "System Tools"
Yum groupinstall "X window System"
Yum Install PHP-GD
Yum Install Gd-devel
Yum Groupinstall "Chinese support"
#yum Install Samba-common//The execution will be installed together samba-client
#yum Install Samba
Yum Install GCC
Yum Install CPP
Yum Install gcc-c++
Yum Install ncurses
Yum Install Ncurses-devel
Yum Install Gd-devel PHP-GD
Yum Install Gd-devel
Yum Install GCC
Yum Install CPP
Yum Install gcc-c++
Yum Install ncurses
Yum Install Ncurses-devel
Yum Install Gd-devel PHP-GD
Yum Install Gd-devel
Yum Install Zlib-devel
Yum Install Freetype-devel Freetype-demos freetype-utils
Yum Install Libpng-devel libpng10 libpng10-devel
Yum Install Libjpeg-devel
Yum Install ImageMagick
Yum Install PHP-GD
Yum Install Flex
Yum Install Imagemagick-devel
#yum Install System-config-bind
#yum groupinstall "DNS Name Server"//install BIND and Bind-chroot Kit
Yum Groupinstall "MySQL Database"
Yum Clean All
-----------------------------------------------------------------------------------------------------------
It's a tricky thing to have a Fedora Linux that can't be entered in Chinese, and even search solutions can't be searched. Can only reluctantly use a few pinyin to take a chance, see Google can recognize. And that's what I met.
Solution:
Yum Install scim*-y
The Yum command is detailed:
The software installation commands for Redhat and Fedora are rpm, but the biggest trouble with RPM is that you need to manually find a series of dependencies that you need to install the software, Super trouble not to say, If the software does not need to uninstall the removal of a dependency caused by the other software can not be used is very annoying. Happily, Fedora finally introduced the command yum similar to apt in Ubuntu, making Fedora software easy to install. Yum has the following characteristics:
* Multiple repositories can be configured at the same time (Repository)
* Concise configuration file (/etc/yum.conf)
* Automatic resolution of dependency issues encountered when adding or removing RPM packages
* Easy to use
* Maintain consistency with RPM database
Yum, the abbreviation for Yellow Dog Updater modified, was originally developed by the developer of Yellow Dog's release, Terra Soft, written in Python, then called yup (Yellow dog Updater), This was followed by an improvement by the [email protected] development team at Duke University. Yum's mission is to automate upgrades, install/remove RPM packages, collect information about RPM packages, check dependencies and automatically prompt users to resolve them. Yum's key is to have a reliable repository, as the name implies, this is the repository of software, it can be an HTTP or FTP site, can also be a local software pool, but must contain the RPM header, header includes the RPM package of various information, including description, function, Provide files, dependencies, etc. it is by collecting these headers and analyzing them that the remaining tasks can be completed automatically.
1.yum of all configuration information is stored in a configuration file called yum.conf, usually located in the/etc directory, this is the whole yum system of the heavy weight, I looked at the F9 in the file, we look together:
[Email protected] F9 Common document]$ sudo more/etc/yum.conf
[Main]
Cachedir=/var/cache/yum
Keepcache=0
debuglevel=2
Logfile=/var/log/yum.log
Exactarch=1
Obsoletes=1
Gpgcheck=1
Plugins=1
metadata_expire=1800
# PUT YOUR REPOS here OR in separate files named File.repo
# IN/ETC/YUM.REPOS.D
The following is a brief description of this document:
Cachedir:yum cache directory, yum stores downloaded RPM packages and databases, typically/var/cache/yum.
DebugLevel: Debug level, 0──10, default is 2
The Logfile:yum log file, which is/var/log/yum.log by default.
Exactarch, there are two options 1 and 0, which represents whether to upgrade only the packages that are consistent with your installation of the package CPU, and if set to 1, if you install a i386 rpm, Yum will not upgrade with a 686 package.
The gpgchkeck= has 1 and 2 choices, which represent whether or not GPG verification is performed, and if not, the default seems to be checked.
2. Well, the next is the use of Yum, first with Yum to upgrade the software, yum operation must have superuser privileges, of course, can use sudo.
Yum update, this step is necessary, Yum will download the RPM header from the server header directory, placed in the local cache, which may take a certain amount of time, but it is more convenient than Yum, what is the cost of these times? After the header has been downloaded, yum will determine if there is an updatable package, if so, it will ask your opinion, whether it is updated, or y, it is always good to keep the system up to date, and Yum begins to download the package and use the call RPM installation, which may take some time, Depending on the number of software to be updated and the network condition, if the network is broken, it doesn't matter, do it again. Upgrade completed, every day as long as the use of Yum check-update check if there is a new, if any, with Yum update with the new, always keep the system up-to-date, blocking all the loopholes found. Upgrade a separate package with the Yum update packagename.
Now simply list some of the Yum software upgrade commands:
(Update: When I install wine, I use RPM to install the first one, install the relationship, and then install wine in the main package, but just found a good post on the forum, on Yum's local installation. parameter is-localinstall
$yum Localinstall wine-*
In this case, Yum will automatically install all dependencies without having to install the RPM one, saving a lot of work.
There is also a parameter similar to his:
$yum localupdate wine-*
If there is a new version of wine, and you also download the local, you can update wine locally. )
1. List all software updates that can be updated
Command: Yum check-update
2. Install all UPDATE software
Command: Yum update
3. Install only the specified software
Command: Yum Install
4. Update only the specified software
Command: Yum update
5. List all the software that can be installed
Command: Yum list
3. Installing and uninstalling the software using Yum is provided that the Yum installed packages are in RPM format.
Install the command is, yum install Xxx,yum will query the database, there is no such package, if any, then check its dependency conflict, if there is no conflict-dependent, then it is best to download the installation, if there is, will be prompted to ask whether you want to install dependencies at the same time, or delete conflicting packages, You can make your own judgments.
Delete the command is, yum remove xxx, as with the installation, Yum will also query the database, giving a hint to resolve the dependency.
1. Install the package with Yum
Command: Yum Install
2. Remove the package with Yum
Command: Yum Remove
4. Use Yum to find the software you want to install
We often encounter this situation, want to install a software, only know that it is related to a certain aspect, but do not know exactly its name. This is when Yum's query function works. You can use the Yum search keyword command to search, such as we want to install a instant Messenger, but do not know exactly what, it may be possible to use the Yum search Messenger, such as the search for a command, Yum searches all available rpm descriptions, lists all the RPM packages that are described in the Messeger, so we may get gaim,kopete and so on and choose from them.
Sometimes we have a package installed, but we do not know its purpose, we can use Yum Info packagename This command to get information.
1. Find Packages using Yum
Command: Yum Search
2. List all packages that can be installed
Command: Yum list
3. List all the packages that can be updated
Command: Yum list updates
4. List all installed packages
Command: Yum List installed
5. List all packages installed but not in Yum Repository
Command: Yum list extras
6. List the specified packages
Command: Yum list 7. Using Yum to obtain package information
Command: Yum info 8. Listing information for all packages
Command: Yum Info
9. List all updatable package information
Command: Yum info updates
10. List all installed package information
Command: Yum info installed
11. List all packages installed but not in Yum Repository
Command: Yum info extras
12. List which files the package provides
Command: Yum provides
5. Clear Yum Cache
Yum stores the downloaded packages and headers in the cache without deleting them automatically. If we feel that they are taking up disk space, you can use the Yum Clean command to clear it, and more precisely use Yum clean headers to clear Header,yum clean packages clear the downloaded RPM package, yum clean all clears all
1. Clear the packages under the cache directory (/var/cache/yum)
Order: Yum Clean Packages
2. Clear the headers in the cache directory (/var/cache/yum)
Order: Yum Clean headers
3. Clear the old headers from the cache directory (/var/cache/yum)
Order: Yum Clean oldheaders
4. Clear the Cache directory (/var/cache/yum) package and the old headers
Command: Yum clean, yum clean all (= Yum clean packages; yum clean oldheaders)
The use of all of the above command parameters can be viewed with man:
1, install the graphic version Yumex:yum install Yumex.
2. Install additional repositories:
Rpm.livna.org's Package repository:
RPM-IVH http://livna-dl.reloumirrors.net ... ease-7-2.noarch.rpm
Freshrpms.net's Package repository:
RPM–IVH Http://ftp.freshrpms.net/pub/fre ... 1.1-1.fc.noarch.rpm
3. Installing the fastest source yum install Yum-fastestmirror
Resources are really very rich, from CentOS to Ubuntu,iso image, upgrade package, everything, hand-handed brothers are really happy, envy ah. But fortunately, we are at least in the education network, make it can also touch a light, download some.
The website is: ftp://ftp.sjtu.edu.cn/
The repo of the corresponding Yum is
[Updates]
Name=fedora Updates
baseurl=ftp://ftp.sjtu.edu.cn/fedora/linux/updates/$releasever/$basearch/
Enabled=1
Gpgcheck=0
[Fedora]
Name=fedora $releasever-$basearch
baseurl=ftp://ftp.sjtu.edu.cn/fedora/linux/releases/$releasever/everything/$basearch/os/
Enabled=1
Gpgcheck=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-fedora File:///etc/pki/rpm-gpg/RPM-GPG-KEY
If the APT Manager is installed on the machine, the corresponding source is
REPOMD ftp://ftp.sjtu.edu.cn/fedora/linux/updates/$ (VERSION)/$ (ARCH)/
REPOMD ftp://ftp.sjtu.edu.cn/fedora/linux/releases/$ (VERSION)/everything/$ (ARCH)/os/
This is somewhat different from the format of the previous Yum source and needs to be noted.
Here's a look at the installation of SCIM under Fedora
1. What input method is right for me?
Fcitx and SCIM is a good input method at present, but their characteristics are different, FCITX can only input Chinese, and SCIM can be based on the need to use different codes to express to China and Britain ... And so on input problems in various languages. If you only understand Chinese, or just input English & Chinese, then FCITX is a good choice, because it is beautiful, small, practical. If you still need to enter Japanese or other languages, you should install SCIM. Through reasonable configuration, he can let you like in Windows, want to enter what language can enter what language, the same language want to use what Input method is used. SCIM is very strong, and relatively stable, I choose is SCIM.
2. What do I need to prepare before installing a new input method?
If you choose Fcitx or SCIM, then I suggest you delete the system's own Chinese input method. Here's how:
Rpm–qa | grep IIIMF | Xargs rpm–e
Rpm–qa | grep chinput| Xargs rpm–e
If there is a line Rpm:no packages given for erase that means that you do not have the input method inside your system, do not worry, continue to look down on the line.
Description: Rpm–qa is a list of all installed RPM packages, and grep IIIMF is the choice of those packages whose names contain IIIMF, Xargs rpm–e means to remove the packages listed earlier. Xargs's role is to put the front through | The data passed in as a parameter to the following command. This is like a filter, the first is to put all the installation package, and then grep, leaving only the RPM package containing some specific keywords, and then through the combination of Xargs and rpm–e, the rest of the package containing a particular keyword deleted. This will achieve the purpose of deleting the input method and related packages. The same is true of the following chinput, which is not repeated here. If you also installed other input method, such as you originally installed is FCITX, now want to install SCIM, then you'd better imitate the above look to fcitx Delete, the method is to change the location of IIIMF to FCITX on it.
Before installing the new input method, it is best to do this, because there are many input methods there is no benefit of a system, you can only use one, and they also exist at the same time may have problems, think and know, will compete with each other. So after that, you should ensure that there is no Chinese input method in the system. Verified by a similar way:
Whereis FCITX
Whereis SCIM
Whereis Minichinput
...
3. When was the input method called by the system?
Many people do not know when the input method is loaded in the end, do not know this of course do not know why the input method is not available at some time (because there may not be a call), of course, will not know how to configure to meet their own requirements.
As we all know, there are two desktop systems, GNOME and KDE, which are more commonly used under Linux, it doesn't matter, they are all on the X system. Simply put, the X-System is one of the most central and lowest-level desktop systems, GNOME or KDE, or whatever fvwm, is just another layer of software between the X system and the user. So to achieve no matter what desktop system, can be transferred into the input method, is to start the X system, let the input method also start up, then, regardless of whether you use GNOME or KDE or other desktop, can be transferred into the input method. Because the X system has been started and the input method has been transferred into the system when it is time to start. So how does the X system start? Let's start with the startx.
No matter what desktop system you use, it is started by startx, so what is STARTX? An application or a script file? Why is it able to start various desktop systems and can be set according to the corresponding configuration file? With doubt, I entered Whereis startx inside the console.
After finding the path to store the STARTX, open it with the editor and discover that it was a script file. The contents of this script file may differ depending on the distribution, if you understand some of the shell language, then you can try to see, not necessarily all understand, but you will see in the end there is a xinit command, followed by some parameters. I try to enter xinit under the console (note, do not do this in the graphical interface)
Found graphical interface start pull, but very ugly, what function is not, the mouse can move, there is a command can be entered a small window. How do I get out? Ctrl+alt+backspace. So, StartX is just a script that starts with the Xinit command to start the graphical interface by analyzing settings for a series of configuration files. Whether it's KDE or GNOME, it's done in this script. So let's open the StartX script and see what else is going on inside. You take a closer look, you will find a thing is very conspicuous, is/etc/x11/xinit/xinitrc, this xinitrc seems very familiar, in the configuration input method of the other paste is always seen, here appears must be inside run this script. Look at some other things, in fact, is to use the shell to configure a xinit boot parameters, used to configure the desktop system, do not care about it. It is now known that STARTX is going to execute a/ETC/X11/XINIT/XINITRC script and let's open it to see what's inside.
Open a look, where I feel most valuable, is a for loop, and he sequentially executes all the scripts under/etc/x11/xinit/xinitrc.d/. You can look for it patiently, and you'll find it. So what does this directory contain? There is a file to see the name to know and input related, his name is XInput. Wait, let's get a haircut, how do we get from startx to XInput?
The first is to execute startx this script file, inside he will execute xinitrc this script, and then xinitrc inside the script, called XInput. OK, let's go, open the xinput and see.
4. Install the Package
RPM-UVH scim-0.8.2-1.i586.rpm
RPM-UVH scim-chinese-0.2.6-1.i586.rpm
5. Modify the configuration file
The next important step is to modify the
/etc/x11/xinit/xinitrc.d/xinput file, let Scim start when X is started. I see a lot of articles on the internet also said, but always to no avail, after their own experiment, the simplest is to replace the chinput in the XInput file with Scim,chinput replaced by SCIM, save restart X can be.
zh_cn*)
if [-E/USR/BIN/SCIM]; Then
Xim= "SCIM"
elif [-e/usr/x11r6/bin/xcin]; Then
Export LC_CTYPE=ZH_CN. GB2312
Xim= "XCIN-ZH_CN. GB2312 "
Fi
;;
..............................
SCIM)
Xim_program=scim
xim_args= "-D"
;;
Then modify/etc/gtk-2.0/gtk.immodules to find this line:
"Xim" "X Input Method" "Gtk20" "/usr/share/locale" "Ko:ja:zh"
Switch
"Xim" "X Input Method" "Gtk20" "/usr/share/locale" "En:ko:ja:zh"
May indicate that the input method is also used when entering English
After installation, run Scim-setup, change the input method switch key to Ctrl+space