Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:fileserver [2012/09/08 11:06] kennedywalkerwiki:fileserver [2013/05/09 18:22] (current) – added TFTP under listed alternatives tinypoodle
Line 2: Line 2:
 A fileserver is a machine other than your workstation, that keeps your files.\\ A fileserver is a machine other than your workstation, that keeps your files.\\
 Usually, a single fileserver provides filesharing between multiple workstations.\\ Usually, a single fileserver provides filesharing between multiple workstations.\\
- +There are a number of alternatives for sharing files: 
- +  * NFS 
 +  * Samba 
 +  * Rsync 
 +  * FTP-SFTP-TFTP
 ==== NFS server ==== ==== NFS server ====
-To set up a NFS **server**, you need 2 packages. (To setup a NFS **client**, you only need the first package.)+The following is a simple recipe for setting up a NFS server that is available to all machines in a subnet.\\ 
 +To set up a NFS **server** under TinyCore, you need 2 packages. (To setup a NFS **client**, you only need the first package.)
   - nfs-utils.tcz   - nfs-utils.tcz
   - filesystems-`uname -r`.tcz   __(note: shell backquotes to insert output of `uname -r` command.)__   - filesystems-`uname -r`.tcz   __(note: shell backquotes to insert output of `uname -r` command.)__
-The appropriate install option is //OnBoot//+The appropriate tce-ab install option for both packages is //OnBoot// 
 + 
 +=== NFS server configuration files === 
 +The NFS server is configured by 3 files: 
 +  - /etc/hosts.deny\\ 
 +  - /etc/hosts.allow\\ 
 +  - /etc/exports\\ 
 + 
 +You can get away with leaving //hosts.deny// and //hosts.allow// empty, however,\\ 
 +please keep in mind that this arrangement is only secure enough within a home network behind a firewall. 
 + 
 +Also keep in mind that TinyCore puts its root filesystem "/" in RAM, which gets populated by an //initrd// file. (core.gz)\\ 
 +This also applies to the /etc directory. The boot options for persistence do not help for this directory.\\ 
 +If you want to keep some /etc files persistent, you must arrange for them to be copied from some persistent location into /etc at boot time.\\ 
 +The easiest way is to create a /opt/etc directory, and keep persistent copies of your /etc files there.\\ 
 +At boot time, copy everything from /opt/etc into /etc by some command in file /opt/bootsync.sh or /opt/bootlocal.sh 
 + 
 +To share the directory /home/nfs for read-write access, create the file **/etc/exports**, and add a line like the following 
 +<code>/home/nfs 192.168.2.0/255.255.255.0(rw,async,no_subtree_check)</code> 
 +This will make the directory /home/nfs available for any machine in the IP subnet (192.168.2.xxx).\\ 
 +You can also specify exact IP adresses. 
 + 
 +=== Starting the NFS server === 
 +<code> 
 +"/usr/local/etc/init.d/nfs-server start"  
 +</code> 
 + 
 +=== Approaching the NFS server by a client === 
 +If your TinyCore box with the NFS server has IP address 192.168.2.252 and a /etc/exports as shown in the previous text,\\ 
 +then you can access its files from any machine with an IP address like 192.168.2.xxx ; by entering the following command. 
 +<code> 
 +sudo mount 192.168.2.252:/home/nfs  /mnt/nfs 
 +</code> 
 +( See [[boot option nodhcp]] to obtain a fixed IP address for the server)
  
 See also: See also:
Line 15: Line 51:
   * [[http://forum.tinycorelinux.net/index.php/topic,7940.msg42631.html#msg42631]]   * [[http://forum.tinycorelinux.net/index.php/topic,7940.msg42631.html#msg42631]]
   * [[http://forum.tinycorelinux.net/index.php/topic,10948.0.html]]   * [[http://forum.tinycorelinux.net/index.php/topic,10948.0.html]]
-  * +  * [[http://forum.tinycorelinux.net/index.php/topic,13923.0.html]] 
 + 
 +=== Managing the file server === 
 + 
 +Occasionally, you may need to do some tasks that can't be done through NFS file access alone.\\ 
 +On such occasions, command-line access through a remote shell can come in handy.\\ 
 +A solution for this, which is secure as well as reasonably cheap on resources is a Secure Shell.\\ 
 +You can use [[OpenSSH]], or its light-weight alternative [[Dropbear]]. (both being more secure than plain old telnet)\\ 
 +If you want to use [[http://www.en.wikipedia.org/wiki/SSHFS|SSHFS]], then please note that you will need a SFTP server on your TinyCore box.\\ 
 +Dropbear does not come with a SFTP server, but it can borrow the SFTP-server that comes with OpenSSH. 
  
  
Print/export
QR Code
QR Code wiki:fileserver (generated for current page)