How to Build NAS With CentOS

By Michael Butler

Building a Network Attached Storage server allows file sharing between all the computers on a network. With Linux distros, including CentOS, you can also share files between computers in the network that run on other operating systems, including Windows and Mac OS X. Install Red Hat Enterprise Linux software and run NFS on the CentOS machine to turn it into a NAS computer.

Things You'll Need

  • Red Hat Enterprise Linux software ISO

Step 1

Open a terminal session, then type **dd if=/dev/dvd of=/location/of/disk/space/RHEL5.iso** and press **Enter** to install the Red Hat Enterprise software you downloaded as an ISO image.

Step 2

Type **mv /location/of/disk/space/RHEL5.iso /export/directory/** and press **Enter**.

Step 3

Enter **/export/directory *(ro,no_root_squash)** and then **/sbin/service nfs start**.

Step 4

Type **mkdir /home/sharing** and press **Enter**.

Step 5

Enter **vi /etc/exports**. Add **/home/sharing,sync)** to the end of the file. Save and close the file.

Step 6

Enter **vi /etc/hosts.allow**. Add **portmap:** to the end of the file and press **Enter**.

Step 7

Type **/etc/init.d/portmap start** and press **Enter**. The NAS server is now ready. You will need to set up the clients to share with according to the directions for the operating systems they run.