CentOS6挂载读写NTFS分区(ntfs-3g)
CentOS不像Fedora,默认是没有自动挂载NTFS的,而它可以利用NTFS-3G来实现挂载及读写。
NTFS-3G 是一个开源的软件,可以实现 Linux、Free BSD、Mac OSX、NetBSD 和 Haiku 等操作系统中的 NTFS 读写支持。它可以安全且快速地读写 Windows 系统的 NTFS 分区,而不用担心数据丢失。
现在讲解如何在CentOS安装NTFS-3G来实习那挂载NTFS分区。
首先必须安装了rpmforge软件库的源
1、下载rpmforge的rpm文件包
32位系统
[root@Jeffery /]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-1.el6.rf.i686.rpm
64位系统
[root@Jeffery /]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86\_64.rpm
[root@Jeffery /]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86\_64.rpm–2013-08-02 21:06:21– http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86\_64.rpm正在解析主机 pkgs.repoforge.org… 78.46.17.228正在连接 pkgs.repoforge.org|78.46.17.228|:80… 已连接。已发出 HTTP 请求,正在等待回应… 302 Found位置:http://rpmforge.sw.be/redhat/el6/en/x86\_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86\_64.rpm [跟随至新的 URL]–2013-08-02 21:06:22– http://rpmforge.sw.be/redhat/el6/en/x86\_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86\_64.rpm正在解析主机 rpmforge.sw.be… 78.46.17.228正在连接 rpmforge.sw.be|78.46.17.228|:80… 已连接。已发出 HTTP 请求,正在等待回应… 301 Moved Permanently位置:http://tree.repoforge.org/redhat/el6/en/x86\_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86\_64.rpm [跟随至新的 URL]–2013-08-02 21:06:23– http://tree.repoforge.org/redhat/el6/en/x86\_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86\_64.rpm正在解析主机 tree.repoforge.org… 78.46.17.228正在连接 tree.repoforge.org|78.46.17.228|:80… 已连接。已发出 HTTP 请求,正在等待回应… 301 Moved Permanently位置:http://apt.sw.be/redhat/el6/en/x86\_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86\_64.rpm [跟随至新的 URL]–2013-08-02 21:06:25– http://apt.sw.be/redhat/el6/en/x86\_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86\_64.rpm正在解析主机 apt.sw.be… 193.1.193.67正在连接 apt.sw.be|193.1.193.67|:80… 已连接。已发出 HTTP 请求,正在等待回应… 200 OK长度:12700 (12K) [application/x-redhat-package-manager]正在保存至: “rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm”
100%[======================================>] 12,700 18.0K/s in 0.7s
2013-08-02 22:06:26 (18.0 KB/s) – 已保存 “rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm” [12700/12700])
2、安装rpmforge的rpm文件包
[root@Jeffery /]# rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpmwarning: rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEYPreparing… ########################################### [100%] 1:rpmforge-release ########################################### [100%]
3、安装ntfs-3g
[root@linuxsight linuxsight]# yum install fuse-ntfs-3g
[root@Jeffery /]# yum install fuse-ntfs-3gLoaded plugins: fastestmirror, refresh-packagekit, securityDetermining fastest mirrors * base: ftp.tc.edu.tw * extras: ftp.tc.edu.tw * rpmforge: ftp.riken.jp * updates: ftp.tc.edu.twbase | 3.7 kB 00:00 base/primary_db | 4.4 MB 01:19 extras | 3.4 kB 00:00 extras/primary_db | 18 kB 00:00 rpmforge | 1.9 kB 00:00 rpmforge/primary_db | 2.6 MB 00:27 updates | 3.4 kB 00:00 updates/primary_db | 3.8 MB 01:10 Setting up Install ProcessResolving Dependencies–> Running transaction check—> Package fuse-ntfs-3g.x86_64 0:2013.1.13-2.el6.rf will be installed–> Finished Dependency Resolution
Dependencies Resolved
================================================================================ Package Arch Version Repository Size================================================================================Installing: fuse-ntfs-3g x86_64 2013.1.13-2.el6.rf rpmforge 483 k
Transaction Summary================================================================================Install 1 Package(s)
Total download size: 483 kInstalled size: 1.5 MIs this ok [y/N]: yDownloading Packages:http://ftp.riken.jp/pub/Linux/dag/redhat/el6/en/x86\_64/rpmforge/RPMS/fuse-ntfs-3g-2013.1.13-2.el6.rf.x86\_64.rpm: [Errno 14] PYCURL ERROR 6 – “Couldn’t resolve host ‘ftp.riken.jp'”Trying other mirror.http://mirror.cpsc.ucalgary.ca/mirror/dag/redhat/el6/en/x86\_64/rpmforge/RPMS/fuse-ntfs-3g-2013.1.13-2.el6.rf.x86\_64.rpm: [Errno 14] PYCURL ERROR 6 – “Couldn’t resolve host ‘mirror.cpsc.ucalgary.ca'”Trying other mirror.fuse-ntfs-3g-2013.1.13-2.el6.rf.x86_64.rpm | 483 kB 00:02 Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning TransactionWarning: RPMDB altered outside of yum. Installing : fuse-ntfs-3g-2013.1.13-2.el6.rf.x86_64 1/1 Verifying : fuse-ntfs-3g-2013.1.13-2.el6.rf.x86_64 1/1
Installed: fuse-ntfs-3g.x86_64 0:2013.1.13-2.el6.rf
Complete!
成功后你会发现已经可以挂载NTFS了。
CentOS开机自动挂载ext4分区