Ravi Narain

A PROJECT REPORT

Reg No:-800119695

ON RHEL 5
Submitted to HCLCDC Patna.

RED HAT NETWORD SERVICES AND SECURITY ADMINISTRATION

Submitted by

Mr. Ravi Narain COMBO BATCH(Pat Com 002) Reg No:-800119695

Under the guidance Mr. Prashant kumar chaudhary. HCLCDC PATNA.

8th Commercial Building North S.K.Puri Near Children Park Boring Road Patna.

1

Ravi Narain
ACKNOWLEDGEMENTS

Reg No:-800119695

Before I get into think of the things would like to add heartfelt words for the people who where part of this PROJECTREPORT in numerous ways

People who gave unending support.

We are highly indebted to Mr. Amit Kumar Center Manager of HCLCDC Patna, for his encouragement and for providing all the necessary facilities.

It is with great pleasure that we acknowledge the consolation and assistance of Mr. Prashant kumar chaudhary project guide. To him owe more than we can mention ..mostly for teaching us to see the silver lining in every dark cloud.

And finally my heartfelt appreciation to my colleagues. no word are sufficient to express my gratitude to my friend and seniors for their kind cooperation.

Mr. Ravi Narain

2

Ravi Narain CERTIFICATE Reg No:-800119695 This is to certified that the project report on RHEL 5 submitted by Mr. HCLCDC Patna Place: Patna Date: 22/11/2008 Center Manager Guide 3 . Ravi Narain as a partial fulfillment for requirement of HCLCDC Patna for the academic session 2007 is the original work carried out by him under the supervision and guidance of Mr. Prashant kumar chaudhary trainer of HCLCDC PATNA.

Not all of the network driver are supported by Linux. so search the Web and get the drivers in Rpm s /binaries and make them work. 05. Project Add Physical memory to the system and modify the swap partition to make it active.Ravi Narain Reg No:-800119695 CONTENTS Case Studies 01. 06. What is Linux 02. File System Supported by Linux including file systems native to other OS. 4 . Compare the user/ group management in Linux & Windows. 03. Configure Mail Server Sendmail. Different flavors of Linux & Architecture different from Windows. 04.

" Case Studies . It's safer because it is not vulnerable to viruses and spyware. In addition.. PDAs and routers). voluntary technical helpers and users. cell phones. open source alternative to Windows or the Macintosh OS. told LinuxInsider. text-based options lists. 5 . Whether the operating system was Unix or DOS.Ravi Narain Reg No:-800119695 LINUX Linux has long been a contender in the corporate world to Windows .upgrading from one Windows version to another was fairly seamless. co-host of "The Linux Link Tech Show". Each one is controlled by a unique community of code writers. which was first made popular by Apple (Nasdaq: AAPL) and then cloned by Microsoft. "The last area for it to conquer is on the desktop. In the days before the graphical user interface (GUI). Davila sees Linux as a suitable replacement for Windows." All things considered.01 Different Flavors Linux is not just a single operating system. "Linux is ready for the desktop for the majority of desktop home and business users. Unlike Windows. Computer users typed commands at a prompt to run programs. consumer interest is on the rise for this free. Its open-source nature continues to contribute to different development paths. the computing world was ruled by the command-line structure. the Linux OS has many faces and is the product of much family cross-breeding. Today. graphics and audio capabilities were limited." Patrick Davila. Linux developed along similar lines as Windows in terms of GUI and performance capabilities with one major distinction -. "Linux dominates the server market and is making big inroads into the embedded market (TiVo. Pointing devices did not exist and menus were rudimentary. no one company has guided the development of Linux. Not so with Linux. It exists in several dozen versions called distributions. is more stable and is cheaper than running Windows.

y Knoppix Linux is a free distribution based on Debian GNU/Linux. Gimp. Konqueror. Depending on the Linux version. y Mandriva Linux used to be called Mandrake Linux and is famous for its ease of use for both servers and home office uses. Apache.300 high-quality applications including a complete office suite. Commercial support is available. Abiword. The real task is finding a distribution that suits a potential user's needs. Even with the desktop shell. configuring the policies for program access can often be confusing and uninviting.Ravi Narain Reg No:-800119695 The look and feel of the Linux desktop is controlled by the type of shell built around the Linux core. This free distribution comes with several pre-configured levels of security. Firefox. some (or a lot of) manual intervention may be needed for software additions not found in the pre-installed software library. Debian runs on almost all PCs. The same can be said of the process of installing third-party software. The following list includes distributions that are ideal for novices and others that are for more advanced users who have access to IT support: y Debian GNU/Linux is a free operating system with more than 15. but not all of them are easy to use. Some Linux distributions are developed on user-friendly standards. lends itself well to users with specific requirements. Live CDs that can run the newest Linux versions and hard drive partitions running dual-boot software let consumers use their hardware for multiple purposes. an instructor at Kaplan University's School of Information Systems and Technology. 6 . by nature of the different users that support each of the distributions. "Linux. The two most predominant shell architectures are known as Gnome and KDE .org. Knoppix comes with recent Linux software and desktop environments that include OpenOffice. Linuxcapable software is distributed in packages. PHP." said Nate Melby. including many older models. The Mandriva Linux PowerPack contains more than 2. mostly by download.490 pre-compiled installation packages. MySQL and hundreds of other open-source programs. They both have similarities to Windows. he suggested.

and fast downloads of other software packages. And so on.NT/2k/XP/Vista . The differences between them are so fundamental that drawing a comparison between them is nearly impossible. Linux is not a free version of Windows. emerge and rpm show up).but mainly XP Professional. A lot of grumbles pertaining to wrongly set-up default user and root accounts could be found there. These inconveniences are grievous ones in my opinion. Professional technical support is available. as is frequently discussed. which includes Live CD. Many a time I ve read anti-Microsoft rants. (And a forced necessity sometimes ) When I say Windows. The purchase price varies with the version and the number of installations. Anti-Virus. which create some problems and erratic application upgrades (just at the point the comparisons to Linux programs like aptget. more.more 7 . It is not a good choice for home users and Linux newcomers. in the graphical user interface the user sees. This part of my article concerns the architectures of Windows systems. to put it mildly. professional-class OS that is popular both for enterprise and home computing use. but to know them is more than a necessity. There are so many moot points that they could make up a very long list. The systems themselves are baffling ones. I mean the whole family of operating systems .Ravi Narain y Reg No:-800119695 Red Hat (NYSE: RHT) Enterprise Linux is the leading commercial platform for opensource computing and is sold by subscription. But the fact remains that something can be done with them . regular releases. but also functionally. or installation processes. and a rootkit checker (anti-spyware).99) and Home Edition Premium ($79. y Xandros Desktop Home Edition (US$39. which is constantly emphasized by the Free software community. y SuSE Linux is a leading. and legally to boot. The two systems differ not only visually. they should be branded as top-level ones. Xandros Networks Updates.000 leading opensource applications and is available in enterprise and desktop versions.99)are built on the Debian Linux platform and include the Xandros Security Suite with the Xandros Firewall. SuSE Linux Professional includes more than 1. y Ubuntu is a free Linux distribution for desktop or server use. where the authors complained about lack of command line functionality (poor in Windows and very advanced in Linux). applications installed by default.

and that s a simple solution. It is common knowledge that every problem in the IT world can be resolved in many ways. As I have written above. any Windows system I m talking about here allows to create a user account after all. even drastic ones. so if we want to check the space it takes we will have to add the ADMINISTRATOR user to the list of permissible users. A trivial example: nearly all common Windows users do not know how to get into SVI directory (so they don t need the advanced users at all). That s for sure. No problem. If we look at the process list in Task Manager we ll see that most of them belong to SYSTEM user. Regardless whether someone will do it or not. But this very text concerns architectural solutions which cannot be changed one iota. to put it mildly. I must emphasize one thing it can be done. (Other users can be added too. and that the SYSTEM user is indispensable for the Windows system s functionality.) I will try to explain in the next chapters why I think that Though this be madness. It is also the owner of the technical files like the System Volume Information (SVI) directory and its files. But the Kiss. operating systems make use of a user notion. Namely. For example. Our electronic friend. yet there is method in it . or another admin . the Microsoft s flagship product has at least two distinct administrators. The standard SYSTEM account is like an agent from the Wachowski brothers Matrix trilogy. It can be a Unix s root . but I do not recommend this option. Are all of them equally simple? Decidedly no. the SYSTEM user. Provided that we do not talk about Microsoft Windows systems. the other is named SYSTEM user. As we all know. a short afterthought on its existence taken as a whole. I want the article to be understood by everyone who has a basic knowledge of operating systems. 8 . all operating systems have only one administrator in principle. With the exception of a group of system functions which are restricted for a unique user called the system administrator . I admit to a certain simplifications in comments. But now. This fact is common knowledge.Ravi Narain Reg No:-800119695 or less. I can t contradict as well the sentence that Windows default configuration is politically incorrect . One of them is called ADMINISTRATOR user. a NetWare s supervisor . Linux as well makes it possible to unlock root account to work with. with premeditation. The distinctive feature of this peculiarity is the fact that the user is a real Master of his system as Zeus was for the ancient Greeks. that the existence of another administrator would automatically create certain complications. mainly due to project s derailed design philosophy. so I ask those who know the subject well to remember this and do not show the signs of the ROTFL syndrome This is a collection of random thoughts rather than a scientific article about Windows architecture so keep this in mind when reading and commenting. Keep It Simple. Stupid . as some of you know (and some of you don t). is the only default owner of the file. rule has proved to work in real life. otherwise the matter would become more complex. We can log in to the user account and then run amok within the computer space the account is defined by.

First of all. Once more. For sure. which runs incessantly in the computer from the beginning (when the operating system has been started. not the computer!) until the computer is turned off (or restarted). Unrecoverable error! The system loading is still going on! We type in a password and we see how the graphical environment emerges.Windows or Linux . as it isn t Artificially Intelligent. Even the operating system s bible . Let s start with Windows first. What is important. most of the users do not know about its existence. It is a solid proof for a thesis that one should deal with a democracy with utmost care. I suggest to run a test. The graphical environment and the system. Let s vote. it is considered that the operating system is a program. Generally. Galvin Operating System Concepts ) names two definitions. Boredom filling our limbs The system crunches and minces some data. (Failover information is stored there).) or we see a system s loading process. or see to the notion of the system s kernel. the SYSTEM user will not make a hue and cry. Beg your pardon. we observe POST messages or a BIOS manufacturer s logo.Ravi Narain Reg No:-800119695 If I wanted to write a dirty trick which gathers a Windows user s passwords.starts faster. Most IT users would vote for the Windows systems. Silberschatz. Making an analysis of a Windows architecture. If a precise definition cannot be delivered. projects and everyday agenda.after several dozens of seconds after user actually logs in! To examine the reasons that the system booting process was solved in a particular way. Boring moments pass. but we are still lazily yawning One more time and the login window appears.Silberschatz s book (A. Secondly. It simply creates an environment in which other programs might facilitate the useful functions. etc. What s more. However. I d put the data just there. but there is always a small but . even the operating systems specialist cannot agree how to define operating systems. And similar to the government it doesn t make use of any useful functions. In other words. which system . Windows system finishes loading depending on configuration . a computer virus is more efficient if it is able to infect executable files with the highest permissions. one could place an equality sign between the word kernel and the technical 9 . it might appear that the implementation of the agent was vital to the system Really? I ll answer in a while. The ideal place. and at last we face a boot manager (GRUB. Most of the users would stop the stopwatch now. Here we turn on the stopwatch. Nearly all features are the same. we must start from the ground up. In this view the operating system s definition is tantamount to a kernel definition. the directory evinces a magic feature of changing size in flushes by up to several hundreds of MB both up and down. We switch on the computer. the SYSTEM user is the best for these types of tasks. but only a few know what it really is. It provides means to proper usage of computer resources. the SVI directory is not visited at all. it is advisable to create a list of features which will describe the idea. It s funny but everyone uses Operating Systems names. LILO. Let s measure the starting times of the two systems with the help of a stopwatch. An operating system resembles a government. P. All other programs are called applications .

a network card). or the program should be focused on only one thing . and only then. No one knows if management refers to blocking access to system resources or to allowing them to be accessible (e.g. However.first we have X Window System.operating system. such a layered structure is also used but it s called abstraction layers. It does matter that every layer sends messages only to its direct neighbors. Microkernels. I say system when I want to describe all the programs as a whole.Ravi Narain Reg No:-800119695 concept of an operating system. Generally. although the name denotes the kernel only. When a jelly dribbles down onto a table it is high time to lay off the cook. for example the Mach microkernel. or every operating system.g. let it be a coffee-flavored one. are foundations to Mac OS X operating systems (attached to Apple computers) and GNU/Hurd operating system which is still in its infancy (which is the case for almost two decades). And so as we have the first biscuit level (layer) in a cake which lies on a hardware (on a table). the problem boils down to one question: whether the kernel should be a program containing complete solutions. In practice. then on top of it a graphical environment (e. That s why the Linux name is often used to define the whole system. leaving all the works to do to external (to kernel) applications? With the first example we get a really big program called a monolithic kernel. their specifications must be known.administration. a Firefox web browser. Monolithic kernels are used by Linux systems (sometimes called Linux distros). The second example defines a small and fast microkernel. kWin). As we know the bottom part consists of a layer of biscuit. or it has to deliver a handler (even if a partial one). as to master the resources. And another important matter. together with the kernel. is build like a cake (or gâteau). Now. then it s covered with sweet fudge. then another biscuit disk. KDE). In other words. on top of all the layers . and once more a fudge layer covered with jelly. 10 . the difficulties appear. An operating system. then window manager (e. which looks like an underdeveloped version of fully fledged kernel. For example . the phrase operating system is used to denote all those programs which are provided by a manufacturer to satisfy the demand for such a working environment. As far as programming is concerned. however basic. so we have a kernel in operating systems which manage the hardware (all operations depend on the layer). Let s assume that when I write about kernel I will use a full name .g. Next levels are then build on top of the kernel. the solution is not a simple one. The kernel tasks are defined very loosely.

namely HAL module . After the monolithic kernel has been loaded.which shows the login screen. the init process is started.exe). may enter a password. all the necessary system processes are started during the system start. So when a user sees login window (or screen) the only thing left to do is to attend to the KDE or GNOME graphical environments. a Session Manager is put into motion (smss.Session Manager Subsystem) which starts identification and authentication programs .Ravi Narain Reg No:-800119695 Operating System Architecture Keeping in mind the layered model we will come back to Windows systems booting.it can be placed between monolithic and microkernels. it needs many helpers ). (Ubuntu team works at present to replace the init script with an upstartscript. which makes the system load system permission data (Group Policy) and then have up and running the tasks defined in Runonce and Run keys placed in Windows Registry (e. the first thing which is loaded is a kernel indeed (ntoskrnl. First of all we have to emphasize that the Windows system s kernel is similar to a microkernel. Anything beyond that is ready to use. At the end.exe . A user satisfied that his Windows is ready to use. Next comes its best friend . the kernel is called a hybrid kernel . which in turn invokes other processes (I suggest to issue a pstree command in a console while this happens). None the less. Linux systems present a different approach towards this problem. (To be more precise. After starting the computer. Practically. When the environment is ready.or using simple terms . But it doesn t affect our reasoning. Autostart (from Start Menu) applications are loaded.g.) 11 . HKLM\SOFTWARE\Microsoft\CurrentVersion\Runonce).Hardware Abstraction Layer which manages drivers needed for system loading.

the most frustrating is a man s inability to act and his lack of influence on any processes. and its applications placed on top. As psychology teaches. The Mach microkernel has additional safety modules which run in the kernel layer 12 . There s no wizardry in this world. Solaris or BSD systems. that is. We can simplify the matter if we are to write about the Linux. picture the kernel together with associated programs creating a so called kernel layer. But why? Let s go back to the previous point. an operating system resembles a cake. Safety tasks are run within the kernel layer. You ll find its kernel at the bottom. in the kernel alone. The system is divided into two . However. The foundation of operating systems. no one will be able to load an advanced spreadsheet application or a game. Microsoft uses the trick notoriously. Most of the users are aware they must wait a while yet. Operating System Why the opinion that Linux systems are safer than the Windows systems is so prevalent? Perhaps due to the fact that it is true. Taking into consideration the whole start sequence .upper and lower parts. so moving the login phase into the middle of starting sequence of events.the kernel layer creates an environment in which the user layer is ran. Mach (Mac OS X kernel). a short digression must be added to the end.must be left without an answer.Linux doesn t load slower than Windows systems. In other words . Such solution is a better one than previous ones in terms of marketing but it backlashes in lesser stability or the system s safety and leads sometimes to the frustration of inexperienced users. As I wrote. According to the cake. Basically. And even though the monitor has displayed the famous task bar and icons. all what is hidden behind the name is known for years. The rest of the running tasks make up a user layer. will give the user psychological comfort and it will be received better.Ravi Narain Reg No:-800119695 The question .which solution is better .

and contrary to the kernel itself. using a nice and simple program called smbmount. as a normal user. some of them placed on the two servers. But it suffices. one from the first server. like in the Mach example. The logic lying behind is screwed up. I have logged in to a Windows system as a common user. The protection subsystems are more complex and they run within the user layer. Marvelous! If I was working under Linux or OS X I d be able to mount the needed device and to make use of a file. one of the most popular computer protection systems. Let s assume something like this.Ravi Narain Reg No:-800119695 as auxiliary programs. not playing with details. You ll find among them local ones. The programs which can talk to the environment are started in the user layer. This is the direct result of conceptually complex design of the user layer. is not allowed. Protection in Unix systems is always on. At last. This SYSTEM is needed by the Windows systems to start programs in the user layer. it is true. It creates an environment. Disconnect all previous server connections and try to reconnect. My computer runs several programs. Let s check what disks have been attached to my system or speaking precisely what disks have been mapped to my system. and another one from the second server. is a firewall. Let s assume now that at one time I have decided to read the data from a file owned by a server administrator (and it has just happened to be me). it is a program. As it works in the user layer. it is simple in terms of design and due to that statistically tougher to crack. we mustn t wait to launch a firewall until John Smith is logged-in (after several hours in which his computer has been up and running). I have written earlier about the SYSTEM user . Lord! How I did yearn to work with any Unix system in such conditions! Any attempt to attach admin resources will end up with the message: Multiple links to server or to shared resources by the same user. For second. any program running in the user layer (protection is implemented as another program) is more vulnerable or prone to disarmament than protection implemented in the kernel layer. which I described earlier in this article. but life is not so rosy. I have found. So the SYSTEM user is used. making use of the user s name more than once. to place the protection subsystem in lower layer and have the problem off of a head. It can be commented only one way: another proof for superiority of simplicity over complexity. it must be designed in such a way that it shouldn t find itself not starting in the system s loading process. First of all. The same cannot be said about Windows systems. moreover. it doesn t have to work. so the protection which works on the same level should be efficient. A small digression. Oh. After all. All the applications make use of several dozen files at once. 13 . The program treats every connection as a unique one and pays no attention to such conditions where another copy of itself has just made a connection to the same device under the name of another user. among others. The operating system is deaf and blind. a few network disks from two servers. Read from a paper.

meaning accounts tied to physical users. Case Studies . or accounts which exist for specific applications to use.Ravi Narain Reg No:-800119695 It is not the author s intention to rekindle another flame war between Windows and Linux users. One is able to write a similar list of architectural items pertaining to Linux systems. as well as the access permissions on the file. The user and the group to which a file belongs. by the creator of the file. If one feels necessity to comment the article. Proper management of users and groups. And when I reckon Windows architecture inferior to Linux one. Groups are logical expressions of organization. and effective management of file permissions are among the most important tasks a system administrator undertakes. please write it is bad or not . It is also assigned separate read. Users within the same group can read. When a file is created. write. write. can be changed by the root user or. Writing operating system is a complex matter and too many times the chosen solution is so called a solution of lesser evil . and execute permissions for the owner. 14 . or point where it should be rewritten in a broader perspective . or execute files owned by the group. Users can be either people. refer to the chapter titled Managing Accounts and Group in the Red Hat Linux System Administration Primer. the group. and everyone else. it doesn t mean it is inferior. They differ. but it would have nothing to do with Photoshop running or not on every of the two systems. it is assigned a user and group owner.what doesn t mean it should show superiority of one of the systems over the other. Such a statement would be highly subjective.02 Users and Groups Management in Linux Control of users and groups is a core element of Red Hat Linux system administration. For a detailed look at strategies for managing users and groups. Each user and group have a unique numerical identification number called a userid (UID) and a groupid (GID) respectively. The author asks both sides interested in this topic to refrain from darting names onto each other. in most cases. tying users together for a common purpose.

Click on the Members tab. If you have the permission. These include the Moira list management web interface. There are a variety of tools available to add an existing user to an existing group. or WIN. Moira.03 File System It keep the data in organized. WIN users and groups are defined and maintained in the MIT system of record. the Add button will be sensitized. diverges from a typical Windows Domain.Ravi Narain User and Group Management in Windows Reg No:-800119695 The group is is one area where win. 4. 2. Select List Management from the left panel and right click on the selection. Case Studies . moira commands like blanche. Select Find Lists. 5. 3. Click on Name. On a WIN machine you may run moira or blanche from the command line or the run menu. enter the list name and hit Search. You may also start the Moira MMC snap-in from the menu item "Start-> Programs-> Administrative Tools-> Moira Account Management. and the WIN machine Moira MMC snap-in. Choose the type of object you wish to add and enter its name. Select the list name and hit Display. 6. so click on it. It allocates the space to the and directories and it assign attributes to the file directories.mit. Click OK. Right click on the list name and select Properties." Moira MMC Procedure To add a user to a group using the Moira MMC: 1. 7. 8. Linux used ext2 & ext3 It arrange all the file and directories in highrical way 15 .edu. 9.

It is the top of the file system structure . 16 .Ravi Narain Reg No:-800119695 / This is toplable directory in the highrical which is called root. All the directory are mounted under it.

Ravi Narain Reg No:-800119695 17 .

This directory. (on some distributions) Information for booting. the system administrator and the users. containing all underlying directories and files. this directory contains data similar to those in the Control Panel in Windows Home directories of the common users. Contains references to all the CPU peripheral hardware. e. includes files for all kinds of programs needed by the system and the users. When starting with a new system.Ravi Narain Reg No:-800119695 This is a layout from a RedHat system. Do not remove! Library files. shared by the system. Let's see what you could run into: Directory /bin /boot Content Common programs. Most important system configuration files are in /etc. Standard mount point for entire remote file systems Typically contains extra and third party software. The startup files and the kernel. For miscellaneous purposes. the structure may vary. The names are not even required. it is always a good idea to take a look in the root directory. /dev /etc /home /initrd /lib /lost+found /misc /mnt /net /opt 18 . Depending on the system admin. In some recent distributions also grub data. is also called the root directory or "the root" of the file system. and directories may be left out or added at will. a CD-ROM or a digital camera. Directories that are only one level below the root directory are often preceded by a slash. indicated by a forward slash (/). they are only a convention. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today. which are represented as files with special properties. vmlinuz. the operating system and the mission of the UNIX machine. The tree of the file system starts at the trunk or slash. Standard mount point for external file systems. Files that were saved during failures are here. to indicate their position and prevent confusion with other directories that could have the same name.g. Every partition has a lost+found in its upper directory.

net) This site hosts thousands of open source software projects. cleaned upon reboot.Ravi Narain Directory /proc Content Reg No:-800119695 A virtual file system containing information about system resources. Then you can search Fedora repositories for Fedora.freshmeat. *SourceForge (www. such as log files. source code you can build for your environment.net) This site hosts thousands of open source software that is package in the RPM Package Management(RPM) format across a variety of repositories. Programs for use by the system and the system administrator.net) this site maintains a massive index of Linux Software. The following list summarizes some other Web sites that you can browse to find detailed information about software that runs in Linux. or to keep an image of a CD before burning it. More information about the meaning of the files in proc is obtained by entering the command man proc in a terminal window. they will typically offer code in what is called a tarball. The tarball may include binary code or more often. Temporary space for use by the system. The administrative user's home directory. documentation etc. for all user-related programs. the print spooler area. *Rpmfind (www. If the project doesn t offer RPMs.sourceforge. 19 . You can do keyword searches for software projects or browse for software by category. /root /sbin /tmp /usr /var Case Studies . You can download software and documentation from those projects through the SourceForge site.txt discusses the virtual file system in detail. libraries. so don't use this for saving any work! Programs.rpmfingd.04 Software project site Often individual software project will offer their own set of RPM packages for their own project.or RHEL-specific versions of those packages *Freshment(www. space for temporary storage of files downloaded from the Internet. This is particularly useful for project under continuous development. The file proc. Storage for all variable files and temporary files created by users. the home directory of the root user. the mail queue. Most fedora repositories are light on descriptions of the packages they offer. Mind the difference between /. the root directory and /root. You can do a keyword search from this Website.

Addr=127.Ravi Narain Reg No:-800119695 We can just download a single software package to get the software in that package to word.rpm Configuring Sendmail 1).0. Make the sendmail configuration file: $> m4 /etc/mail/sendmail.1.i386. Case Studiesb . Download the Sendmail RPM's from the RedHat website.cf 3).Restart Sendmail: $> /etc/rc.0.i386.1.rpm sendmail-devel-{ver}. Name=MTA') Change this line to: dnl DAEMON_OPTIONS(`Port=smtp.d/sendmail restart 20 .Look for the line: DAEMON_OPTIONS(`Port=smtp.0. If it is not then you need to install the Sendmail RPM's with the Red Hat distribution.05 Sendmail should be installed by default when you install Red Hat Linux.mc > /etc/sendmail. Many package depends on other packages.i386. For example software package for playing audio & video typically rely on other software packages for decoding different kinds of content. from a mirror or from your Red Hat installation CD.rpm sendmail-cf-{ver}. Name=MTA') Save the file. These RPM's are required: sendmail-{ver}.mc" . Edit file "/etc/mail/sendmail. 2).0.d/init.Addr=127.

First. no other files can reside there. Here are some techniques that may help you better manage swapping on Linux systems and get the best performance from the Linux swapping subsystem. while disks are measured in milliseconds. the slower your system will be. Sometimes excessive swapping or thrashing occurs where a page is swapped out and then very soon swapped in and then swapped out again and so on. most modern operating systems use a technique called swapping. Compared to memory. The combined sizes of the physical memory and the swap space is the amount of virtual memory available. in which chunks of memory are temporarily stored on the hard disk while other data is moved into physical memory space. Linux has two forms of swap space: the swap partition and the swap file. called swap space. Memory speeds can be measured in nanoseconds. Second. In such situations the system is struggling to find free memory and keep applications running at the same time. The swap file is a special file in the filesystem that resides amongst your system and data files. In this case only adding more RAM will help. the kernel swaps out less used pages and gives memory to the current application (process) that needs the memory immediately. Swapping is the process whereby a page of memory is copied to the preconfigured space on the hard disk. However. To see what swap space you have. Linux divides its physical RAM (random access memory) into chucks of memory called pages. The system can swap out those pages and free the memory for other applications or even for the disk cache. to free up that page of memory.Ravi Narain Reg No:-800119695 PROJECT ON RHEL 5 All about Linux swap space When your computer needs to run programs that are bigger than your available physical memory. The output will look something like this: Filename Type Size Used Priority 21 . use the command swapon -s. when the system requires more memory than is physically available. so accessing the disk can be tens of thousands times slower than accessing physical memory. Swapping is necessary for two important reasons. The swap partition is an independent section of the hard disk used solely for swapping. disks are very slow. The more swapping that occurs. swapping does have a downside. a significant number of the pages used by an application during its startup phase may only be used for initialization and then never used again.

so be careful not to kill your Solaris partitions by mistake. 'Priority' tells Linux which swap space to use first. which contains a list of filesystems and swap spaces that need to be mounted at boot up.Ravi Narain /dev/sda5 partition 859436 0 -1 Reg No:-800119695 Each line lists a separate swap space being used by the system. Be careful when working with partitions -. which can greatly increase swapping performance. The format of each line is: <file system> <mount point> <type> <options> <dump> <pass> 22 . and from 'Filename' we see that it is on the disk sda5. run as root: fdisk -l /dev/hdb Replace /dev/hdb with the device of the hard disk on your system with the swap partition on it. To mount the swap space automatically at boot time. To activate it immediately. To add an extra swap partition to your system. the 'Type' field indicates that this swap space is a partition rather than a file. you first need to prepare it. your swap space is ready to use. The 'Size' is listed in kilobytes. you need to prepare it using the mkswap (make swap) command as root: mkswap /dev/hdb1 If you see no errors.you don't want to delete important partitions by mistake or change the id of your system partition to swap by mistake. Step one is to ensure that the partition is marked as a swap partition and step two is to make the swap filesystem. so double-check every change you make. To check that the partition is marked for swap. you must add an entry to the /etc/fstab file. Also note that Solaris uses the same ID as Linux swap space for its partitions. Linux will interleave its swapping activity between them. and the 'Used' field tells us how many kilobytes of swap space has been used (in this case none). Here. All data on a swap partition will be lost. Once a partition is marked as swap. type: swapon /dev/hdb1 You can verify that it is being used by running swapon -s. One great thing about the Linux swapping subsystem is that if you mount two (or more) swap spaces (preferably on two different devices) with the same priority. You should see output that looks like this: Device Boot Start End Blocks Id System /dev/hdb1 2328 2434 859446 82 Linux swap / Solaris If the partition isn't marked as swap you will need to alter it by running fdisk and using the 't' menu option.

many of these parameters aren't applicable. 1GB). It is of type swap with options of sw.but if you run out of physical memory then the system 23 . add: /dev/hdb1 none swap sw 0 0 where /dev/hdb1 is the swap partition. but this time use the name of the swap file: mkswap /swapfile And similarly. Swap file As well as the swap partition. prepare. mount it using the swapon command: swapon /swapfile. It doesn't have a specific mount point. use the dd command to create an empty file. type: dd if=/dev/zero of=/swapfile bs=1024 count=1048576 /swapfile is the name of the swap file. The advantage of swap files is that you don't need to find an empty partition or repartition a disk to add additional swap space. To check that your swap space is being automatically mounted without having to reboot. To create a swap file. For swap space.Ravi Narain Reg No:-800119695 Since swap space is a special type of filesystem. and the system will run well if you have a large amount of memory -. you can run the swapoff -a command (which turns off all swap spaces) and then swapon -a (which mounts all swap spaces listed in the /etc/fstab file) and then check it with swapon -s. Prepare the swap file using mkswap just as you would a partition. and mount in a fashion similar to that of a swap partition. The /etc/fstab entry for a swap file would look like this: /swapfile none swap sw 0 0 How big should my swap space be? It is possible to run a Linux system without a swap space. Linux also supports a swap file that you can create.e. To create a 1GB file. hence none. and the count of 1048576 is the size in kilobytes (i. and the last two parameters aren't used so they are entered as 0.

swappiness parameter in the /etc/sysctl. Kernel maintainer Andrew Morton has said that he runs his desktop machines with a swappiness of 100. 3) for older desktop machines (with say only 128MB). even if they are idle. as it will allow you to run a large number of applications (many of which may will be idle and easily swapped). It is a number from 0 to 100. use a swap space of double system memory. even up to 1GB.Ravi Narain Reg No:-800119695 will crash. but they can use it if you configure it. making more RAM available for the active applications. You can alter it temporarily (until you next reboot) by typing as root: echo 50 > /proc/sys/vm/swappiness If you want to alter it permanently then you need to change the vm. which will make it feel slow. use as much swap space as you can spare. The key question is how much? Older versions of Unix-type operating systems (such as Sun OS and Ultrix) demanded a swap space of two to three times that of physical memory. A rule of thumb is as follows: 1) for a desktop system.6 kernel added a new kernel parameter called swappiness to let administrators tweak the way Linux swaps. In essence. especially since disk space is relatively cheap. The Linux 2. because when the application's window is clicked the system has to swap the application back into memory. but monitor the amount of swap space used and upgrade your RAM if necessary. use the memory for something useful.conf file. Modern implementations (such as Linux) don't require that much. You really don't want hundreds of megabytes of BloatyApp's untouched memory floating about in the machine. so it is advisable to have a swap space. Get it out on the disk. Conclusion Managing swap space is an essential aspect of system administration. 2) for a server. and always monitor your system to ensure you are getting the results you need. have a smaller amount of swap available (say half of physical memory) so that you have some flexibility for swapping when needed. The default value for swappiness is 60. With good planning and proper use swapping can provide many benefits. and lower values lead to more applications being kept in memory. 24 . Don't be afraid to experiment. as it has nothing else it can do." One downside to Morton's idea is that if memory is swapped out too quickly then application response time drops. stating that "My point is that decreasing the tendency of the kernel to swap stuff out is wrong. higher values lead to more pages being swapped.

Sign up to vote on this title
UsefulNot useful