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@linuxsight linuxsight]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-1.el6.rf.i686.rpm
64位系统
[root@linuxsight linuxsight]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
2、安装rpmforge的rpm文件包
[root@linuxsight linuxsight]# rpm -ivh rpmforge-release-0.5.2-1.el6.rf.i686.rpm
3、安装ntfs-3g
[root@linuxsight linuxsight]# yum install fuse-ntfs-3g
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirrors.ta139.com
* extras: ftp.nara.wide.ad.jp
* rpmforge: apt.sw.be
* updates: mirrors.ta139.com
rpmforge | 1.1 kB 00:00
rpmforge/primary | 1.3 MB 01:22
rpmforge 3921/3921
Setting up Install Process
Package fuse-2.8.3-1.el6.i686 already installed and latest version
Resolving Dependencies
–> Running transaction check
—> Package fuse-ntfs-3g.i686 0:2010.10.2-1.el6.rf set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
fuse-ntfs-3g i686 2010.10.2-1.el6.rf rpmforge 637 k
Transaction Summary
================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 637 k
Installed size: 1.4 M
Is this ok [y/N]: y
Downloading Packages:
fuse-ntfs-3g-2010.10.2-1.el6.rf.i686.rpm | 637 kB 00:35
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : fuse-ntfs-3g-2010.10.2-1.el6.rf.i686 1/1
Installed:
fuse-ntfs-3g.i686 0:2010.10.2-1.el6.rf
Complete!
成功后你会发现已经可以挂载NTFS了。
绝对可用,经本人尝试后转载来的给大家分享的!
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirrors.ta139.com
* extras: ftp.nara.wide.ad.jp
* rpmforge: apt.sw.be
* updates: mirrors.ta139.com
rpmforge | 1.1 kB 00:00
rpmforge/primary | 1.3 MB 01:22
rpmforge 3921/3921
Setting up Install Process
Package fuse-2.8.3-1.el6.i686 already installed and latest version
Resolving Dependencies
–> Running transaction check
—> Package fuse-ntfs-3g.i686 0:2010.10.2-1.el6.rf set to be updated
–> Finished Dependency Resolution
Package Arch Version Repository Size
================================================================================
Installing:
fuse-ntfs-3g i686 2010.10.2-1.el6.rf rpmforge 637 k
================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Installed size: 1.4 M
Is this ok [y/N]: y
Downloading Packages:
fuse-ntfs-3g-2010.10.2-1.el6.rf.i686.rpm | 637 kB 00:35
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : fuse-ntfs-3g-2010.10.2-1.el6.rf.i686 1/1
fuse-ntfs-3g.i686 0:2010.10.2-1.el6.rf
--------------
centos6.3 编译安装 ntfs-3g 支持USB移动硬盘
install ntfs-3g,However, When I install ntfs-3g using YUM, it said it can not find the package. So i have to down ntfs-3g directly from http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2012.1.15.tgz
下载源码自己编译, 编译方法:
wget http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2012.1.15.tgz
tar zxvf ntfs-3g_ntfsprogs-2012.1.15.tgz
cd ntfs-3g_ntfsprogs-2012.1.15
./configure
make
wget http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2012.1.15.tgz
tar zxvf ntfs-3g_ntfsprogs-2012.1.15.tgz
cd ntfs-3g_ntfsprogs-2012.1.15
./configure
make
make install #sudo make install
2. 开始挂载ntfs
<1. 先用 fdisk -l 查看系统磁盘分区信息。(注意导入root的环境变量需要 su -)
<1. 先用 fdisk -l 查看系统磁盘分区信息。(注意导入root的环境变量需要 su -)
<2. mount -t ntfs-3g /dev/sda5 /mnt/win_D 记着先mkdir好win_D,如果弄错了可以使用umount
3. 添加启动挂载
vim /etc/fstab
修改方法:
只读式挂载:/dev/sda5 /mnt/win_D ntfs-3g ro,umask=0222,defaults 0 0
读写式挂载:/dev/sda5 /mnt/win_D ntfs-3g rw,umask=0000,defaults 0 0
或者: /dev/sda1 /mnt/windows/c ntfs-3g defaults 0 0
vim /etc/fstab
修改方法:
只读式挂载:/dev/sda5 /mnt/win_D ntfs-3g ro,umask=0222,defaults 0 0
读写式挂载:/dev/sda5 /mnt/win_D ntfs-3g rw,umask=0000,defaults 0 0
或者: /dev/sda1 /mnt/windows/c ntfs-3g defaults 0 0
---------
NTFS-3G + Ntfsprogs
NTFS-3G is a stable, full-featured, read-write NTFS driver for Linux,
Android, Mac OS X, FreeBSD, NetBSD, OpenSolaris, QNX, Haiku, and other
operating systems. It provides safe handling of the Windows XP, Windows
Server 2003, Windows 2000, Windows Vista, Windows Server 2008 and
Windows 7 NTFS file systems. A high-performance alternative, called Tuxera NTFS is available for embedded devices and Mac OS X.
The release notes and the software changes can be found on the Release History page. Subscribe here for new release notifications.
Availability:
./configure
make
make install # or 'sudo make install' if you aren't root
Non-Linux: Please see the OS specific installation and source packages above.
mount -t ntfs-3g /dev/sda1 /mnt/windows
Please see the NTFS-3G Manual for more options and examples.
You can also make NTFS to be mounted during boot by adding the following line to the end of the /etc/fstab file:
/dev/sda1 /mnt/windows ntfs-3g defaults 0 0
The release notes and the software changes can be found on the Release History page. Subscribe here for new release notifications.
Download
The latest stable version is ntfs-3g_ntfsprogs-2012.1.15, released on January 22, 2012.Availability:
Installation
Linux: Most distributions include and use NTFS-3G by default. Please use that one unless it’s an old version. If you wish to install NTFS-3G from the source code then make sure you have installed the basic development tools (gcc compiler, libc-dev libraries). Then type:./configure
make
make install # or 'sudo make install' if you aren't root
Non-Linux: Please see the OS specific installation and source packages above.
Usage
If there was no error during installation then the NTFS volume can be mounted in read-write mode for everybody as follows. Unmount the volume if it had already been mounted, replace /dev/sda1 and /mnt/windows, if needed.mount -t ntfs-3g /dev/sda1 /mnt/windows
Please see the NTFS-3G Manual for more options and examples.
You can also make NTFS to be mounted during boot by adding the following line to the end of the /etc/fstab file:
/dev/sda1 /mnt/windows ntfs-3g defaults 0 0
No comments:
Post a Comment