Linux command + shell script collection: install software with yum

Recommended free tutorials: Python, C++, Java, JS, Rust, Go Language Introduction Complete Manual (6 in 1).zip-Python Documentation Resources-CSDN Download

Installing packages with yum is extremely easy. The following simple command will install the package from the repository, all the libraries it needs,
and other packages it depends on:
yum install package_name
The following example installs the xterm package discussed in Chapter 2.

$ su -
Password:
# yum install xterm
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
* base: mirrors.bluehost.com
* extras: mirror.5ninesolutions.com
* updates: mirror.san.fastserv.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package xterm.i686 0:253-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
[...]
Installed:
xterm.i686 0:253-1.el6
Complete!
#


Note In the above example, we used the su- command before running the yum command. This command allows you to switch to the root
user. On Linux systems, # indicates that you are logged in as root.
Switching to root should only be done temporarily when running administrative tasks (such as installing and updating software). You can also use the sudo command.
You can also manually download the rpm installation file and install it with yum, which is called local installation. The basic command is:
yum localinstall package_name.rpm
You should now be able to see that one of the great things about yum is that its commands are logical and user-friendly.
Table 9-3 shows how to install packages with urpm and zypper. Note that if you are not logged in as root, you will
get a "command not found" error message when using urpm. 

Guess you like

Origin blog.csdn.net/tysonchiu/article/details/125963150