Add Windows Fonts in CentOS 5.5

Standard

Before you do this tutorial, read this tutorial first.
1. Mounting your NTFS partition
[root@localhost ~]# mount -t ntfs-3g /dev/hda1 /mnt/hda1_windows

2. Copy your fonts directory in windows system (eg. C:\windows\fonts\) partition
[root@localhost ~]# mkdir /usr/share/fonts/winfonts
[root@localhost ~]# cp -dpr /mnt/hda1_windows/windows/fonts /usr/share/fonts/winfonts

3. Edit your “/etc/fonts/fonts.conf”
[root@localhost ~]# vi /etc/fonts/fonts.conf
— or —
[root@localhost ~]# gedit /etc/fonts/fonts.conf

4. Add your fonts folder location in “/etc/fonts/fonts.conf” (mark with bold)

– files : /etc/fonts/fonts.conf
/usr/share/fonts
<dir>/usr/share/fonts/winfonts</dir>
/usr/share/X11/fonts/Type1 /usr/share/X11/fonts/OTF
<dir>~/.fonts</dir>

5. Log off your account or reboot
— reboot —
[root@localhost ~]# init 6
— or —
[root@localhost ~]# reboot

Mounting NTFS in CentOS 5.5

Standard

Windows partition used “ntfs-3g”, see step by step below to make mount point :

1. yum-priorities package install for rpmforge add to yum
[root@localhost ~]# yum install yum-priorities -y

2. list your /etc/yum/pluginconf.d/priorities.conf
[root@localhost ~]# cat /etc/yum/pluginconf.d/priorities.conf

— files :  /etc/yum/pluginconf.d/priorities.conf
[main]
enabled = 1
check_obsoletes = 1
priority=2

3. change priority to “priority=N” in /etc/yum/pluginconf.d/priorities.conf
[root@localhost ~]# vi /etc/yum/pluginconf.d/priorities.conf
— or —
[root@localhost ~]# gedit /etc/yum/pluginconf.d/priorities.conf

— files :  /etc/yum/pluginconf.d/priorities.conf
[main]
enabled = 1
check_obsoletes = 1
priority=N

4. install “rpmforge”
[root@localhost ~]# rpm -ivh http://apt.sw.be/redhat/el5/en/i386/dag/RPMS/rpmforge-release-0.5.1-1.el5.rf.i386.rpm

5. update yum
[root@localhost ~]# yum check-update

6. install “fuse”, “fuse-ntfs-3g”, “dkms”, “dkms-fuse”
[root@localhost ~]# yum install fuse fuse-ntfs-3g dkms dkms-fuse -y

since CentOS-5.4 have its own “fuse” modules than you can install it from your local media (DVD) or sources, you can use this :
[root@localhost ~]# yum install fuse -y
[root@localhost ~]# yum install fuse-ntfs-3g dkms dkms-fuse -y

7. find your NTFS partition (mark with bold)
[root@localhost ~]# fdisk -l

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device     Boot   Start   End      Blocks     Id   System
/dev/hda1   *        1     2611   20972826     7   HPFS/NTFS
/dev/hda2         2612     4865   18105255     7   HPFS/NTFS

Disk /dev/hdb: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device     Boot   Start   End      Blocks     Id   System
/dev/hdb1   *        1       13      104391   83   Linux
/dev/hdb2           14     4998   40042012+   8e   Linux LVM

Disk /dev/hdc: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device     Boot   Start   End      Blocks     Id   System
/dev/hdc1             1   12161    97683201    7   HPFS/NTFS
/dev/hdc2         12162   24321    97675200    7   HPFS/NTFS

8. make folder for mount ntfs
[root@localhost ~]# mkdir /mnt/hda1_windows
[root@localhost ~]# mkdir /mnt/hda2_windocs
[root@localhost ~]# mkdir /mnt/hdc1_iso
[root@localhost ~]# mkdir /mnt/hdc2_docs

9. mount ntfs filesystem to folder “/mnt/”, type is ntfs-3g
[root@localhost ~]# mount -t ntfs-3g /dev/hda1 /mnt/hda1_windows
[root@localhost ~]# mount -t ntfs-3g /dev/hda2 /mnt/hda2_windocs
[root@localhost ~]# mount -t ntfs-3g /dev/hdc1 /mnt/hdc1_iso
[root@localhost ~]# mount -t ntfs-3g /dev/hdc2 /mnt/hdc2_docs

read your files…
[root@localhost ~]# ls -al /mnt/hda1_windows
[root@localhost ~]# ls -al /mnt/hda2_windocs
[root@localhost ~]# ls -al /mnt/hdc1_iso
[root@localhost ~]# ls -al /mnt/hdc2_docs

10. read mounting point in fstab
[root@localhost ~]# cat /etc/fstab

— files : /etc/fstab
/dev/VolGroup00/LogVol00 /           ext3    defaults 1 1
LABEL=/boot              /boot       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
/dev/VolGroup00/LogVol01 swap        swap    defaults 0 0

11. create mounting point “ntfs-3g” (read-write) in fstab
[root@localhost ~]# vi /etc/fstab
— or —
[root@localhost ~]# gedit /etc/fstab

— files : /etc/fstab
/dev/VolGroup00/LogVol00 /           ext3    defaults 1 1
LABEL=/boot              /boot       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
/dev/VolGroup00/LogVol01 swap        swap    defaults 0 0
/dev/hda1         /mnt/hda1_windows  ntfs-3g rw,umask=0000,defaults 0 0
/dev/hda2         /mnt/hda2_windocs  ntfs-3g rw,umask=0000,defaults 0 0
/dev/hdc1         /mnt/hdc1_iso      ntfs-3g rw,umask=0000,defaults 0 0
/dev/hdc2         /mnt/hdc2_docs     ntfs-3g rw,umask=0000,defaults 0 0

note : if you want to mount read-only partition use
/dev/hda1        /mnt/hda1_windows   ntfs-3g ro,umask=0222,defaults 0 0

12. remounting fstab without reboot
[root@localhost ~]# mount -a