The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации

Next Previous Contents

13. Setting up the Intranet

An Intranet cannot be complete without sharing the resources on the different platforms. You will need support for other filesystems, so that you can access the data available on them. This document provides instructions to connect Linux to the following popular filesystems.

These filesystems can be compiled into the Linux kernel or added as modules, depending on the version of Linux. If you are not familiar with compiling the kernel you can refer to the Kernel HOWTO http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html and the Module HOWTO http://sunsite.unc.edu/mdw/HOWTO/Module-HOWTO.html for compiling the kernel with modules.

13.1 NCPFS

To share the files on the Netware server you will need support for NCP (ncpfs). NCPFS works with kernel version 1.2.x and 1.3.71 upwards. It does not work with any earlier 1.3.x kernel. It cannot access the NDS database in Netware 4.x, but can make use of the bindery. If you are using Netware 4.x you can enable bindery support for specific containers using the command Set Bindery Context at the console as:


  set Bindery Context = CORP.MYDOM;WEBUSER.MYDOM
In the above example two containers have bindery support enabled.

You will need to download the NCP filesystem utilities using the URL ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/ncpfs.tgz (currently ncpfs-2.0.10) from Sunsite.

Installation

To install the ncpfs utilities, type

   zcat ncpfs.tgz | tar xvf -
to expand the files into its own directory. In this case you will get a directory ncpfs-2.0.10 Change your directory to this ncpfs directory before proceeding with the installation. Read the README and edit the Makefile if necessary.

The installation of ncpfs depends on the kernel version you are using. For kernel 1.2, you should simply type 'make'. Subsequently typing 'make install' will install the executables and man pages.

If you use Kernel 1.3.71 or later, you might have to recompile your kernel. With these kernels, the kernel part of ncpfs is already included in the main source tree. To check if the kernel needs to be recompiled type

   cat /proc/filesystems
It should show you a line saying that the kernel knows ncpfs.

If ncpfs is not there, you can either recompile the kernel or add ncpfs as a module. For recompiling the kernel you should type 'make config' and when it asks you for

The IPX protocol (CONFIG_IPX) [N/y/?]

simply answer 'y'. Probably you do not need the full internal net that you are asked for next. Once the kernel is successfully installed, reboot, check /proc/filesystems and if everything is OK proceed with the installation of the ncpfs utilities. Change directory to the location holding your downloaded ncpfs files, and type 'make'. After the compilation is finished type 'make install' to install the various utilities and man pages.

Mounting NCPFS

To check the installation type

   ipx_configure --auto_interface=on --auto_primary=on

....wait for 10 seconds and type

   slist
You should be able to see a list of your Netware servers. Now we are ready to share files from the Netware server.

Suppose we need to access HTML files from directory \home\htmldocs on volume VOL1: on the server MYDOM_NW, I recommend that you create a new user (say) 'EXPORT' with password 'EXP123' on this server to whom you grant appropriate access rights to this directory using SYSCON or NWADMIN.

On the Linux machine create a new directory /mnt/MYDOM_NW. Now type the command

   ncpmount -S MYDOM_NW -U EXPORT -P EXP123 /mnt/MYDOM_NW
to mount the netware file system. Typing the command
   ls /mnt/MYDOM_NW/vol1/home/htmldocs
will show you a list of all the files in MYDOM_NW/VOL1:\HOME\HTMLDOCS (using Netware file notation). If you have any problems please read the IPX HOWTO at http://sunsite.unc.edu/mdw/HOWTO/IPX-HOWTO.html for more insights into the IPX system.

13.2 SMBFS

To share the files on the Windows server you will need support for SMB (smbfs).

You will need to download the SMB filesystem utilities from ftp://sunsite.unc.edu/pub/Linux/system/filesystems/smbfs/smbfs.tgz (currently smbfs-2.0.1) from Sunsite.

Installation

To install the smbfs utilities, type

   zcat smbfs.tgz | tar xvf -
to expand the files into its own directory. In this case you will get a directory smbfs-2.0.1 Change your directory to this smbfs directory before proceeding with the installation. Read the README and edit the Makefile if necessary.

The installation of smbfs depends on the kernel version you are using. For kernel 1.2, you should simply type 'make'. Subsequently typing 'make install' will install the executables and man pages.

If you use Kernel 2.0 or later, you might have to recompile your kernel. With these kernels, the kernel part of smbfs is already included in the main source tree. To check if the kernel needs to be recompiled type

   cat /proc/filesystems
It should show you a line saying that the kernel knows smbfs.

If smbfs is not there, you can either recompile the kernel or add smbfs as a module. For recompiling the kernel you should type 'make config' and when it asks you for adding SMB filesystem support simply answer yes. Once the kernel is successfully installed, reboot, check /proc/filesystems and if everything is OK proceed with the installation of the smbfs utilities. Change directory to the location holding your downloaded smbfs files, and type 'make'. After the compilation is finished type 'make install' to install the various utilities and man pages.

Mounting SMBFS

In our example let us assume that the WinNT server is called 'MYDOM_NT' and is sharing its directory C:\PUB\HTMLDOCS with a share name of 'HTMLDOCS' without a password. On the Linux machine create a new directory /mnt/MYDOM_NT. Now type the command

   smbmount //MYDOM_NT/HTMLDOCS /mnt/MYDOM_NT -n

to mount the SMB (windows share) file system. If this does not work try

   smbmount //MYDOM_NT/COMMON /mnt/MYDOM_NT -n -I 172.16.0.3

Typing the command

   ls /mnt/MYDOM_NT
will show you a list of all the files in bsol;bsol;MYDOM_NT\PUB\HTMLDOCS (using Windows file notation).

13.3 NFS

First you will need a kernel with the NFS file system either compiled in or available as a module.

Suppose you have a Unix host running NFS with the name MYDOM_UNIX and an IP address of 172.16.0.4. You can check the directories that are being exported (shared) by this host by typing the command


   showmount -e 172.16.0.4
Once we know the exported directories you can mount them by entering a appropriate mount command. I recommend that you create a subdirectory under '/mnt' (say) 'MYDOM_UNIX' and use that as your mount point.

   mount -o rsize=1024,wsize=1024 172.16.0.4:/pub/htmldocs /mnt/MYDOM_UNIX
The rsize and wsize may have to be changed depending on your environment.

If you have any problems please read the NFS HOWTO at http://sunsite.unc.edu/mdw/HOWTO/NFS-HOWTO.html for more insights into the NFS system.


Next Previous Contents


Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру