[root@01 Packages]# rpm -ivh texlive-2012-38.20130427_r30134.el7.x86_64.rpm
錯誤:依賴檢測失敗:
texlive-scheme-basic 被 texlive-2:2012-38.20130427_r30134.el7.x86_64 需要
texlive-collection-latexrecommended 被 texlive-2:2012-38.20130427_r30134.el7.x86_64 需要
tex-kpathsea 被 texlive-2:2012-38.20130427_r30134.el7.x86_64 需要
tex-tetex 被 texlive-2:2012-38.20130427_r30134.el7.x86_64 需要
[root@01 Packages]#
[root@01 Packages]# yum list | tail
zlib-devel.x86_64 1.2.7-17.el7 base
zlib-static.i686 1.2.7-17.el7 base
zlib-static.x86_64 1.2.7-17.el7 base
zsh.x86_64 5.0.2-28.el7 base
zsh-html.x86_64 5.0.2-28.el7 base
zziplib.i686 0.13.62-5.el7 base
zziplib.x86_64 0.13.62-5.el7 base
zziplib-devel.i686 0.13.62-5.el7 base
zziplib-devel.x86_64 0.13.62-5.el7 base
zziplib-utils.x86_64 0.13.62-5.el7 base
[root@01 Packages]#
配置
[root@01 Packages]# cat /etc/yum.repos.d/CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[root@01 Packages]#
搜索vim相關的包
[root@01 Packages]# yum search vim
已加載插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.zju.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.cn99.com
================================================== N/S matched: vim ===================================================
protobuf-vim.x86_64 : Vim syntax highlighting for Google Protocol Buffers descriptions
vim-X11.x86_64 : The VIM version of the vi editor for the X Window System
vim-common.x86_64 : The common files needed by any version of the VIM editor
vim-enhanced.x86_64 : A version of the VIM editor which includes recent enhancements
vim-filesystem.x86_64 : VIM filesystem layout
vim-minimal.x86_64 : A minimal version of the VIM editor
名稱和簡介匹配 only,使用“search all”試試。
[root@01 Packages]#
精準搜索
[root@01 Packages]# yum list |grep 'vim'
vim-common.x86_64 2:7.4.160-4.el7 @base
vim-enhanced.x86_64 2:7.4.160-4.el7 @base
vim-filesystem.x86_64 2:7.4.160-4.el7 @base
vim-minimal.x86_64 2:7.4.160-2.el7 @anaconda
protobuf-vim.x86_64 2.5.0-8.el7 base
vim-X11.x86_64 2:7.4.160-4.el7 base
vim-minimal.x86_64 2:7.4.160-4.el7 base
[root@01 Packages]#
[root@01 Packages]# yum grouplist
已加載插件:fastestmirror
沒有安裝組信息文件
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
* base: mirrors.zju.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.cn99.com
可用的環境分組:
最小安裝
基礎設施服務器
計算節點
文件及打印服務器
基本網頁服務器
虛擬化主機
帶 GUI 的服務器
GNOME 桌面
KDE Plasma Workspaces
開發及生成工作站
可用組:
傳統 UNIX 兼容性
兼容性程序庫
圖形管理工具
安全性工具
開發工具
控制臺互聯網工具
智能卡支持
科學記數法支持
系統管理
系統管理工具
完成
[root@01 Packages]#
[root@01 ~]# cp -r /etc/yum.repos.d /etc/yum.repos.d.bak
[root@01 ~]# cd /etc/
[root@01 etc]# ls
adjtime environment ld.so.cache polkit-1 skel
aliases ethertypes ld.so.conf popt.d ssh
aliases.db exports ld.so.conf.d postfix ssl
alternatives favicon.png libaudit.conf ppp statetab
anacrontab filesystems libnl prelink.conf.d statetab.d
asound.conf firewalld libuser.conf printcap subgid
audisp fstab locale.conf profile subuid
audit fuse.conf localtime profile.d sudo.conf
bash_completion.d gcrypt login.defs protocols sudoers
bashrc GeoIP.conf logrotate.conf python sudoers.d
binfmt.d GeoIP.conf.default logrotate.d rc0.d sudo-ldap.conf
centos-release gnupg machine-id rc1.d sysconfig
centos-release-upstream GREP_COLORS magic rc2.d sysctl.conf
chkconfig.d groff makedumpfile.conf.sample rc3.d sysctl.d
chrony.conf group man_db.conf rc4.d systemd
chrony.keys group- mke2fs.conf rc5.d system-release
cron.d grub2.cfg modprobe.d rc6.d system-release-cpe
cron.daily grub.d modules-load.d rc.d terminfo
cron.deny gshadow motd rc.local tmpfiles.d
cron.hourly gshadow- mtab redhat-release tuned
cron.monthly gss my.cnf resolv.conf udev
crontab host.conf my.cnf.d rpc updatedb.conf
cron.weekly hostname NetworkManager rpm vconsole.conf
crypttab hosts networks rsyslog.conf vimrc
csh.cshrc hosts.allow nsswitch.conf rsyslog.d virc
csh.login hosts.deny nsswitch.conf.bak rwtab vmware-tools
dbus-1 init.d openldap rwtab.d wpa_supplicant
default inittab opt sasl2 X11
depmod.d inputrc os-release securetty xdg
dhcp iproute2 pam.d security xinetd.d
DIR_COLORS issue passwd selinux yum
DIR_COLORS.256color issue.net passwd- services yum.conf
DIR_COLORS.lightbgcolor kdump.conf pkcs11 sestatus.conf yum.repos.d
dracut.conf kernel pki shadow yum.repos.d.bak
dracut.conf.d krb5.conf plymouth shadow-
e2fsck.conf krb5.conf.d pm shells
[root@01 etc]#
[root@01 etc]# cd /etc/yum.repos.d
[root@01 yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[root@01 yum.repos.d]# rm -f ./*
[root@01 yum.repos.d]# ls
[root@01 yum.repos.d]#
[root@01 yum.repos.d]# vim dvd.repo
[root@01 yum.repos.d]# cat dvd.repo
[dvd]
name=install dvd
baseurl=file:///mnt //baseurl指定路徑
enable=1 //是否可用:1表示可用,0表示不可用
gpgcheck=0 //0表示不檢測
[root@01 yum.repos.d]#
[root@01 yum.repos.d]# yum clean all
已加載插件:fastestmirror
正在清理軟件源: dvd
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
Cleaning up list of fastest mirrors
[root@01 yum.repos.d]# yum list |less
[root@01 yum.repos.d]# yum list |tail
yum-plugin-changelog.noarch 1.1.31-42.el7 dvd
yum-plugin-tmprepo.noarch 1.1.31-42.el7 dvd
yum-plugin-verify.noarch 1.1.31-42.el7 dvd
yum-plugin-versionlock.noarch 1.1.31-42.el7 dvd
yum-utils.noarch 1.1.31-42.el7 dvd
zenity.x86_64 3.22.0-1.el7 dvd
zip.x86_64 3.0-11.el7 dvd
zlib-devel.x86_64 1.2.7-17.el7 dvd
zsh.x86_64 5.0.2-28.el7 dvd
zziplib.x86_64 0.13.62-5.el7 dvd //dvd表示本地搭建的yum倉庫
coreutils.x86_64 8.22-18.el7 @anaconda //@anaconda表示已安裝表示已經安裝可安裝的軟件包
cpio.x86_64 2.11-24.el7 @anaconda
cracklib.x86_64 2.9.0-11.el7 @anaconda
cracklib-dicts.x86_64 2.9.0-11.el7 @anaconda
cronie.x86_64 1.4.11-17.el7 @anaconda
[root@01 yum.repos.d]#
[root@01 yum.repos.d]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever /cachedir是指一個路徑,存放下載的包的位置
keepcache=0 /keepcache=1時表示保存已經下載的rpm包
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
[root@01 yum.repos.d]#