informatica:linux:nfs
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| informatica:linux:nfs [2013/05/30 21:35] – javi | informatica:linux:nfs [2015/04/13 20:19] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| sudo aptitude install nfs-common nfs-kernel-server | sudo aptitude install nfs-common nfs-kernel-server | ||
| + | |||
| ==== Configuracion servidor ==== | ==== Configuracion servidor ==== | ||
| Line 15: | Line 16: | ||
| sudo vim / | sudo vim / | ||
| - | Se añade la linea: | + | Se añade la linea con la carpeta a comartir, en este caso /home/datos: |
| # | # | ||
| Line 171: | Line 172: | ||
| 100005 | 100005 | ||
| </ | </ | ||
| + | |||
| Line 182: | Line 184: | ||
| VM=" | VM=" | ||
| KVM_VM_IP=" | KVM_VM_IP=" | ||
| + | KVM_LAN_IP=" | ||
| NFS_PORTS=" | NFS_PORTS=" | ||
| Line 198: | Line 201: | ||
| fi | fi | ||
| done | done | ||
| + | # NFSD | ||
| + | $IPTABLES -A INPUT -i $VIRT_IF -s $VM -d $KVM_LAN_IP -p tcp --dport 2049 -j ACCEPT | ||
| </ | </ | ||
| Line 206: | Line 211: | ||
| ==== Instalacion ==== | ==== Instalacion ==== | ||
| - | En el servidor se instalan los paquetes: | + | **IMPORTANTE** NFSv4 exporta de forma distinta que NFSv3. |
| - | sudo aptitude install | + | ^ Directorio donde se alojan los archivos ^ Punto de montaje en el servidor ^ |
| + | | /srv/www | /srv/nfs/ | ||
| + | | /srv/svn | /srv/nfs/ | ||
| - | NOTA: en principio winbind **NO** hace falta | + | 1. Servidor: |
| + | sudo aptitude install nfs-common nfs-kernel-server | ||
| + | 2. Cliente: | ||
| - | ==== Configuracion servidor ==== | + | sudo aptitude install nfs-common |
| + | |||
| + | NOTA: en principio rpcbind **NO** hace falta | ||
| + | |||
| + | ==== Configuracion | ||
| 1. Configurar los siguientes archivos: | 1. Configurar los siguientes archivos: | ||
| Line 258: | Line 271: | ||
| **IMPORTANTE**: | **IMPORTANTE**: | ||
| + | |||
| + | ==== Configuracion servidor ==== | ||
| + | |||
| + | 0. Realizar los pasos anteriores | ||
| + | |||
| + | 1. Configurar los siguientes archivos: | ||
| **/ | **/ | ||
| - | /srv | + | /srv |
| 2. Se reinicia el servicio: | 2. Se reinicia el servicio: | ||
| sudo exportfs -rav | sudo exportfs -rav | ||
| + | |||
| ==== Configuracion cliente ==== | ==== Configuracion cliente ==== | ||
| - | 1. Instalar estos paquetes: | + | 1. Ver los recursos que ofrece el servidor: |
| - | + | ||
| - | sudo aptitude install nfs-common portmap | + | |
| - | + | ||
| - | 2. Ver los recursos que ofrece el servidor: | + | |
| sudo showmount -e nfs_server.example.com | sudo showmount -e nfs_server.example.com | ||
| - | |||
| - | Export list for nfs_server.example.com: | ||
| - | /srv 10.2.3.0/ | ||
| 2. Montar el recurso: | 2. Montar el recurso: | ||
| - | sudo mount -v -t nfs4 nfs_server.example.com:/ | + | sudo mount -v -t nfs4 nfs_server.example.com:/ |
| - | + | ||
| - | This will mount nfs_server.example.com:/ | + | |
| 3. Comprobar permisos: | 3. Comprobar permisos: | ||
| - | ls -la /mnt/mount_point_of_nfs | + | ls -la /mnt/nfs |
| **NO** deberia pertenecer a nobody: | **NO** deberia pertenecer a nobody: | ||
| Line 299: | Line 310: | ||
| Y anyadir la siguiente entrada: | Y anyadir la siguiente entrada: | ||
| - | | + | |
| 5. Ahora lo puede montar cualquier usuario: | 5. Ahora lo puede montar cualquier usuario: | ||
| - | mount /mnt/mount_point_of_nfs | + | mount /mnt/nfs |
informatica/linux/nfs.1369949708.txt.gz · Last modified: (external edit)
