|[Home] [Credit Search] [Category Browser] [Staff Roll Call]||The LINUX.COM Article Archive|
|Originally Published: Monday, 4 June 2001||Author: Marcelo Pham|
|Published to: develop_articles/Development Articles||Page: 1/1 - [Std View]|
Introduction to Cross Platform Integration in the Enterprise (Part 1 of 2)
Marcelo Pham returns to Linux.com for an in-depth look at platform integration and networking with Linux. In part one of this two part series Marcelo takes use through installing Samba and other enterprise networking technologies.
As you may have already noticed, computer networks are becoming a mixture of Network Operating Systems (NOS) and Applications, especially in enterprise environments. The Internet, cheaper links and cheaper hardware have allowed LAN's and WAN's to expand in an exponential way. This revolution started about ten years ago: NOS's and programming languages were improving so fast that it was almost impossible to keep up with the infrastructure and technology and at the same time grow the business.
Big companies cannot afford the continual migration of all their data from one platform to another. A good example is the banking industry: most entities have their huge databases with customer information and transaction history stored in IBM 3x mainframes with COBOL. To migrate that information to a new platform with a new, fast error-free front end, ensuring data integrity and consistency within a couple of months with a limited budget is an impossible mission. And that is without considering the hardware upgrades that would be involved. What did they decide? To develop independent applications on newer platforms using newer technologies, integrating them with the old system and dividing the migration plan into several stages (we're talking about years). Some large corporations plan their data migration from three to ten years in advance. Another factor that contributed to the network platform mix was the fast-growing economy: this phenomenon produced a series of acquisitions and merges between corporations of all kinds that forced them to interface their computer systems while trying to reach almost impossible deadlines.
For these and other reasons Linux and Open Source technologies will play a key role in the enterprise within the next few years. Everybody was skeptical about free software a couple of years ago, but now big players like IBM and Sun are putting their feet firmly on the Open Source ground. Linux is free, developed and supported by thousands of talented programmers (so it keeps improving every day). Integrating Linux with other technologies will always be easier, cheaper and quicker.
Ok, now that we know a little bit more of why and how this phenomenon was born and will keep growing, let's see how we -developers and network and database administrators- can face some of the issues when playing in a mixed ground.
2. Networking Linux
2.a. It's all about protocols
TCP/IP is definitely the standard universal protocol for network communications. LAN's and WAN's adopted it because it has been proved fast, reliable and also because the Internet uses it. You shouldn't have any problem communicating a Linux box with any other computer with a different system, since almost every operating system comes with TCP/IP support.
So, we are fine with communications, what about file transfer? FTP is the standard protocol for file transfers, widely utilized on the Internet, in WAN's and LAN's. But sometimes we need more than transferring files from one computer to another. Sometimes we need to allow remote computers to read data stored in our server drive (or share the hard drive). Sharing is exposing a resource on a computer so connected clients can take advantage of it. You can share hard drives or devices such as printers or scanners. File and printer sharing are by far the most popular shareable resources.
Let's talk about file sharing. How is the information stored in a hard drive? That's an excellent question. Each operating system comes with its own method of storing data in a hard drive, or File System. For example, Unix uses HTFS, Linux adopted NFS (originally created by Sun), Microsoft Windows is currently using its own proprietary file system called NTFS, Apple has its V2, and so forth and so on.
Here is where the file sharing protocol comes in: it allows computers with different file systems to share information stored in their hard drives. There are several file sharing protocols: Linux shares data through NFS, Microsoft Windows does the same using the famous SMB (Server Message Block, a protocol originally developed by IBM), and Apple utilizes AppleTalk. How do we allow our Linux box to share data with other computers? Samba is the answer for SMB-based systems. Netatalk, on the other side, allows Linux to 'talk' and 'listen' to AppleTalk-based computers.
Other systems used in business environments are AS/400 and OS/2. If you want to find out more about these platforms and how they can interact with Linux, please refer to the IBM website.
2.b. How to install and configure Samba
Samba is a GPL implementation that allows Unix-based computers (including Linux) to 'translate' or 'understand' the SMB protocol in a network, so they can see SMB-based shared drives as well as emulate a shared directory or drive so other SMB based computers can read it.
Samba was originally developed by Pal Engstad and then enhanced and improved with the help of the Open Source community. Samba is currently part of the Linux Kernel and it comes with most Linux distributions, but you can also download it at the official Samba website. You can share printers with Samba as well.
If Samba is not yet installed in your Linux box, here they go some tips:
After downloading the zipped file (as of today the latest version is 2.0.7, and the compressed file is usually called samba-latest.tar.gz), move the file to the /usr/src directory and type:
# gunzip samba-latest.tar.gz
untar the distribution files by typing:
# tar xvf samba-latest.tar
At this point you can move all the source files to a convenient location, for example /usr/local/samba/source. Now you have to build the binaries. First, run the configure utility under the source directory to prepare Samba to be compiled, by typing:
If you want to tell Samba to be installed with customized options type
# ./configure --help
to see all the parameters that it accepts (notice that you must do all these tasks as root). After preparing the configuration, as usual, compile the source by typing:
and install the binaries and the man pages by executing:
# make install
If you are installing Samba 2.0.7 on top of a previous version, you can revert the new installation with the command make revert.
If you are a RedHat user, you can install Samba from the rpm package. Mount your RedHat distribution CD, and type
# rpm -ivh samba*
This command will install the Samba binaries in your RedHat system. If Samba has already been installed, you will get an error message.
Now you have to configure Samba. You should manually create the configuration file called smb.conf under /etc directory, but Samba comes with a sample file that you can use as a template, it's called smb.conf.sample and is located under the examples directory under the source distribution. Simply copy this file to /etc and rename it to smb.conf.
To configure Samba, you have two options: one is manually editing the file smb.conf, and the other is using the Web-based tool SWAT (Samba Web Administration Tool) to set all the parameters with friendly screens. Both ways work well, if you're an old Linux user the probably editing smb.conf with vi or emacs will be the quickest way, but if you're relatively new to Linux, SWAT will be the best move.
If you decide to manually edit smb.conf, here are the basic sections you should configure:
[global] workgroup = WORKGROUP
The Windows workgroup or NT domain name.
hosts allow = 192.168.1. 192.168.2. 127
For security purposes, you can restrict access to certain networks.
[DiskToShare] comment = Taz data path = /home/taz valid users = taz neo public = no writable = yes printable = no create mask = 0777
You should declare all the directories you want to share using this syntax
If you use SWAT instead, here are some hints:
-First, add SWAT as a service. Edit your /etc/services file and add the following line
Add this line to your /etc/inetd.conf file
swat stream tcp nowait.400 root /usr/local/samba/bin/swat swat
Change the path to point to your local Samba directory. Some Linux distributions -the newer ones- already have these lines added, simply verify that they match your installation.
-Second, from your preferred browser, type http://localhost:901/ and you will see the SWAT welcome page. The pages are self-explanatory, so you should not have any problem.
The last step is to start the daemons. Samba runs two daemons: smbd and nmbd, which are located under the Samba bin directory.
You can run the processes as daemons, by typing from a root session:
# ./smbd -D
# ./nmbd -D
(You won't see any messages, just verify that they're running by doing a ps -ef | grep smbd and ps -ef | grep nmbd). You can also start them automatically by including both scripts in your /etc/rc.local file. Or, you may want to run them as services from inetd (or xinetd if you're running Kernel 2.4) as well. )
For more information about configuration and troubleshooting, please go to the Samba official website and look for the Documentation section, browse the Samba man pages, or, as usual, visit our How-To documents.
2.c. How to install and configure Netatalk
To install Netatalk, first download the compressed file. Then, you can follow instructions from this quick guide. Apple is not that common in the enterprise field, but some companies may still use it for graphic design and animation, so you can make them interact with Linux as well.
2.d. Other connectivity projects
There are other packages that allow Linux to see and to be seen by different platforms:
2.e. Linux roles in an enterprise network
We described Linux as a file server as an example. A Linux box can play any of these roles in a mixed network, using free or very cheap proprietary software:
Print server: You can add Linux boxes and make them work as printer servers. To find out more, please browse our How-To pages. With Samba, Linux can also use Windows printers and allow connected local printers usage to Windows clients as well.
Firewall: A not-so-powerful PC that you have archived in your locker can be a great network guardian if you install Linux and some firewall software. Find out more about firewalls in our How-To pages or download a free copy of Merilus Gateway Guardian for personal use. You can also take a look at PMFirewall.
Mail Server: Why pay for mail software if Linux includes modules that can make it act as a perfect mail server? Stable, robust and fast, you can use qmail or sendmail, and users can retrieve email no matter what email client program or operating system they use. Again, read our How-To useful texts.
Backup Server: When not so many files have to be backed up a cheap and quick solution is to use the crontab scheduler combined with the tar command (I have a customer with Unix and 100 users, 1 Gb in enterprise software + 5 Gb of enterprise data -still growing-, and I have used tar/crontab -with a DAT tape- for over 2 years, with no problems at all so far, even when the Kernel panicked a couple of times). If you're not familiar with the crontab file syntax, you may download a version of Gcrontab.
Web Server: Apache is a free implementation of a web server. Apache is being used in about 70% of the web hosting companies all over the world, so you should have no doubt about its stability and reliability. Apache comes with every single Linux distribution and can be easily configured through your favorite Linux administration tool (linuxconf for RedHat, yast2 for SuSe, etc.). But if you want to become a Apache master, once again, go to our How-To pages, or simply download Mohawk, a powerful Apache configuration tool.
Application Server: Depending on the programming tool you choose, your Linux box can be utilized as an Application Server with free software. Perl, PHP, Python with a stable database engine can satisfy any kind of hosted application. If you work for a big company, you might want to look for business critical solutions, like Oracle Application Server.
Database Server: There are a couple of reliable GPL databases out there to install on your Linux server and convert it in a database server. MySQL and PostgreSQL are so far the best free choices for database solutions in Linux environments, while Oracle is the best alternative -if you have the budget to afford it. * Attention! If you have a Linux box connected to a WAN, to the Internet or to any link to the 'external world' (SNA, X25, Frame Relay, whatever!), make sure you disable the NFS services from inetd. If you have NFS enabled when the operating system starts, hackers can exploit that service and get into your server with root access or make DoS attacks, you should be careful when enabling this service.
2.f. Some thoughts
As we've seen, a Linux box can play any role in the enterprise field, interacting with other computers with different 'philosophies’. Linux is free, solid, reliable, stable, improving every day, and, did I mention it's free? It is your job to convince management that Linux and Open Source are excellent, cheap, stable and scalable solutions for the business area, offer unlimited free support from all the community, and is fast becoming a trend. Now, we all know that Microsoft still dominates the workstation, so, wherever you go, you'll find that at least 50% or more of the computers have Microsoft software installed on them, that's why I put some emphasis to the Windows/Unix/Linux integration. Therefore, we have to learn how to work in a mixed environment at least for the next five years.
NOS: Network Operating System COBOL: Common Business Oriented Language, one of the first structured languages utilized for enterprise applications IBM 3x: IBM Series 3 mainframes (IBM 34, IBM 36) LAN: Local Area Network WAN: Wide Area Network TCP/IP: Transmission Control Protocol / Internet Protocol FTP: File Transfer Protocol NFS: Network File System SWAT: Samba Web Administration Tool SCO: Santa Cruz Operation, a company that releases one of the many Unix flavors AFPS: Advanced File and Print Server, a SCO product for Unixware and OpenServer that has same functionality as Samba SNA: System Network Architecture, a fault-tolerance network technology developed by IBM back in the 70's GPL: General Public License. Please visit http://www.gnu.org
The next -and last- installment will cover the cross platform integration between applications and the tools that we can use to make it happen.