- 论坛徽章:
- 0
|
参考文献:
http://linux.chinaunix.net/docs/2008-01-24/4722.shtml
实用技巧:Centos 5.1安装NTFS读写支持
日期:2008-01-24 作者:linux时代 来自:linux.chinaunix.net
CentOS 5默认是不支持挂载NTFS,因此我们需要安装ntfs-3g
1. 安装fuse
建议不要用二进制包安装而应该用源代码安装,我刚开始用二进制包安装总是提示
FATAL: Module fuse not found.
fuse: device not found, try 'modprobe fuse' first
FUSE mount point creation failed
郁闷了一阵子干脆源码安装
首先下载fuse2.72http://sourceforge.net/project/showfiles.php?group_id=121684
然后就是经典的./configure&&make&&make install&&make clean
PS:执行./configure别忘了加参数--prefix=/usr,否则默认安装在 /usr/local/lib,这样有需要编辑/etc/ld.so.conf把/usr/local/lib加进去,再执行 /sbin/ldconfig,不然安装ntfs-3g会有错误。
2.安装ntfs-3g
这里建议用二进制包安装,免去编译的麻烦
下载地址:ftp://rpmfind.net/linux/fedora/e ... .417-1.fc7.i386.rpm
或http://www.ntfs-3g.org/index.html#download
或http://download.opensuse.org/repositories/home:/benkai:/ntfs/(找到对应版本)
下载这个版本就行了,高版本f8,f9又需要高版本的glibc库。
3.使用ntfs-3g
man ntfs-3g
mount -t ntfs-3g /dev/sdan /mountpoint
开机地动挂再修改/etc/fstab
[pcman@localhost fuse-2.7.2]$ cat /etc/fstab
LABEL=/1 / ext3 defaults 1 1
LABEL=/home /home ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda8 swap swap defaults 0 0
/mnt/win_D /dev/sda5 vfat defaults 0 0
/mnt/win_E /dev/sda9 ntfs-3g defaults 0 0
/mnt/win_F /dev/sda3 ntfs-3g defaults 0 0
PS:有些文章说需要执行/sbin/mount.ntfs-3g "$@" ,chmod a+x /sbin/mount.ntfs。我这里倒是没执行过,如果朋友们遇到了某些问题,可以试试这些方法。
·最新评论·
以下网友评论只代表网友个人观点,不代表ChinaUnix.net观点
共 2 条评论
windowsnt [221.219.119.*] 认为:
2008-08-28 01:40:32
你这个方法太复杂。
参见http://wiki.centos.org/TipsAndTricks/NTFSPartitions
配置好rpmforge源,直接执行
yum install fuse fuse-ntfs-3g
搞定
Centos 5.2安装NTFS读写支持
以下是在Linux CentOS5 2.6.18-92.1.10.el5xen #1 SMP Tue Aug 5 08:46:32 EDT 2008 i686 athlon i386 GNU/Linux 环境下的实践过程记录如下:
[root@CentOS5 ~]#rpm -vih ntfs-3g-1.2712-3.1.i386 (成功安装,过程略)
[root@CentOS5 ~]# yum --enablerepo=rpmforge install fuse fuse-ntfs-3g dkms dkms-fuse
Loading "fastestmirror" plugin
Error getting repository data for rpmforge, repository not found
[root@CentOS5 ~]# yum install kernel-xen-devel
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: ftp2.tnc.edu.tw
* updates: ftp2.tnc.edu.tw
* addons: ftp2.tnc.edu.tw
* extras: centosa3.centos.org
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package kernel-xen-devel.i686 0:2.6.18-92.1.10.el5 set to be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
kernel-xen-devel i686 2.6.18-92.1.10.el5 updates 4.8 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 4.8 M
Is this ok [y/N]: y
Downloading Packages:
(1/1): kernel-xen-devel-2 100% |=========================| 4.8 MB 00:10
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: kernel-xen-devel ######################### [1/1]
Installed: kernel-xen-devel.i686 0:2.6.18-92.1.10.el5
Complete!
[root@CentOS5 ~]# wget http://apt.sw.be/redhat/el5/en/i ... 6-1.el5.rf.i386.rpm
--17:42:37-- http://apt.sw.be/redhat/el5/en/i ... 6-1.el5.rf.i386.rpm
正在解析主机 apt.sw.be... 193.1.193.67
Connecting to apt.sw.be|193.1.193.67|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:16698 (16K) [application/x-redhat-package-manager]
Saving to: `rpmforge-release-0.3.6-1.el5.rf.i386.rpm'
100%[===================================================================================>] 16,698 15.6K/s in 1.0s
17:42:50 (15.6 KB/s) - `rpmforge-release-0.3.6-1.el5.rf.i386.rpm' saved [16698/16698]
[root@CentOS5 ~]# rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
warning: rpmforge-release-0.3.6-1.el5.rf.i386.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing... ########################################### [100%]
1:rpmforge-release ########################################### [100%]
[root@CentOS5 ~]# rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
[root@CentOS5 ~]# yum check-update
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* rpmforge: apt.sw.be
* base: ftp2.tnc.edu.tw
* updates: ftp2.tnc.edu.tw
* addons: ftp2.tnc.edu.tw
* extras: centosa3.centos.org
rpmforge 100% |=========================| 1.1 kB 00:00
primary.xml.gz 100% |=========================| 2.6 MB 00:26
rpmforge : ################################################## 7496/7496
afio.i386 2.5-2.el5.rf rpmforge
agg.i386 2.5-1.el5.rf rpmforge
buffer.i386 1.19-2.el5.rf rpmforge
cadaver.i386 0.22.5-1.el5.rf rpmforge
dnsmasq.i386 2.45-1.el5.rf rpmforge
iso-codes.noarch 1.0a-1.el5.rf rpmforge
lftp.i386 3.7.3-1.el5.rf rpmforge
libwpd.i386 0.8.14-1.el5.rf rpmforge
mtr.i386 2:0.74-1.el5.rf rpmforge
perl-Archive-Tar.noarch 1.38-1.el5.rf rpmforge
perl-BSD-Resource.i386 1.2901-1.el5.rf rpmforge
perl-Compress-Zlib.noarch 2.011-1.el5.rf rpmforge
perl-Convert-ASN1.noarch 0.21-2.el5.rf rpmforge
perl-Crypt-SSLeay.i386 0.57-1.el5.rf rpmforge
perl-DBI.i386 1.605-1.el5.rf rpmforge
perl-HTML-Parser.i386 3.56-1.el5.rf rpmforge
perl-HTML-Tagset.noarch 3.20-1.el5.rf rpmforge
perl-IO-Socket-INET6.noarch 2.54-1.el5.rf rpmforge
perl-IO-Socket-SSL.noarch 1.13-1.el5.rf rpmforge
perl-IO-Zlib.noarch 1.09-1.el5.rf rpmforge
perl-Net-DNS.i386 0.63-1.el5.rf rpmforge
perl-Net-SSLeay.i386 1.32-1.el5.rf rpmforge
perl-Socket6.i386 0.20-1.el5.rf rpmforge
perl-XML-Parser.i386 2.36-1.el5.rf rpmforge
perl-XML-SAX.noarch 0.16-1.el5.rf rpmforge
perl-XML-Simple.noarch 2.18-1.el5.rf rpmforge
perl-XML-Twig.noarch 3.32-1.el5.rf rpmforge
python-imaging.i386 1.1.6-2.el5.rf rpmforge
rsync.i386 3.0.3-1.el5.rf rpmforge
spamassassin.i386 3.2.5-1.el5.rf rpmforge
subversion.i386 1.5.2-0.1.el5.rf rpmforge
syslinux.i386 3.71-1.el5.rf rpmforge
xrestop.i386 0.4-1.el5.rf rpmforge
[root@CentOS5 ~]# yum install fuse fuse-ntfs-3g dkms dkms-fuse
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* rpmforge: fr2.rpmfind.net
* base: ftp2.tnc.edu.tw
* updates: ftp2.tnc.edu.tw
* addons: ftp2.tnc.edu.tw
* extras: centosa3.centos.org
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package fuse-ntfs-3g.i386 0:1.2812-1.el5.rf set to be updated
---> Package dkms.noarch 0:2.0.20.2-2.el5.rf set to be updated
---> Package fuse.i386 0:2.7.3-1.el5.rf set to be updated
---> Package dkms-fuse.noarch 0:2.7.3-1.nodist.rf set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
dkms-fuse noarch 2.7.3-1.nodist.rf rpmforge 70 k
fuse-ntfs-3g i386 1.2812-1.el5.rf rpmforge 383 k
Installing for dependencies:
dkms noarch 2.0.20.2-2.el5.rf rpmforge 61 k
fuse i386 2.7.3-1.el5.rf rpmforge 249 k
Transaction Summary
=============================================================================
Install 4 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 763 k
Is this ok [y/N]: y
Downloading Packages:
(1/4): dkms-fuse-2.7.3-1. 100% |=========================| 70 kB 00:09
(2/4): fuse-2.7.3-1.el5.r 100% |=========================| 249 kB 00:15
(3/4): dkms-2.0.20.2-2.el 100% |=========================| 61 kB 00:30
(4/4): fuse-ntfs-3g-1.281 100% |=========================| 383 kB 00:20
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: fuse ######################### [1/5]
Installing: dkms ######################### [2/5]
Installing: fuse-ntfs-3g ######################### [3/5]
Installing: dkms-fuse ######################### [4/5]
Erasing : ntfs-3g ######################### [5/5]
Installed: dkms-fuse.noarch 0:2.7.3-1.nodist.rf fuse-ntfs-3g.i386 0:1.2812-1.el5.rf
Dependency Installed: dkms.noarch 0:2.0.20.2-2.el5.rf fuse.i386 0:2.7.3-1.el5.rf
Complete!
[root@CentOS5 ~]# vi /etc/fstab
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/dev/sda5 /mnt/win_d ntfs-3g iocharset=gb2312,uid=500,gid=500,defaults 0 0
/dev/sda6 /mnt/win_e ntfs-3g iocharset=gb2312,uid=500,gid=500,defaults 0 0 |
|