2009年10月22日星期四

好好學習中文

烎yín,囧jiong、槑méi、玊sù、奣wěng、嘦jiào、勥jiàng、巭pu或bu、嫑biáo、恏hào、兲tiān、氼nì、忈rén、炛guāng

2009年10月20日星期二

Zmanda backup 的文件格式

工作需要,想用Zmanda的backup 文件在開發環境中恢復一個環境?

儘管Zmanda的文件中有描述,可以直接用mysql的命令恢復,但是并沒有指明是什麽?因為安裝zmanda的時候遇到的一些問題,顯示好像zmanda backup mysql使用了mysqlhostcopy這個命令,perl的, google了一下也沒有找到相應的內容,怎麼辦呢?

嘗試著自己猜測一下

拿到一個備份包

[root@vm-linux64-server1 20091021030001]# ls
backup-data  index  zrm_checksum

[root@vm-linux64-server1 20091021030001]# ll
total 300
-rw-r--r-- 1 root root 280900 Oct 21 03:00 backup-data
-rw-r--r-- 1 root root    607 Oct 21 03:00 index
-rw-r--r-- 1 root root    140 Oct 21 03:00 zrm_checksum

嘗試著用tar.gz方式解壓之,因為當初設定的時候就是用compress level1 , logical backup

[root@vm-linux64-server1 20091021030001]# tar xvfz backup-data
./
./backup.sql
[root@vm-linux64-server1 20091021030001]#

看到了吧,就是一個tar.gz 的 package!

-- MySQL dump 10.11
      2 --
      3 -- Host: localhost    Database:
      4 -- ------------------------------------------------------
      5 -- Server version   5.0.45
      6
      7 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
      8 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
      9 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
     10 /*!40101 SET NAMES utf8 */;
     11 /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
     12 /*!40103 SET TIME_ZONE='+00:00' */;
     13 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
     14 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_C        HECKS=0 */;
     15 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO'         */;
     16 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
     17
     18 --

就是一個mysql dump的文件,嘗試用mysqldump來恢復一下看看

root@vm-linux64-server1 20091021030001]# mysql -uroot <backup.sql

 

[root@vm-linux64-server1 20091021030001]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.45 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| AAAA            |
| BBBBB             |
| mysql              |
| test               |
+--------------------+
5 rows in set (0.00 sec)

出來了,呵呵, 手氣不錯今天!

寂寞,是常态。能做的就是:做事。不管做了之后有没有好处,反正做了就肯定有收获。

看到白鸦的blog文:
寂寞,是常态。能做的就是:做事。不管做了之后有没有好处,反正做了就肯定有收获。

同感记录一下!
原文在此:
http://uicom.net/blog/?p=845

2009年10月17日星期六

《般若波羅密多心經》

最近內心莫名的煩躁,找了一篇《般若波羅密多心經》, 默念

觀自在菩薩,
行深般若波羅蜜多時,
照見五蘊皆空,
度一切苦厄。
舍利子,
色不異空,空不異色;
色即是空,空即是色。
受、想、行、識,亦復如是。
舍利子,
是諸法空相,
不生不滅,
不垢不淨,
不增不減,
是故空中無色,
無受、想、行、識;
無眼、耳、鼻、舌、身、意;
無色、聲、香、味、觸、法;
無眼界,乃至無意識界;
無無明,亦無無明盡;
乃至無老死,亦無老死盡。
無苦、集、滅、道,無智亦無得,以無所得故。
菩提薩埵,
依般若波羅蜜多故,
心無罣礙,
無罣礙故,
無有恐怖,
遠離顛倒夢想,
究竟涅槃。
三世諸佛,
依般若波羅蜜多故,
得阿耨多羅三藐三菩提。
故知般若波羅蜜多,
是大神咒,
是大明咒,
是無上咒,
是無等等咒,
能除一切苦,
真實不虛。
故說般若波羅蜜多咒,
即說咒曰:
揭諦揭諦,波羅揭諦,波羅僧揭諦,菩提薩婆訶。

唐·三藏法師玄奘譯
ref:
http://zh.wikisource.org/zh-hant/摩訶般若波羅蜜多心經

好文转:我的老校長高錕:让我们学习怎么当老师


我的老校長高錕
梁文道
我以前从来都不觉得香港的大学有多好。你看那些学生,毕业典礼总是人人手抱一只毛毛熊,不说还以为是幼稚园结业呢。至于老师,不是不好,只不过研究 多用英文出版,而且以论文为主,书店很难见得着,不像大陆学者,著作等身的人多得是,看他们的作品一字排开摆在书店,威风得不得了。校园气氛就更不要提 了,许多大牌学人来演讲,也都只有小猫几只去捧场;学术沙龙?那是什么东西呀?没听过!

直到近几年在大陆跑多了,见过不少名牌学府的另一面,听过不少著名“大师”的笑话,了解到整个高等教育界的运作方式之后;我才知道,原来香港的大学也不算太差。

你看,英国《泰晤士报》公布全球大学排行榜,香港有3家进了前50呢。可是这还不是最重要的。而我的母校──香港中文大学的前校长高锟,刚拿了今年 的诺贝尔物理学奖,这难道不是很威风吗?但坦白讲,当年我念书的时候可不以为他有这么厉害;相反地,我们一帮学生甚至认为他只不过是个糟老头罢了。我的一 个同学是那时学生报的编辑,赶在高锟退休之前,在报上发了一篇文章,总结他的政绩,标题里有一句“八年校长一事无成”,大家看了都拍手叫好。

不只如此,当时高锟还接受中央政府的邀请,出任“港事顾问”,替将来的回归大业出谋献策。很多同学都被他的举动激怒了,认为这是学术向政治献媚的表 现。于是在一次大型集会上面(好像是毕业典礼),学生会发难了,他们在底下站起来,指着台上的校长大叫:“高锟可耻!”而高锟则憨憨地笑,谁也不知道他在 笑什么。

后来,一帮更激进的同学主张打倒行之有年的“迎新营”,他们觉得那是洗脑工程,拼命向新生灌输以母校为荣的自豪感,其实是种无可救药的集体主义,很 要不得。就在高锟对新生发表欢迎演讲的那一天,他们冲上去围住了他,塞给他一个套上了避孕套的中大学生玩偶,意思是学生全给校方蒙成了呆头。现场一片哗 然,高锟却独自低首,饶有兴味地检视那个玩偶。

后来我们才在报纸上看清楚他的回应。当时有记者跑去追问正要离开的校长:“校长!你会惩罚这些学生吗?”高锟马上停下来,回头很不解地反问那个记 者:“惩罚?我为什么要罚我的学生?”毕业之后,我才从当年干过学生会和学生报的老同学那里得知,原来高锟每年都会亲笔写信给他们,感谢他们的工作。不只 如此,他怕这些热心搞事的学生,忙得没机会和大家一样去打暑期工,所以每年都会自掏腰包,私下捐给这两个组织各两万港币的补助金,请他们自行分配给家境比 较困难的同学。我那位臭骂他“一事无成”的同门,正是当年的获益者之一。今天他已经回到母校任教了,在电话里他笑呵呵地告诉我:“我们就年年拿钱年年骂, 他就年年挨骂年年给。”

上个月,我们中大人戏称为“殖民地大学”的香港大学也出了条新闻,他们把名誉院士的荣衔颁给了宿舍“大学堂”的老校工“三嫂”袁苏妹,因为“她以自 己的生命,影响了大学住宿生的生命”。这位连字都不识的82岁的老太太,不只把学生们的肚皮照顾得无微不至,还不时要充当他们的爱情顾问,在他们人生路上 遇到困难的时候,以自己的岁月浇灌他们茫然的青茅,所以一向有“大学堂三宝”之一的称号。那一天,“三嫂”戴着神气的院士圆帽,穿上红黑相间的学袍,是一 众重量级学者之间最灿烂的巨星。她一上台,底下的老校友就站起来大声呐喊,掌声雷动;不管他们的头发是黑是白,不管他们现在是高官议员还是富商名流,他们 都是她的孩子。

我和高锟可就从来没这么亲近过了。八年里头,我只当面对他说过一句话。那一天我们几个同学从图书馆出来,正好见到他走在前面,马上揉搓成了一团纸朝 他丢过去。他一回头,我就指着另一个同学笑着大喊:“校长,你看他居然乱丢垃圾!”总是笑得有点傻的校长一如以往,顿了一顿才反应过来,慢吞吞地说:“这 就不太好了。”我们立即笑作一团,看着他的背影渐渐远去。

前一阵子,香港政务司司长唐英年跑到中大演讲“领导的艺术”,居然大谈什么“包容是领导最重要的美德”,我听了忍不住摇头轻叹:“你来我们这里讲包容?”

去年开始,高锟得了老年痴呆症,最近记性有点衰退了。这也不是不好的,因为我希望他忘记当年我们的恶作剧,忘记我们侮辱他的种种言行。但我又是多么 多么地盼望他,我们的老校长,能够记住他刚刚得到的是诺贝尔奖,记住他提出光纤构想时的喜悦,记住他和夫人一起拖着手在校园内散步的岁月,记住我们毕业之 后,偶尔在街上碰见他,笑着对他鞠躬请安“校长好”时的衷诚敬意。

ref
http://www.bullock.cn/blogs/liangwendao/archives/82951.aspx
好文,留个纪念!

2009年10月14日星期三

DarwinStreamingSrvrlinux-Linux5.5.5 CentOS install

處於穩定考慮還是裝5.5.5版本吧!

CentOS , Ubuntu下都裝過了:

CentOS:(5.2, 5.3, 5.1)

[root@test DarwinStreamingSrvrlinux-Linux]# ./Install

Installing Darwin Streaming Server

Checking for and Killing currently running Darwin Streaming Server
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
kill 10841: No such process
Removing previous versions of Darwin Streaming Server

Backing up previous config files

Inserting path to perl into scripts..

Creating unprivileged user to run the server = "qtss".
copying DarwinStreamingServer to /usr/local/sbin/DarwinStreamingServer
copying PlaylistBroadcaster to /usr/local/bin/PlaylistBroadcaster
copying MP3Broadcaster to /usr/local/bin/MP3Broadcaster
copying qtpasswd to /usr/local/bin/qtpasswd
creating /usr/local/sbin/StreamingServerModules directory
copying createuserstreamingdir to /usr/local/bin/createuserstreamingdir
creating /etc/streaming directory
Generating a new prefs file at /etc/streaming/streamingserver.xml
INFO: Module Loaded...QTSSRefMovieModule [dynamic]
INFO: Module Loaded...QTSSHomeDirectoryModule [dynamic]
INFO: Module Loaded...QTSSFileModule [static]
INFO: Module Loaded...QTSSReflectorModule [static]
INFO: Module Loaded...QTSSRelayModule [static]
INFO: Module Loaded...QTSSAccessLogModule [static]
INFO: Module Loaded...QTSSFlowControlModule [static]
INFO: Module Loaded...QTSSPosixFileSysModule [static]
INFO: Module Loaded...QTSSAdminModule [static]
INFO: Module Loaded...QTSSMP3StreamingModule [static]
INFO: Module Loaded...QTSSAccessModule [static]
WARNING: No users file found at /etc/streaming/qtusers.
WARNING: No groups file found at /etc/streaming/qtgroups.

copying relayconfig.xml-Sample to /etc/streaming/relayconfig.xml-Sample

copying qtusers to /etc/streaming/qtusers

copying qtgroups to /etc/streaming/qtgroups
copying readme.txt to /var/streaming/readme.txt
copying 3rdPartyAcknowledgements.rtf to /var/streaming/3rdPartyAcknowledgements.rtf
creating /usr/local/movies directory
creating /var/streaming/playlists directory
copying sample_100kbit.mov into /usr/local/movies/sample_100kbit.mov
copying sample_300kbit.mov into /usr/local/movies/sample_300kbit.mov
copying sample_100kbit.mp4 into /usr/local/movies/sample_100kbit.mp4
copying sample_300kbit.mp4 into /usr/local/movies/sample_300kbit.mp4
copying sample.mp3 into /usr/local/movies/sample.mp3
copying sample_50kbit.3gp into /usr/local/movies/sample_50kbit.3gp
copying sample_h264_100kbit.mp4 into /usr/local/movies/sample_h264_100kbit.mp4
copying sample_h264_300kbit.mp4 into /usr/local/movies/sample_h264_300kbit.mp4
copying sample_h264_1mbit.mp4 into /usr/local/movies/sample_h264_1mbit.mp4
copying StreamingLoadTool to /usr/local/bin/StreamingLoadTool
copying streamingloadtool.conf to /etc/streaming/streamingloadtool.conf
copying streamingadminserver.pl into /usr/local/sbin/streamingadminserver.pl
copying Admin HTML to /var/streaming/AdminHtml directory

Launching streamingadminserver.pl

Installation Complete

Darwin Streaming Server Setup

In order to administer the Darwin Streaming Server you must create an administrator user [Note: The administrator user name cannot contain spaces, or single or double quote characters, and cannot be more than 255 characters long].
Please enter a new administrator user name: admin

You must also enter a password for the administrator user [Note: The administrator password cannot contain spaces, or quotes, either single or double, and cannot be more than 80 characters long].
Please enter a new administrator Password:
Re-enter the new administrator password:
Adding userName admin
Setup Complete!
[root@vapp DarwinStreamingSrvrlinux-Linux]# netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 0.0.0.0:8000                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:8001                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:1220                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:554                 0.0.0.0:*                   LISTEN
[root@test DarwinStreamingSrvrlinux-Linux]# netstat -tln |grep 1220
tcp        0      0 0.0.0.0:1220                0.0.0.0:*                   LISTEN

大約這幾個端口

注意,Ubuntu 64bit sOS  的安裝有問題, 應該使用Ubuntu 32bits version 安裝

參考:http://phildawson.tumblr.com/post/26744895/darwin-streaming-server-on-ubuntu-linux

傻瓜化了, 沒啥問題,記錄一下

2009年10月13日星期二

Unbuntu下的ffmpeg

因為Ubuntu下的ffmpeg的package沒有將x264編譯進去,所以要重新編譯,步驟如下,備忘一下:

1 清理 ffmpeg 和x264相關的文件

sudo apt-get purge ffmpeg x264 libx264-dev


2.安裝一些庫文件



sudo apt-get update
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libsdl1.2-dev libtheora-dev libx11-dev libxvidcore4-dev zlib1g-dev


 



3.安裝x264



cd
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --fstrans=no --install=yes --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" –default


4 安裝ffmpeg



cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" –default


5做個試驗



ffmpeg -i movie.mpg -b 300000 -s 320×240 -vcodec mpeg4 -acodec aac movie.mp4

mp4creator -optimize movie.mp4


mp4creator -hint=1 movie.mp4


mp4creator -hint=2 movie.mp4


mp4creator -list movie.mp4



注意:在做mp4creator的時候會出現 一些類似報錯信息,可以跳過,繼續:



cri@cri-desktop:/usr/local/movies$ mp4creator -hint=1 03.m4a

MP4ERROR: MP4File::FindIntegerProperty: no such property - moov.trak[1].mdia.minf.stbl.stsd.*.esds.decConfigDescr.objectTypeId



cri@cri-desktop:/usr/local/movies$ mp4creator -hint=2 03.m4a

mp4creator: can't hint track type hint


mp4creator: error hinting track 2


cri@cri-desktop:/usr/local/movies$ mp4creator -list 03.m4a


Track   Type    Info


1       audio   MPEG-4 AAC LC, 271.766 secs, 258 kbps, 44100 Hz


2       hint    Payload mpeg4-generic for track 1



6 講處理過的文件放到DSS相關目錄下:



遠程打開, 如果沒有問題ok!



繼續研究



參考:



http://www.howtoforge.com/apples-darwin-streaming-server-on-centos-5.2-p2



http://ubuntuforums.org/showthread.php?t=786095

2009年10月12日星期一

Ubuntu的ssh

試用一個Ubuntu(9.04 version)安裝完成之後,remote方式登錄不了, 檢查發現沒有sshd服務啟動,

google了一下,發現default方式不帶這個

安裝方法記錄之,備查:

sudo apt-get update # 好像要更新一下所有的東東

sudo apt-get install openssh-server  #安裝

用netstat –tln 檢查發現 22 port開放了, 用putty login ok!

Redhat(CentOS)下安裝ffmpeg

嘗試從source code方式編譯,總是不得法沒有辦法, 先滿足工作需要用yum方式吧,

利用資源:

http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm 

一個是32bits, 一個是64bits

安裝還算順利

[root@vlc ~]# wget -c http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
--01:22:38--  http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
Resolving apt.sw.be... 193.1.193.67
Connecting to apt.sw.be|193.1.193.67|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16697 (16K) [application/x-redhat-package-manager]
--01:22:41--  (try: 2)  http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
Reusing existing connection to apt.sw.be:80.
HTTP request sent, awaiting response... 200 OK
Length: 16697 (16K) [application/x-redhat-package-manager]
Saving to: `rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm'

100%[=======================================>] 16,697      18.6K/s   in 0.9s

01:22:42 (18.6 KB/s) - `rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm' saved [16697/16697]

[root@vlc ~]# rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
warning: rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing...                ########################################### [100%]
   1:rpmforge-release       ########################################### [100%]

[root@vlc ~]# yum install ffmpeg
Loaded plugins: security
rpmforge                                                 | 1.1 kB     00:00
primary.xml.gz                                           | 3.4 MB     00:21
rpmforge                                                       9424/9424
dag                                                      | 1.1 kB     00:00
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package ffmpeg.x86_64 0:0.5-2.el5.rf set to be updated
--> Processing Dependency: a52dec for package: ffmpeg
--> Processing Dependency: libdirac_decoder.so.0()(64bit) for package: ffmpeg
--> Processing Dependency: libfaad.so.0()(64bit) for package: ffmpeg
--> Processing Dependency: libamrnb.so.3()(64bit) for package: ffmpeg
--> Processing Dependency: libpostproc.so.51()(64bit) for package: ffmpeg
--> Processing Dependency: libamrwb.so.3()(64bit) for package: ffmpeg
--> Processing Dependency: libImlib2.so.1()(64bit) for package: ffmpeg
--> Processing Dependency: libdirac_encoder.so.0()(64bit) for package: ffmpeg
--> Processing Dependency: libx264.so.68()(64bit) for package: ffmpeg
--> Running transaction check
---> Package a52dec.x86_64 0:0.7.4-8.el5.rf set to be updated
---> Package x264.x86_64 0:0.0.0-0.4.20090708.el5.rf set to be updated
---> Package imlib2.x86_64 0:1.4.0-1.el5.rf set to be updated
--> Processing Dependency: libid3tag.so.0()(64bit) for package: imlib2
---> Package faad2.x86_64 0:2.6.1-1.el5.rf set to be updated
---> Package amrwb.x86_64 0:7.0.0.3-1.el5.rf set to be updated
---> Package amrnb.x86_64 0:7.0.0.2-1.el5.rf set to be updated
---> Package ffmpeg-libpostproc.x86_64 0:0.5-2.el5.rf set to be updated
---> Package dirac.x86_64 0:1.0.2-1.el5.rf set to be updated
--> Processing Dependency: libcppunit-1.12.so.0()(64bit) for package: dirac
--> Running transaction check
---> Package cppunit.x86_64 0:1.12.0-3.el5.rf set to be updated
---> Package libid3tag.x86_64 0:0.15.1b-3.el5.rf set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package               Arch      Version                      Repository   Size
================================================================================
Installing:
ffmpeg                x86_64    0.5-2.el5.rf                 rpmforge    2.4 M
Installing for dependencies:
a52dec                x86_64    0.7.4-8.el5.rf               rpmforge     82 k
amrnb                 x86_64    7.0.0.2-1.el5.rf             rpmforge    237 k
amrwb                 x86_64    7.0.0.3-1.el5.rf             rpmforge    192 k
cppunit               x86_64    1.12.0-3.el5.rf              rpmforge    825 k
dirac                 x86_64    1.0.2-1.el5.rf               rpmforge    3.1 M
faad2                 x86_64    2.6.1-1.el5.rf               rpmforge    337 k
ffmpeg-libpostproc    x86_64    0.5-2.el5.rf                 rpmforge     37 k
imlib2                x86_64    1.4.0-1.el5.rf               rpmforge    977 k
libid3tag             x86_64    0.15.1b-3.el5.rf             rpmforge     78 k
x264                  x86_64    0.0.0-0.4.20090708.el5.rf    rpmforge    884 k

Transaction Summary
================================================================================
Install     11 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 9.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/11): ffmpeg-libpostproc-0.5-2.el5.rf.x86_64.rpm       |  37 kB     00:01
(2/11): libid3tag-0.15.1b-3.el5.rf.x86_64.rpm            |  78 kB     00:01
(3/11): a52dec-0.7.4-8.el5.rf.x86_64.rpm                 |  82 kB     00:00
(4/11): amrwb-7.0.0.3-1.el5.rf.x86_64.rpm                | 192 kB     00:01
(5/11): amrnb-7.0.0.2-1.el5.rf.x86_64.rpm                | 237 kB     00:01
(6/11): faad2-2.6.1-1.el5.rf.x86_64.rpm                  | 337 kB     00:08
(7/11): cppunit-1.12.0-3.el5.rf.x86_64.rpm               | 825 kB     00:18
(8/11): x264-0.0.0-0.4.20090708.el5.rf.x86_64.rpm        | 884 kB     00:10
(9/11): imlib2-1.4.0-1.el5.rf.x86_64.rpm                 | 977 kB     00:07
(10/11): ffmpeg-0.5-2.el5.rf.x86_64.rpm                  | 2.4 MB     00:17
(11/11): dirac-1.0.2-1.el5.rf.x86_64.rpm                 | 3.1 MB     00:14
--------------------------------------------------------------------------------
Total                                            98 kB/s | 9.0 MB     01:33
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : faad2                                           [ 1/11]
  Installing     : amrnb                                           [ 2/11]
  Installing     : cppunit                                         [ 3/11]
  Installing     : dirac                                           [ 4/11]
  Installing     : amrwb                                           [ 5/11]
  Installing     : a52dec                                          [ 6/11]
  Installing     : libid3tag                                       [ 7/11]
  Installing     : imlib2                                          [ 8/11]
  Installing     : x264                                            [ 9/11]
  Installing     : ffmpeg                                          [10/11]
  Installing     : ffmpeg-libpostproc                              [11/11]

Installed: ffmpeg.x86_64 0:0.5-2.el5.rf
Dependency Installed: a52dec.x86_64 0:0.7.4-8.el5.rf amrnb.x86_64 0:7.0.0.2-1.el5.rf amrwb.x86_64 0:7.0.0.3-1.el5.rf cppunit.x86_64 0:1.12.0-3.el5.rf dirac.x86_64 0:1.0.2-1.el5.rf faad2.x86_64 0:2.6.1-1.el5.rf ffmpeg-libpostproc.x86_64 0:0.5-2.el5.rf imlib2.x86_64 0:1.4.0-1.el5.rf libid3tag.x86_64 0:0.15.1b-3.el5.rf x264.x86_64 0:0.0.0-0.4.20090708.el5.rf
Complete!
[root@vlc ~]#

2009年10月11日星期日

RHCE5上mount一個NTFS的活動硬盤(usb)

原來的mobile disk壞了,一直懶的搞, 週末去買了一個, 不過現在的2.5都是sata的了, 原來的IDE的disk 比較貴了,所以又買了個盒子.

今天到公司, format這個東東為ntfs, 畢竟windows下的資源比較多:)

拿到linux環境下居然不能用:

[root@CRRACTEST2 ~]# mount /dev/sdb1 /home/usb
mount: unknown filesystem type 'ntfs'
[root@CRRACTEST2 ~]#

啥年月了redhat還不支持這個,google了一下,找到一個方法

[root@CRRACTEST2 ~]# uname -a
Linux CRRACTEST2.localdomain 2.6.18-92.el5 #1 SMP Fri May 23 23:40:43 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

下載

http://www.linux-ntfs.org/doku.php?id=redhat:rhel5

[root@CRRACTEST2 software]# wget -c http://prdownloads.sourceforge.net/linux-ntfs/kernel-module-ntfs-2.6.18-92.el5-2.1.27-0.rr.10.11.x86_64.rpm

[root@CRRACTEST2 software]# rpm -Uvh kernel-module-ntfs-2.6.18-92.el5-2.1.27-0.rr.10.11.x86_64.rpm
Preparing...                ########################################### [100%]
   1:kernel-module-ntfs-2.6.########################################### [100%]

[root@CRRACTEST2 software]# mount /dev/sdb1 /home/usb/
[root@CRRACTEST2 software]#

好像是只讀的

參考:http://www.enlamp.cn/?p=198

[root@CRRACTEST2 software]#  wget http://nchc.dl.sourceforge.net/sourceforge/fuse/fuse-2.7.4.tar.gz

[root@CRRACTEST2 software]# wget -c http://jaist.dl.sourceforge.net/sourceforge/linux-ntfs/ntfsprogs-2.0.0.tar.bz2

安裝:

三板斧 cofigure make make install ,順利

加載fuse model:

[root@CRRACTEST2 ~]# modprobe fuse

[root@CRRACTEST2 ~]# umount /dev/sdb1 #umount 原來的

[root@CRRACTEST2 ~]# ntfsmount /dev/sdb1 /home/usb
[root@CRRACTEST2 ~]#

編輯一個文件測試一下ok

[root@CRRACTEST2 usb]# pwd
/home/usb
[root@CRRACTEST2 usb]#

[root@CRRACTEST2 usb]# ll
total 0
drwxrwxrwx 1 root root 0 Oct 12 09:54 System Volume Information
-rw-rw-rw- 1 root root 6 Oct 12 10:51 test.txt

手順啊, 呵呵!