CentOS 7安装播放软件mplayer和下载软件prozilla并配置yum源

CentOS安装播放软件mplayer和下载软件prozilla,配置yum源


其他还有RPMForge源和RPMFusion源(暂时没有centos7的源),更多软件包在pkgs.org,比较好的国内源有163和UTSC。一般情况下不用配置其他的外部源,系统自带的源就比较好用了。


yum的配置文件分为main和repository,main部分定义了全局配置选项,位于/etc/yum.conf中。repository部分定义了每个源/服务器的具体配置,可以有一到多个,位于/etc/yum.repo.d目录下的各*.repo文件中。


yum的配置文件


[root@localhost yum.repos.d]# cat /etc/yum.conf 
[main]
cachedir=/var/cache/yum/$basearch/$releasever
#cachedir:yum更新软件时的缓存目录,默认设置为/var/cache/yum

keepcache=0

#是否保留缓存,0不保留

debuglevel=2
#debuglevel:Debug信息输出等级,范围为0-10,缺省为2
logfile=/var/log/yum.log
#logfile:存放系统更新软件的日志的目录。用户可以到/var/log/yum.log文件去查询自己在过去的日子里都做了哪些更新。
exactarch=1
#设置为1,则yum只会安装和系统架构匹配的软件包,例如,yum不会将i686的软件包安装在适合i386的系统中。默认为1
obsoletes=1
 #这是一个update的参数,具体请参阅yum(8),简单的说就是相当于upgrade,允许更新陈旧的RPM包。此选项在进行发行版跨版本升级的时候会用到。
gpgcheck=1
#有1和0两个选择,分别代表是否是否进行gpg校验。这个选项如果设置在[main]部分,则对每个repository都有效。默认值为0.
plugins=0
 #是否允许使用插件,默认是0不允许,比如yum-fastestmirror这个插件。
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
#指定一个软件包,yum会根据这个包判断你的发行版本,默认是centos-release,也可以是安装的任何针对自己发行版的rpm包。用于获得yum配置文件中$releasever的值。

exclude=selinux* kernel*

#屏蔽不想更新的RPM包,可用通配符,多个RPM包之间使用空格分离。

#pkgpolicy=newest
#包的策略。一共有两个选项,newest和last,这个作用是如果你设置了多个repository,而同一软件在不同的repository中同 时存 在,yum应该安装哪一个,如果是newest,则yum会安装最新的那个版本。如果是last,则yum会将服务器id以字母表排序,并选择最后的那个 服务器上的软件安装。一般都是选newest。
#tolerant=1
#如果值为1,则yum会忽略任何的有关包的错误。举例来说,当执行yum来安装baz时,如果baz包已经安装在系统中了,则yum会继续重复安装baz,而不会报错。默认值为1。
#retries=20
#网络连接发生错误后的重试次数,如果设为0,则会无限重试。默认值为6

 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@localhost yum.repos.d]# 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]
#方括号里面的是软件源的名称,将被yum取得并识别
name=CentOS-$releasever - Base
 #这里也定义了软件 仓库的名称,通常是为了方便阅读配置文件,一般没什么作用,$releasever变量定义了发行版本,通常是8,9,10等数字,$basearch变 量定义了系统的架构,可以是i386、x86_64、ppc等值,这两个变量根据当前系统的版本架构不同而有不同的取值,这可以方便yum升级的时候选择 适合当前系统的软件包,以下同……
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#上面的这一行是指定一个镜像服务器的地址列表,通常是开启的,将$releasever和$basearch替换成自己对应的版本和架构,例如10和i386,在浏览器中打开,我们就能看到一长串可用的镜像服务器地址列表。
选择自己访问速度较快的镜像服务器地址复制并粘贴到repo文件中,我们就能获得较快的更新速度了,格式如
baseurl= ftp://www.utsc.edu.cn/centos/7/x86_64/os http://www.utsc.edu.cn/centos/7/x86_64/os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
#上面的一行baseurl第一个字符是'#'表示该行已经被注释,将不会被读取,这一行的意思是指定一个baseurl(源的镜像服务器地址)
gpgcheck=1
 #这个选项表示这个repo中下载的rpm将进行gpg的校验,已确定rpm包的来源是有效和安全的
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#定义用于校验的gpg密钥
#exclude=selinux* kernel*
#exclude这个选项方在这里还是conf里面都行,用来禁止这个软件仓库中的某些软件包的安装和更新,可以使用通配符,并以空格分隔,可以视情况需要自行添加 
#enabled=1
#这个选项表示这个repo中定义的源是启用的,0为禁用,默认不写就是启用。
#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

安装播放软件mplayer和下载软件prozilla(以上传到csdn)
 http://www.mplayerhq.hu/MPlayer/releases/有想要的mplayer文件
mplayer安装的时候四个文件 一个都不能少。  源代码文件MPlayer-1.2.tar.xz,解码文件all-20110131.tar.bz2,win解码文件windows-all-20071007.zip,界面文件Blue-1.11.tar.bz2

mkdir /usr/lib/codecs
mkdir /usr/lib/wincodecs
tar -xvf all-20110131.tar.bz2
mv all-20110131/* /usr/lib/codecs
unzip windows-all-20071007.zip
mv windows-all-20071007/* /usr/lib/wincodecs


tar -xvf MPlayer-1.2.tar.xz
cd MPlayer-1.2
./configure--prefix=/usr/local/mplayer--enable-gui --enable-freetype --codecsdir=/usr/lib/codecs --win32libdir=/usr/lib/wincodecs --language=zh_CN && make && make install


注意:
--prefix=/usr/local/mplayer 是安装路径(可以不用指定。默认就行。)
--enable-gui 安装图形化用户界面
--enable-freetype 调节字体(可以不用,默认不写没有问题)
--codecsdir=/usr/lib/codecs/
--win32libdir=/usr/lib/wincodecs 指定解码位置
--language=zh_CN 中文
安装界面
mkdir /usr/local/share/mplayer/skins/default
tar -xvf Blue-1.11.tar.bz2
mv Blue-1.11/* /usr/local/share/mplayer/skins/default
中间出现报故说缺少依赖报比如x11,则统一采用 yum search x11*,查找相关包,yum install xorg-x11*使用通配符一次性全部安装相关包,省时省力就是费点资源。
安装完成以后有的会出现没有声音的现象。这时候可以通过配置preferences----Audio-----alsa ALSA-0.9.x-1.x-audio output.。没有请安装yum install alsa*。还没有声音的可以尝试配置一下equalizer----configure----channel 1等。

prozilla是linux下最强大下载工具,没有之一。
unzip prozilla-2.0.4-master.zip
cd prozilla-2.0.4-master
./configure && make && make install
统一采用 yum search x11*,查找相关包,yum install x11*使用通配符一次性全部安装相关包,



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值