In the Creating a scalable architecture recipe, we arrived at a server architecture to support a website. That architecture required a separate storage, linked to processing servers over the network. In this recipe, we will cover how you could set up such NAS on a Debian Linux server with no special hardware.
1. Run the following command to install all the required components for Network File System (NFS) sharing:
Shell> apt-get install nfs-kernel-server nfs-common portmap
/etc/exportsfile, and add the following line:
3. Run the following command to make the changes effective:
You can fine tune the line in
/etc/exports to fit your needs. Pay particular attention to access if you want your files to be secure. You could list individual servers as a comma-separated list, and give them explicit permissions to the shared folder.
fileadmin will now be shared by other computers on the network, and could be accessed by several web servers in our scalable architecture. Changes to the TYPO3 code—such as installing extensions or changing configuration values—will still need to be done independently on each server, but all media files can be stored on the NFS share.
In the following section we will see how we can mount a Network File System.
Shell> apt-get install nfs-common
After that, mount the shared folder on a different server with the following command:
Shell> mount -t nfs hostname:/nfs_folder /var/www/fileadmin