Linux under the Yum command detailed _linux

Source: Internet
Author: User
Tags ftp site gpg gtk install php imagemagick locale in python


Yum (full name Yellow Dog Updater, Modified) is a shell front-end package manager in Fedora and Redhat as well as SuSE. Based on the RPM package management, can automatically download the RPM package from the specified server and install, can automatically handle dependencies, and install all the dependent software package, without tedious downloading, installation. Yum provides commands to find, install, delete, or even complete a package, and commands are simple and easy to remember.



The Yum command form is generally as follows:yum [options] [command] [package ...]



Options are optional, including-H (Help),-y (when the installation prompts you to select all "Yes"), Q (does not display the installation process), and so on. [command] for the action to be taken, [package ...] Is the object of the operation.



Some of the most commonly used commands are summarized, including:



Auto Search fastest Mirroring plugin: Yum install Yum-fastestmirror



Install Yum graphics window plugin: Yum install Yumex



To view a list of possible bulk installations: Yum Grouplist



1 installation



Yum Install all installed
Yum Install Package1 Install the specified installation package Package1
Yum groupinsall group1 Installer group group1



2 Updates and Upgrades



Yum Update all Updates
Yum Update Package1 the specified package Package1
Yum check-update Check for updatable programs
Yum Upgrade Package1 Upgrade the specified package Package1
Yum groupupdate group1 upgrade program group Group1



3 Find and display



Yum Info package1 Display installation package information Package1
Yum list shows all packages that have been installed and can be installed
Yum List Package1 shows the installation of the specified package Package1
Yum groupinfo group1 Display program group group1 information Yum Search string finds an installation package based on a keyword string



4 Removing programs



Yum Remove | Erase Package1 Remove Package Package1
Yum groupremove group1 Delete program group group1
Yum deplist package1 Viewing program package1 dependencies



5 Clear Cache



Yum Clean packages clears the packages under the cache directory
Yum clean headers clears the headers in the cache directory
Yum clean oldheaders clears the cache directory of old headers
Yum clean, yum cleaned all (= Yum cleaning packages; yum Clear oldheaders) clears the packages under the cache directory and the old headers



For example, to install a game program group, first find:



#:yum grouplist



You can find that the installed game package name is "Games and entertainment" so that you can install it:



#:yum Groupinstall "Games and Entertainment"



All the game packages are automatically installed. Here the names of Games and entertainment must be selected in double quotes, because Linux encounters a space under the view that the filename is over, so you must tell the system that the package is installed with the name "Games and entertainment" instead of "Games".



In addition, you can modify the configuration file/etc/yum.conf Select the installation source. Visible Yum To configure the program is how convenient it. More detailed options and commands, of course, just under 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 T "Yum Groupinstall" Development libraries yum Groupinstall "Development Tools" #yum groupinstall "Windows File Server" y  Um groupinstall system Tools Yum groupinstall X window System yum install php-gd yum install gd-devel yum groupinstall "Chinese Support" #yum install Samba-common//This execution will be installed with samba-client #yum install samba yum install gcc yum install CPP Yu gcc-c++ Install yum install ncurses yum install ncurses-devel yum install gd-devel php-gd yum install gd-devel yum Insta ll gcc yum install CPP yum install gcc-c++ yum install ncurses yum install ncurses-devel yum install gd-devel php-gd Yum I Nstall gd-devel Yum install zlib-devel yum install freetype-devel freetype-demos freetype-utils yum install libpng-devel l Ibpng10 Libpng10-devel yUm install libjpeg-devel yum install ImageMagick yum install php-gd yum install flex yum install Imagemagick-devel #yum in Stall system-config-bind #yum groupinstall "DNS Name Server"//install bind and Bind-chroot kits yum Groupinstall "MySQL Database" ' Yum Clean all


-----------------------------------------------------------------------------------------------------------



Installed a Fedora Linux can not use Chinese input is a very difficult thing, even search solutions can not search. Can barely use a few pinyin to take a chance to see if Google can identify. And that's the kind of thing I've met.



Solution:



Yum Install scim*-y



Yum Command detailed:



The Software Installation command for Redhat and Fedora is rpm, but the biggest trouble with using RPM to install the software is the need to manually find the series of dependencies needed to install the software, which is super hassle. If the software does not need to uninstall it is very annoying to unload a dependency and cause other software to not be used. Happily, Fedora has finally rolled out an apt command yum similar to Ubuntu, making Fedora's software installation easy.



Yum has the following characteristics:



* Multiple resource pools can be configured at the same time (Repository)
* Concise configuration file (/etc/yum.conf)
* Automatically resolve the dependency problems encountered when adding or removing RPM packages
* Easy to use
* Maintain consistency with the RPM database



Yum, the abbreviation for Yellow Dog Updater modified, was originally developed by Yellow Dog, the release developer Terra Soft, in Python, then yup (Yellow Dog updater), After the improvement by the Linux@duke development team of Duke University, this is the name. 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 software warehouse, it can be HTTP or FTP site, can also be a local software pool, but must include RPM header, header includes the various information of the RPM package, including descriptions, functions, Provide documents, dependencies, etc. it is only by collecting these headers and analyzing them that the remaining tasks can be completed automatically.



1.yum All configuration information is stored in a configuration file called yum.conf, usually located in the/etc directory, this is the entire Yum system is the most important, I see this file in the F9, we look at the following:


[Hanlong@localhost 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 this OR in separate files named File.repo
# IN/ETC/YUM.REPOS.D


A brief description of the document is given below:



Cachedir:yum Cache directory, yum this store to download the RPM package and database, generally/var/cache/yum.



DebugLevel: Debug level, 0──10, default is 2



Logfile:yum log file, default is/var/log/yum.log.



Exactarch, there are two options 1 and 0, whether to upgrade only and you install the package CPU system consistent package, if set to 1, if you install a i386 rpm, then Yum will not use 686 of the package to upgrade.



Gpgchkeck= has 1 and 2 choices, representing whether or not a GPG check is performed, and if not, the default seems to be checked.



2. OK, the next is the use of Yum, first use Yum to upgrade the software, yum operation most must have Superuser permissions, 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 compared to Yum to bring us convenience, what is the cost of this time? Header download complete, yum will determine whether there is an updatable package, if so, it will ask your opinion, whether the update, or say y bar, the system always up to date is always good, then yum start to download the package and use the call RPM installation, which may take some time, Depending on the number of software updates and network conditions, if the network is broken, it does not matter, do it again. Upgrade completed, every day as long as the use of Yum check-update Check if there is any with the new, if there is, with Yum update with the new, always keep the system for the latest, blocking all the loopholes found. Upgrade a separate package with the Yum update packagename.



Now simply list some of the commands for Yum software upgrades:



(Update: I installed the wine is an RPM one installed, first installed since the relationship, and then installed wine main package, but just found in the forum to a good post, on the Yum Local installation. parameter is-localinstall


$yum Localinstall wine-*


In this way, the Yum will automatically install all the dependencies, rather than the RPM of a single installation, save a lot of work.



There is also a parameter similar to his:


$yum localupdate wine-*


If you have a new version of wine and you download it locally, you can update the wine locally. )



1. List all updatable software



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 items that can be installed



Command: Yum list



3. Install and uninstall software using Yum, one prerequisite is that Yum installed packages are in RPM format.



The command to install is, yum install Xxx,yum will query the database, whether there is a package, if there is, check its dependency conflict, if there is no dependency conflict, then it is best to download the installation; If so, you will be prompted to ask if you want to install dependencies at the same time, or to delete the conflicting packages. You can make your own judgments.



The delete command is, yum remove xxx, as with the installation, Yum will also query the database, give a solution to the dependencies of the hint.



1. Install packages with Yum



Command: Yum Install



2. Remove packages with Yum



Command: Yum Remove



4. Use Yum query to install the software



We often encounter this situation, want to install a software, only know that it is related to a certain aspect, but not exactly know its name. At this point the Yum query function is working. You can search with commands such as Yum search keyword, such as we would like to install a instant messenger, but do not know exactly what, then you may wish to use the Yum search Messenger such instructions for searching, Yum will search all available rpm descriptions, listing all the RPM packages described in Messeger, so we might get gaim,kopete and so on and choose from them.



Sometimes we also encounter the installation of a package, but do not know its purpose, we can use Yum Info packagename This instruction to.



1. Use Yum to find packages



Command: Yum Search



2. List all installable packages



Command: Yum list



3. List all updatable packages



Command: Yum list updates



4. List all installed packages



Command: Yum List installed



5. List all packages that are installed but not in Yum Repository



Command: Yum list extras



6. List the packages that you specify



Command: Yum list



7. Use Yum to get package information



Command: Yum Info



8. List 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 package information that has been 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 will store the downloaded packages and headers in the cache and not automatically delete them. If we feel that they are taking up disk space, you can use the Yum Clean command for cleanup, more precise usage is yum clean headers clear Header,yum Clean Packages erase downloaded RPM package, yum clean all clears all



1. Clear the package under the cache directory (/var/cache/yum)



Command: Yum Clean packages



2. Clear the Cache directory (/var/cache/yum) under the headers



Command: Yum Clean headers



3. Clear Cache Directory (/var/cache/yum) under the old headers



Command: Yum clean oldheaders



4. Clear the Cache directory (/var/cache/yum) under the 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 in man:



1, the installation of graphics version Yumex:yum install Yumex.



2, install the additional software warehouse:



Rpm.livna.org's Package Warehouse:


RPM-IVH http://livna-dl.reloumirrors.net ... ease-7-2.noarch.rpm


Freshrpms.net's Package Warehouse:


RPM–IVH Http://ftp.freshrpms.net/pub/fre ... 1.1-1.fc.noarch.rpm


3, install the fastest source yum install Yum-fastestmirror



Resources are really very rich, from CentOS to Ubuntu,iso Mirror, upgrade package, everything, the brothers are really happy, envy ah. But fortunately, we are at least in the education network, make up can also touch a little light, download some.



The website is: ftp://ftp.sjtu.edu.cn/



The corresponding yum of the repo 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 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 source in front of Yum and needs to be noted.



Below is a brief introduction of Fedora installation SCIM



1. What input method is suitable 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 used according to the needs of different code to express to China and Japan ... And so on the input problems of various languages. If you only know Chinese, or will only input English & Chinese, then FCITX is a good choice, because it is beautiful, small, practical. If you still need to type in Japanese or other languages, then you should install SCIM. Through a reasonable configuration, he can make you like in Windows, want to enter what language can enter what language, the same language want to use what input method. SCIM's expansion is very strong, and more stable, I just choose is SCIM.



2. What preparations are needed before installing a new input method?



If you choose Fcitx or SCIM, then I suggest you delete the system's own Chinese input method. The method is as follows:


Rpm–qa | grep IIIMF | Xargs rpm–e
Rpm–qa | grep chinput| xargs rpm–e


If there is a line that prompts 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, grep IIIMF is the selection of those packets whose name contains IIIMF, Xargs rpm–e means to remove the packages listed above. Xargs's role is to put the front through | The data passed over is used as an argument for the following command. This is like a filter, where all the installation packages are placed first, then grep, leaving only the RPM packages containing certain keywords, and then using the combination of Xargs and rpm–e to delete the remaining packets containing a particular keyword. This achieves the purpose of deleting the input method and the associated package. This is also true of the following chinput, which is not repeated here. If you also installed other input methods, such as you originally installed is FCITX, now want to install SCIM, then you'd better imitate the appearance of the FCITX delete, the way is to IIIMF position to FCITX on it.



Before you install a new input method, it is best to do so, because many input methods exist in a system without any benefit, you can only use one, and they also exist may sometimes have problems, think about it and know, will compete with each other. So after that, you should ensure that there is no Chinese input method in the system. Validation is done in a manner similar to the following:


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 in the end when the load came in, do not know this course do not know why sometimes the input method (because it may not be transferred at all) 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, and they are actually built on the X system. Simply put, the X system is one of the core, and the bottom of the desktop system, GNOME or KDE, or whatever fvwm, and so on, is just another layer of software between the X system and the user. So to achieve no matter what desktop system to use, can be transferred into the input method, which is to start in the X system, so that input method also started up, then, whether you are using GNOME or KDE or other desktop, can be transferred into the input method. Because when it is their turn to start, the X system has been activated, the input method has been transferred into the system. So how does the X system start? Let's start with the startx.
No matter what desktop system you use, it starts with startx, so what is STARTX? An application or a script file? Why is it able to start a variety of desktop systems and be able to set them according to the appropriate configuration file? With doubt, I entered Whereis startx in the console.



After finding the path to store startx, open it with the editor and discover that it was a script file. The contents of this script file may vary according to the distribution, if you know some shell language, then you can try to see, not necessarily all understand, but you generally see later will find a xinit command, and then followed by some parameters. I try to enter xinit under the console (note, do not do this under the graphical interface)



found that the graphical interface start pull, but very ugly, nothing, no function, mouse can move, there is a can enter the command of a small window. How to quit? Ctrl+alt+backspace. So, StartX is just a script that, in the end, uses the Xinit command to start the graphical interface by analyzing settings for a series of configuration files. Either 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 look carefully, you will find that there is a very conspicuous, that is/etc/x11/xinit/xinitrc, this xinitrc seems very familiar, in the configuration of input method of other stickers always see, here is definitely inside the run of this script. Look at other things, in fact, are using the shell to configure a xinit boot parameters, used to configure the desktop system used, do not care about it. What is known now is that StartX is going to execute a/ETC/X11/XINIT/XINITRC script, let's open it and see what's inside.
Open a look, which I find 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, you will find it. So what's in the catalogue? There is a file to see the name of the input related to know, his name is XInput. Wait, let's get a hold of it, how to get from StartX to XInput.



The first is to execute startx this script file, inside he will execute xinitrc this script, then XINITRC script inside, call XInput. OK, let's go ahead and open the xinput to see.



4. Install 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 revise



/etc/x11/xinit/xinitrc.d/xinput files so that the SCIM is started when X is started. I see a lot of articles on the Internet, but always to no avail, after their own experiments, the simplest is to replace all the chinput in the XInput file with Scim,chinput replaced by SCIM, save restart X on it.


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"


To


"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



The above is a small set to introduce the Linux under the Yum command detailed, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!


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.