centos5下用yum安裝MPlayer播放器,網上看到的資料,自己也修改了一下。提供給大家用用。
編譯安裝MPlayer好麻煩.其實centos也可以用yum安裝MPlayer. (rhel也可用)
看一下centos 5的部分:
CentOS 5
首先確定你安裝了ProtectBase .
Protectbase
yum-protectbase在CentOS 5包倉庫裡面有提供:
#yum install yum-protectbase
在CentOS 5裡面這個外掛程式預設啟動 .
編輯/etc/yum.repos.d/CentOS-Base.repo ,在 [base] 、[update] 、[centosplus] 段末加上一行:
protect=1
讓 [centosplus] 段失效如下:
enabled=0
編輯/etc/yum.repos.d/CentOS-Base.repo ,在其它段的最後加上如下一行:
protect=0
下載rpmforge-release包.選擇下面兩個的其中一個, 依賴於你的機器.如果不能確定用哪一個用以下命令確定:
(你可以在 http://dag.wieers.com/packages/rpmforge-release/ 找到rpmforge-release包的完全列表,但是推薦使用上面列出兩個中的一個).
安裝DAG's GPG key
#rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
校正你下載的包
#rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm
安全警告: rpmforge-release包把GPG keys注射到你的RPM資料庫中. 只要你驗證封裝和相信Dag,它應該是安全的.
安裝包
#rpm -ivh rpmforge-release-0.3.6-1.el5.rf.*.rpm
這一步會加入yum倉庫設定檔,注射合適的GPG keys.
用以下命令測試:
#yum check-update
應該會有以下兩行輸出:
Loading "protectbase" plugin
117 packages excluded due to repository protections
上面的數字可能不同, 但應該有幾種包顯示會排除在外.
#yum install mplayer
下面是如何將mplayer插入到firfox:
#yum install mplayerplug-in
ok!你可以線上聽歌曲了