Enabling NFS in Ubuntu L'attivazione di NFS in Ubuntu
Under Linux and most Unix operating systems, the network file system (NFS) is the common way to share directories. Sotto Linux e la maggior parte dei sistemi operativi Unix, il Network File System (NFS) è il comune modo di condividere le directory. With other Unix and Linux operating systems, NFS is part of the core installation. Con Unix e altri sistemi operativi Linux, NFS è parte del nucleo di installazione. But with Ubuntu, you need to install it as a package. Ma con Ubuntu, è necessario installare come un pacchetto. There are three main components required by NFS: Ci sono tre componenti principali richiesti dalla NFS:
• portmap-This package provides support for remote procedure calls (RPC) and is used by NFS. • portmap-Questo pacchetto fornisce il supporto per le chiamate di procedura remota (RPC) e viene utilizzato da NFS. You don't need to install portmap by itself-the apt-get commands for the other two components will install portmap as a requirement. Non è necessario installare da sé portmap-apt-get comandi per gli altri due componenti installare portmap come un obbligo.
• nfs-common-Although portmap provides support for RPC function, this package actually provides the RPC functions for NFS. • nfs-common-portmap Anche se fornisce il supporto per RPC funzione, questo pacchetto prevede effettivamente RPC funzioni per NFS. This package is required for NFS clients and servers. Questo pacchetto è necessario per NFS client e server. It provides basic RPC functions like file locking and status. Esso prevede RPC funzioni di base come file di blocco e lo status. If you only need to install an NFS client (meaning you will mount a directory exported by some other server), then you can use: sudo apt-get install nfs-common. Se avete solo bisogno di installare un client NFS (cioè si montare una directory esportate da alcuni altri server), quindi si può usare: sudo apt-get install nfs-comune. Installing nfs-common will generate an error message, "Not starting NFS kernel daemon: No exports." Installare nfs-common genererà un messaggio di errore, "Non partire demone NFS del kernel: No esportazioni". This is expected since it is not configured. Questo è previsto dal momento che non è configurato.
• nfs-kernel-server-This package adds kernel modules so you can actually export a directory for use by a remote host; with this package, you get a server. • nfs-kernel-server Questo pacchetto aggiunge moduli del kernel in modo che tu possa effettivamente una directory di esportazione per l'uso da un host remoto; con questo pacchetto, si ottiene un server. You can install it using: sudo apt-get install nfs-kernel-server. È possibile installarlo con il comando: sudo apt-get install nfs-kernel-server. This brings in portmap and nfs-common as required packages. Questo porta a NFS e portmap-comune come i pacchetti necessari.
NFS is a great collaboration tool because entire file systems can be shared transparently. NFS è un grande strumento di collaborazione, perché tutto il file system può essere condiviso e trasparente. Everyone sees the same files and file changes are immediately accessible by everyone. Ognuno vede gli stessi file e file cambia sono immediatamente accessibili da tutti. The main limitation is operating system support. La principale limitazione è supporto del sistema operativo. Although NFS exists for Linux, BSD, HP-UX, AIX, Solaris, BeOS, Mac OS X, and even OS/2, Windows does not natively include it. Anche se esiste NFS per Linux, BSD, HP-UX, AIX, Solaris, BeOS, Mac OS X, e anche OS / 2, Windows non nativamente la includono. If you want to use NFS with Windows, consider installing the Windows Services for UNIX (http://www.microsoft.com/technet/interopmigration/unix/sfu/). Se si desidera utilizzare con Windows NFS, prendere in considerazione l'installazione di Windows Services for UNIX (http://www.microsoft.com/technet/interopmigration/unix/sfu/). This free product from Microsoft includes NFS server and client support. Questo prodotto gratuito da Microsoft include server NFS client e sostegno.
Acting as an NFS Client Agendo come un client NFS
Mounting a remote file system with NFS is really easy. Montare un file system remoto con NFS è davvero facile. Just as the mount command can be used to access a hard drive, CD-ROM, or other block device, it can be used to mount a remote file system. Proprio come il comando mount può essere utilizzato per accedere a un disco rigido, unità CD-ROM o altro dispositivo a blocchi, può essere usato per montare un file system remoto. You just need three items: the server's name, the directory name on the server that is being exported, and the mount point on your local system (a directory) for the connection. Hai solo bisogno di tre elementi: il nome del server, il nome della directory sul server che viene esportato, e il punto di montaggio sul vostro sistema locale (una directory) per la connessione. For example, to mount the directory /home/project from the server sysprj1 and place it at /mnt/project on your local computer, you would use: Ad esempio, per montare la directory in / home / progetto dal server sysprj1 e posizionarlo in / mnt / progetto sul computer locale, si usa:
sudo mkdir /mnt/project # to make sure it exists sudo mkdir / mnt / # progetto per assicurarsi che esista
sudo mount -t nfs sysprj1:/home/project /mnt/project sudo mount-t sysprj1 nfs: / home / progetto / mnt / progetto
Now, all the files under /home/project on the host sysprj1 are accessible from the local directory /mnt/project. Ora, tutti i file in / home / sul progetto di accoglienza sysprj1 sono accessibili dalla directory locale / mnt / progetto. The access is completely transparent-anything you can do on your local file system can be done over this NFS mount. L'accesso è completamente trasparente, tutto ciò che potete fare sul vostro file system locale può essere fatto su questo montaggio NFS.
If you don't know the name of the exported directory, NFS enables you to browse the list of exported partitions using the showmount -e command. Se non si conosce il nome della directory esportata, NFS vi permette di sfogliare l'elenco delle partizioni esportati utilizzando il showmount-e comando. This lists the directories and list of clients that can access it. Questo elenca le directory e l'elenco dei clienti che può accedervi. The client list returned from the server can be an entire domain (for example, *.local.net) or a list of clients. Il client elenco restituito dal server può essere un intero dominio (per esempio, *. local.net) o un elenco di clienti. Access restrictions are set by the NFS server and follow the Unix permissions. Restrizioni di accesso sono stabiliti dal server NFS e seguire le autorizzazioni di Unix. If you find that you cannot access the directory after mounting it, check the permissions with ls -l. Se si scopre che non è possibile accedere dopo la directory di montaggio che, controllate i permessi con ls-l. If you do not have permission, then talk to the administrator for the NFS server. Se non avete il permesso, quindi parlare con l'amministratore del server NFS.
$ showmount -e sysprj1 $ Showmount-e sysprj1
/home/projects *.local.net / home / progetti *. local.net
/media/cdrom *.local.net / media / cdrom *. local.net
When you are done with the mounted partition, you can remove it using sudo umount /mnt/project. Quando avete finito con la partizione già montata, è possibile rimuoverlo utilizzando sudo umount / mnt / progetto.
For short-term access, you will probably want to use mount and umount to access the directory as needed. Per breve termine, l'accesso, sarà probabilmente desidera utilizzare montare e smontare per accedere alla directory come necessario. For long-term collaboration, you can add the entry in /etc/fstab. Per la collaborazione a lungo termine, è possibile aggiungere la voce nel file / etc / fstab. For example: Ad esempio:
sysprj1:/home/project /mnt/project nfs defaults 0 0 sysprj1: / home / progetto / mnt / nfs progetto defaults 0 0
Having the entry in /etc/fstab will make sure the directory is mounted every time you reboot. Avendo l'entrata in / etc / fstab, si assicura la directory è montata ogni volta che si riavvia. You can also use sudo mount /mnt/project (specifying only the mount point) as a shortcut since mount consults /etc/fstab when determining devices. È inoltre possibile utilizzare sudo mount / mnt / progetto (specificando solo il punto di montaggio) come un collegamento dal monte consulta / etc / fstab i dispositivi per la determinazione. NFS has one huge limitation. NFS ha un enorme limitazione. If the server goes down then all file accesses to the network partition will hang-up to hours-before failing. Se il server va giù poi tutti i file di accessi alla rete partizione di appendere-fino a ora, prima fallendo. The hang-up is due to network timeouts and retries. Il blocco-up è causa di timeout di rete e riprova. If your connection to the server is unstable, then don't use NFS. Se la connessione al server è instabile, quindi non usare NFS.
Acting as an NFS Server Agendo come un server NFS
NFS servers export directories for use by NFS clients. NFS server directory di esportazione per l'uso da client NFS. This is a two-step process. Questo è un processo in due fasi. First, you need to create a file called /etc/exports. In primo luogo, è necessario creare un file chiamato / etc / exports. This file contains a list of directories to export and clients that are permitted to access the directories. Questo file contiene un elenco di directory di esportazione e di clienti che sono autorizzati ad accedere alla directory. Special access permissions can also be specified such as ro for read-only, rw for read-write, and sync for synchronous writes. Speciali permessi di accesso può anche essere specificato come per le navi ro di sola lettura, per RW in lettura-scrittura, e di sincronizzazione per sincrono scrive.
The NFS server will not start if /etc/exports is missing or contains no exported directories. Il server NFS non si avvia se / etc / exports è mancante o non contiene le directory esportate. The default file contains only a few comments, so the server will not start. Il file di default contiene solo un paio di osservazioni, in modo che il server non si avvia. After you create your first entries, you will need to start the server. Dopo aver creato il tuo primo voci, sarà necessario avviare il server. The easy way to start it is with the command sudo /etc/init.d/nfs-kernel-server start. Il sistema più semplice per iniziare è con il comando sudo / etc / init.d / nfs-kernel-server start.
After modifying the /etc/exports file, you need to tell the NFS server to actually export the entries. Dopo aver modificato il file / etc / exports file, è necessario dire al server NFS per esportare effettivamente le voci.
sudo exportfs -r # re-export all entries in /etc/exports sudo exportfs-R # riesportazione tutte le voci in / etc / exports
The exportfs command can also be used for other tasks: Exportfs Il comando può essere usato anche per altri compiti:
• List the current export table-Run exportfs without any parameters. • Elenco di esportazione in corso il tavolo-Run exportfs senza parametri.
• Export a specific directory once-This is useful if the export is not intended to be permanent (/etc/exports is really for permanent mounts). • Esportazione una directory specifica una volta-Questo è utile se l'esportazione non è destinato a essere permanente (/ etc / exports è veramente permanente per la monta). You will need to specify options, and the list of clients is specified before the directory. È necessario specificare le opzioni, e l'elenco dei clienti è specificato prima la directory. For example: Ad esempio:
sudo exportfs -o ro,async '*.local.net:/media/cdrom' sudo exportfs-o ro, async '*. local.net: / media / cdrom'
• Un-export directory-If the entry is still listed in /etc/exports, then the removal is temporary; the mount will be re-exported the next time you reboot or restart the NFS server. • Un-esportazione di directory-Se la voce è ancora elencate in / etc / exports, quindi la rimozione è temporaneo; il monte saranno riesportati la prossima volta che si riavvia o riavviare il server NFS.
sudo exportfs -u '*.local.net:/media/cdrom' exportfs sudo-u '*. local.net: / media / cdrom'
You can export anything that is mounted. È possibile esportare tutto ciò che è montato. This includes CD-ROM drives, USB thumb drives, and even mounted NFS partitions from other servers! Ciò include le unità CD-ROM, unità USB pollice, e anche partizioni NFS montato da altri server! Although you cannot export single files or block devices, you can export the entire /dev directory (not that you would want to). Anche se non è possibile esportare singoli file o dispositivi a blocchi, è possibile esportare l'intera directory / dev (che non si voglia). NFS offers no security, encryption, or authentication. NFS non offre alcuna sicurezza, la crittografia o l'autenticazione. Furthermore, established NFS connections can be easily hijacked. Inoltre, le connessioni stabilite NFS può essere facilmente dirottato. NFS is fine for most internal, corporate networks and for use within your home, but don't use it to share files across the Internet. NFS è bene per la maggior parte interna, reti aziendali e per l'uso all'interno della vostra casa, ma non ne fanno uso per la condivisione di file su Internet.
Source of Information : Hacking Ubuntu Serious Hacks Mods and Customizations Fonte delle informazioni: l'hacking Ubuntu grave hack Mods e personalizzazioni
Written by magakos. Scritto da magakos. Read more great feeds at is source Per saperne di più grande al feed è fonte WEBSITE SITO WEB
no comments nessun commento . .
Read more articles on Per saperne di più articoli su Ubuntu Linux Ubuntu Linux and e otherSoftware otherSoftware . .
- [+] Digg [+] Digg : Feature this article : Feature questo articolo
- [+] Del.icio.us [+] Del.icio.us : Bookmark this article : Aggiungi ai preferiti questo articolo
- [+] Furl [+] Furl : Bookmark this article : Aggiungi ai preferiti questo articolo















