Linux Features

2 comments

1)multitasking: several programs running at the same time is called multitasking.

2)multiuser: several users on the same machine at the same time through different terminals/from remote hosts.


3)multiplatform: runs on many different CPUs, not just Intel like AMD too.
 

4)multiprocessor: SMP(Symetri multi processing) support is available on the Intel and SPARC platforms (with work currently in progress on other platforms), and Linux is used in several loosely-coupled MP applications.
 

5)multithreading: has native kernel support for multiple independent threads of control within a single process memory space.




6)runs in protected mode on the 386. ie Protected mode has a number of new features designed to enhance multitasking and system stability, such as memory protection, and hardware support for virtual memory as well as task switching It is sometimes abbreviated p-mode and also called Protected Virtual Address Mode

7)has memory protection between processes, so that one program can't bring the whole system down.
 

8)demand loads executables: Linux only reads from disk those parts of a program that are actually used.
 

9)shared copy-on-write pages among executables. This means that multiple process can use the same memory to run in. When one tries to write to that memory, that page (4KB piece of memory) is copied somewhere else. Copy-on-write has two benefits: increasing speed and decreasing memory use.
 

10)virtual memory using paging (not swapping whole processes) to disk: to a separate partition or a file in the filesystem, or both, with the possibility of adding more swapping areas during runtime (yes, they're still called swapping areas). A total of 16 of these 128 MB (2GB in recent kernels) swapping areas can be used at the same time, for a theoretical total of 2 GB of useable swap space. It is simple to increase this if necessary, by changing a few lines of source code.
 

11)a unified memory pool for user programs and disk cache, so that all free memory can be used for caching, and the cache can be reduced when running large programs.
 

12)mostly compatible with POSIX, System V, and BSD at the source level.
 

13)POSIX job control.
 

14)pseudoterminals (pty's).
 

15)multiple virtual consoles: several independent login sessions through the console, you switch by pressing a hot-key combination (not dependent on video hardware). These are dynamically allocated; you can use up to 64.
 

16)Supports several common filesystems, including minix, Xenix, and all the common system V filesystems, and has an advanced filesystem of its own, which offers filesystems of up to 4 TB, and names up to 255 characters long.
 

17)transparent access to MS-DOS partitions (or OS/2 FAT partitions) via a special filesystem: you don't need any special commands to use the MS-DOS partition, it looks just like a normal Unix filesystem (except for funny restrictions on filenames, permissions, and so on). MS-DOS 6 compressed partitions do not work at this time without a patch (dmsdosfs). VFAT (WNT, Windows 95) support and FAT-32 is available in Linux 2.0
 

18)special filesystem called UMSDOS which allows Linux to be installed on a DOS filesystem.
 

19)read-only HPFS-2 support for OS/2 2.1
 

20)HFS (Macintosh) file system support is available separately as a module.
 

21)CD-ROM filesystem which reads all standard formats of CD-ROMs.
 

22)TCP/IP networking, including ftp, telnet, NFS, etc.
 

23)Lan Manager/Windows Native (SMB) client and server
 

24)Linux is free, in two senses. First, you may pay nothing to obtain and use Linux. On the other hand, you may choose to purchase Linux from a vendor who bundles Linux with special documentation or applications, or who provides technical support. However, even in this case, the cost of Linux is likely to be a fraction of what you'd pay for another operating system. So, Linux is free or nearly free in an economic sense.
Second, and more important, Linux and many Linux applications are distributed in source form. This makes it possible for you and others to modify or improve them. You're not free to do this with most operating systems, which are distributed in binary form. For example, you can't make changes to Microsoft Windows or Microsoft Word - only Microsoft can do that. Because of this freedom, Linux is being constantly improved and updated, far outpacing the rate of progress of any other operating system. For example, Linux will likely be the first operating system to support Intel's forthcoming Merced 64-bit CPU.

25)Linux has attractive features and performance. Free access to Linux source code lets programmers around the world implement new features, and tweak Linux to improve its performance and reliability. The best of these features and tweaks are incorporated in the standard Linux kernel or made available as kernel patches or applications. Not even Microsoft can mobilize and support a software development team as large and dedicated as the volunteer Linux software development team, which numbers in the hundreds of thousands, including programmers, code reviewers, and testers.

Table 1: Sales of Popular Desktop Operating Systems
Operating System
1997
2001 
Windows 95/98
69.4%
65.0%
Windows NT Workstation
9.2
26.2
DOS with Windows 3.x
7.7
0.3
MacOS
4.6
1.9
Linux
2.4
4.2
DOS without Windows
2.3
0.3
Unix
1.0
0.5
OS/2 Warp
0.8
1.2
Other
2.7
0.5


Table 2: The History of Linux
Year
Version
Users
Kernel size (Bytes)
Milestone(s)
1991
0.01
100
63,362
Linus Torvalds writes Linux kernel
1992
0.99
1000
431,591
GNU software integrated with Linux kernel, producing a fully functional operating system
1993
0.99
20,000
937,917
High rate of code contributions prompts Linus to delegate code review responsibility
1994
1.0
100,000
1,016,601
First production release
1995
1.2
500,000
1,850,182
Linux adapted to non-Intel processors
1996
2.0
1,500,000
4,718,270
Linux supports multiple processors, IP masquerading, and Java
1999
2.2
7,500,000
10,600,000[4]
Linux growth rate exceeds that of Microsoft Windows NT

Table 3: Popular Linux Distributions and Their Web Home Pages
Distribution
Home Page
Caldera OpenLinux
Debian Linux
Slackware Linux
Red Hat Linux
SuSE. Linux

Table 4: Recommend Linux Web Pages
Web page
URL
Debian Project Web Page
Eric S. Raymond's Linux Reading List HOWTO
Gary Singleton's Gary's Place: Linux News Tips and Links
Joshua Go's Linux Guide
Linux Documentation Project
Linux Journal Web Page
Linux Journal's Linux Gazette
Linux Resources
Linux Web Ring
Linux Weekly News
O'Reilly & Associates Linux Center
Renaissoft's Linux Resources
Robert Kiesling's Linux Frequently Asked Questions with Answers (FAQ)
Slashdot
Victoria, British Columbia Linux Users Group

Some addtionoal info:


link1: a debat on wether to chose linux or not must read it
http://www.oreilly.com/catalog/debian/chapter/book/ch01_03.html

again some fun time now
http://www.tuxfiles.org/linuxhelp/altview.html

My linux faverate site's regarding linux
www.google.com/linux
www.linuxhomenetworking.com

Q&A

1) As i told that linux supports different platforms what are they?
A) Intel X86, Intel Itanium, AMD AMD64 , IBM zSeries, iSeries, pSeries, S/390,notbook systems, and PDA's etc

2) what is simetric multi processing(SMP)?
A.Symmetrical Multi Processing. A computer hardware architecture which distributes the computing load over a small number of identical processors, which share memory. Very common in Unix and Windows NT/2000 systems.

3)what is pre-emptive multi tasking?
A.
Pre-emption as used with respect to OS means the ability of the operating system to preempt or stop a currently scheduled task in favour of a higher priority task. The scheduling may be one of, but not limited to, Process or I/O scheduling, among others.

4) then my quation is what is non-preemptive multitasking?
A. Any form of multitasking where the OS cannnot preempt a running task and process the next task in the queue(i think now u got the definition)

5)
Why “Free Software” is better than “Open Source”
A. no explination to this from me but i can give a link u can read it
http://www.gnu.org/philosophy/free-software-for-freedom.html

6)what are diffrent file system's in linux?
A.1).minix 2)nfs, 3)ext, 4)
ext2, 5)ext, 6)vfat, 7)msdos, 8)fat, 9)nls, 10)smbfs, 11)autofs,12)cramfs, 13)nfsd, 14)ufs, 15)ramfs, 16)romfs 

17)autofs4 18)
reiserfs 19) coda 20) ncpfs 21)umsdos 22)sysv 23) udf 24) hfs 25) freevxfs 26) bfs 27) hpfs 28) cmsfs 
29) affs 30)
isofs (i told u linux by default can understand iso files) 31)adfs 32) xfs 33) proc(noting but linux virtual file system) 34) 
xaifs

so now its ur duty to check the above file system details in www.google.com

and one more thing the red indicate importat file system's ok?


7then my quation is what is actually a file systyem?
A.
In computing, a file system is a method for storing and organizing computer files and the data they contain to make it easy to find and access them. File systems may use a storage device such as a hard disk or CD-ROM and involve maintaining the physical location of the files, or they may be virtual and exist only as an access method for virtual data or for data over a network (e.g. NFS)

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Swap Management - II

    4 comments

    Advanced Swap management
    Actually its advantageous if we create swap partition separately if the server is not having any raw space left what we can do ? At any cost we have to increase the swap to improve the system productivity 
    To come out of this situation there is one solution provided by Linux e.i we can create a swap file with in all ready existing and using partition if that partition is having sufficient free space

    Step1:Switch off all the swap before any swap management

    #swapoff -a

    Step2:Determine what is the swap size we required(here i am taking 128MB) and execut the following command with count equal to 131072 (because 131072 is equal to 128M)

    #dd if=/dev/zero of=/swapfile bs=1024 count=131072

    Step3:Now set this swap file in order to use this file as swap

    #mkswap /swapfile

    Step4:Edit the /etc/fstab file to specify the swap file for perminient swap space

    #vi /etc/fstab

    /swapfile    swap    defaults    0 0

    :wq

    Step5:Update the kernel about the mount table changes

    #mount -a

    Step6:After managing the swap on the swap

    #swapon -a

    Step6:Check weather the swap space is updated or not by using following commands

    #free -m   
    #swapon -s 
    #cat /proc/swaps
     

    Removing swap:

    Step1:Before doing any thing with swap first we have to switch of the swap

    #swapoff -v /swapfile

    Step2:Remove/comment the entry of swap from /etc/fstab file

    #vi /etc/fstab

    then save and exit

    Step3:update the kernel about mount table changes

    #mount -a

    Step4:Remove the swapfile permanently 

    #rm /swapfile

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Swap management

    0 comments



    Swap management - I
    Step1:First check what is the swap space the system is having and utilization of swap size

    #free -m   
    #swapon -s 
    -s for st
    #cat /proc/swaps

    this will give output of swap statistics in Megabytes(m), if we want the output in Kilobytes then free -k

    Step2:Before starting the Swap management we have to take precautions such as switch off all the swap and no user should be logged in  

    #swapoff -a

    Step3:Check in the system if there is any raw space in the system

    #fdisk -l

    Step4:If the system is having free space then create a partition which support swap(partition type 82) with required amount of free space

    #fdisk /dev/hda

    p                #press p to print the partition table
    n                #press n for creating new partition
    256M          #specify the amount of swap required
    t                 #press t to change the partition type to 82 (because partition type 82 is well supported for swap)
    8                 #enter the partition no on which u want to create swap(here i am creating on /dev/hda8 partition)
    82               #specifying the partition type
    p                 #press p to print the partition table and to just conform the /dev/hda8 partition type
    w                #press w for writing the changes to partition table (if suppose if u have any problem or trouble just                                           press q to quit from fdisk utility without any problem)

    Step5:update the partition table changes to kernel so that there is no need to restart the system/server

    #partprob

    Step6:Permanently mounting the partition details,in order to do this one we have to update the /etc/fstab file

    #vi /etc/fstab

    /dev/hda8    swap    swap    defaults    0 0

    enter the above entires in to fstab file,save it and exit from editing /etc/fstab file

    :wq

    Step7:formatting/creating swap signature on the newly created partition

    #mkswap /dev/hda8

    Note:stpe6 and step7 are interchangeable.

    Step8:update the mount table to kernel

    #mount -a

    Step9:now on the swap so that it can be available for use.

    #swapon -a

    Step10:check weather the swap is updated or not

    #free -m   
    #swapon -s 
    #cat /proc/swaps


    Removing swap:
    Step1:Before doing any thing with swap first we have to switch of the swap

    #swapoff -a

    Step2:Remove/comment the entry of swap from /etc/fstab file

    #vi /etc/fstab

    then save and exit
    Step3:update the kernel about mount table changes

    #mount -a

    Step4:Remove the partition used by swap

    #fdisk /dev/hda8

    d                #press d to delete the partition
    8                #specify the partition no to be deleted 
    w                #press w to write the changes to partition table and quit the fdisk utility

    Step5:update the partition table changes to kernel with out rebooting the system/server

    #partprobe

    Step6:now on the swap 

    #swapon -a

    Step7:now check weather swap is updated properly or not

    #free -m   
    #swapon -s 
    #cat /proc/swaps

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Disk Management In Linux

    0 comments

    Disk Management will contribute more topics than any other in RHCE 133 paper, its a vast subject to discuess. From today up to some days I will be posting topics on disk management, so stay tuned you linux learners.

    Linux OS will consider every thing as files even hardware too, for example if there is one hard disk in a Linux system then it is represented as hda(harddisk "A") under /dev folder

    For example if we have 2 Hard disks then the representation is like below
    /dev/hda
    /dev/hdb
    Where /dev/hda is primary master HDD and /dev/hdb is primary slave HDD

    If we want to represent floppy drive then the representation is as below
    /dev/fd0

    If we want to represent second floppy drive then the representation is
    /dev/fd1

    If we want to represent cdrom
    /dev/cdrom

    If we want to represent DVD-writer
    /dev/dvdwriter

    If we want to represent special devices such as SATA,USB-mass storage etc then the representations are as below
    /dev/sda
    /dev/sdb
    /dev/sdc till up to /dev/sdz

    Suppose if we ant to represent partitions on HDD it goes as below
    /dev/hda0 for first partition in primary master HDD
    /dev/hda1 for second partition in primary slave HDD
    /dev/sdd5 for forth partition in special device 4

    For more number of devices see this http://docs.google.com/Doc?id=dggtw8pr_1604gz89zmg4

    Before creating any partitions we should remember the following things.
    a.
    Check for what purpose we want to create the partitions(for example for creating swap)
    b. Check weather any free space left by using fdisk -l command

    So if there is any free space then we can directly create partitions

    step1 : Check there is any free space or not
    #fdisk -l
    Disk /dev/hda: 20.0 GB, 20060651520 bytes255 heads, 63 sectors/track, 2438 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/hda1 1 1024 8225248+ b W95 FAT32/dev/hda2 * 1025 2438 11357955 c W95 FAT32 (LBA)Disk /dev/hdb: 80.0 GB, 80060424192 bytes255 heads, 63 sectors/track, 9733 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/hdb1 * 1 2432 19535008+ 83 Linux/dev/hdb2 2433 2554 979965 82 Linux swap / Solaris/dev/hdb3 2555 6202 29302560 83 Linux/dev/hdb4 6203 9733 28362757+ 5 Extended/dev/hdb5 6203 9733 28362726 83 Linux

    fdisk is a command which will show all the disks present in the system weather it is partition or free space. From the above out put we can clearly know that the system is having 2 harddisks one with 20GB and the other with 80GB(with red mark). This is an interview question how to find Harddisk size in linux.

    Step2 : Use fdisk command on the disk in order to create the partitions
    #fdisk /dev/hda

    Here it will show full details of /dev/hda Disk /dev/hdb: 80.0 GB, 80060424192 bytes255 heads, 63 sectors/track, 9733 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/hdb1 * 1 2432 19535008+ 83 Linux/dev/hdb2 2433 2554 979965 82 Linux swap / Solaris/dev/hdb3 2555 6202 29302560 83 Linux/dev/hdb4 6203 9733 28362757+ 5 Extended/dev/hdb5 6203 9733 28362726 83 Linuxcommand (m for help):

    So press m to explore your self .

    Step3 : Creating new partition.

    Press n with out quote to create new partition. So specify your size in prbytes/kb/mb with + preseeding to the value suppose if you want to create a new partition of 23mb you have to say +23MB then press enter

    One more example create a new partion of 538kb? thinking????????? still thinking?????? yes you are right it is +538KB

    Step4 : So what next? Suppose you donot want to create this partition so delete it. At this point the partition table changes are not updated to partition table to do this one just type q.

    Step5 : Updating the created partition to partition table just press w with out quotes thats it you are almost done.

    Step6 : So you have updated the changes to partition table then you have to say this change to Kernel so for doing that there are two ways

    A. Just restart the system(so you are thinking this is easiest way ha? never do this on live servers because you have to give 99.999% uptime to your servers. so always do second way.

    B. Just execute partprob command this will update the partition table changes to kernel #partprob /dev/hda

  • Like the post? Please Subscribe to free RSS feed to get updates
  • TFTP Implementaion In Linux

    0 comments

    TFTP server is an important service for Network engineers, because they will be using this TFTP server for coping big IOS(Inter networking Operating System)files to routers, So as a Linux administrators we have to install and configure tftp server.

    So why these network guys uses TFTP server for coping IOS images? why not ftp, scp, rcp etc?
    Ans : Because TFTP user use UDP protocal for sending data, so its bit faster due to its unrelaiable way of sending data. So in early days one a serial port is connected between router and server so the data transmission is very slow, so they started using TFTP server as file server to copy images.

    Here are the steps to configure TFTP server

    Step1 :
    Install TFTP server

    #yum install tftp-server
    or
    #rpm -ivh tftp-server*

    Here we have to make a note that TFTP, telnet, rsync, talk services are run under one single service Xinted.

    Step2 : Configuring tfpt server

    #cd /etc/xinetd.d
    #vi tftp

    Edit the tftp configuration file as follows, save it and exit.
    [root@test xinetd.d]# vi tftp
    # default: off
    # description: The tftp server serves files using the trivial file transfer \
    # protocol. The tftp protocol is often used to boot diskless \
    # workstations, download configuration files to network-aware printers, \
    # and to start the installation process for some operating systems.
    service tftp
    {
    socket_type = dgram
    protocol = udp
    wait = yes
    user = root
    server = /usr/sbin/in.tftpd
    server_args = -s /tftpboot
    disable = no
    per_source = 11
    cps = 100 2
    flags = IPv4
    }

    In the above file what we have specified was please use protocol as UDP and server command, then tftp dump location(/tftpboot), its like ftp server dump(/var/ftp/pub)location then disable=no means TFTP service should be enabled other things no need to edit.

    Step3 : Give full permissions to
    /tftpboot

    #chmod 777 /tftpboot

    Step4 : Restart the xinetd serive, so that the tftp server configs will be updated

    #service xinetd restart

    Step5 : Permanently on Xinetd service

    #chkconfig xinetd on

  • Like the post? Please Subscribe to free RSS feed to get updates
  • RPM Package Management-II (Checkinstall)

    0 comments

    Part2 :

    So coming to advanced RPM management here I am going to discuss how to convert .tar.gz/.tar.bz2 files,src.rpm files to rpm packages? So that its very much easy to install the packages by using rpm command.

    New releases of Linux programs are generally released in the tar.gz format consisting of source code of the application. Normally you will compile these programs but at times they throw some compiler errors on your screen which just seem gibberish to a novice. A much easier way to install programs is when they are in the RPM package format. Here’s a simple guide that will help you convert those source code files (tar.gz) into RPM packages.

    To do this, first of all install the package checkinstall from your Linux dvd. If it doesn’t exist then you can Google for it and download it. Then unpack your source package diand cd to the directory. Where you unpacked the tar.gz file.

    Step1 : Run the following two commands:

    ./configure make But now instead of running make install you run checkinstall. Answer the questions, edit some values if they are not appropriate and let the program run. When finished, you’ll find your RPM package in /usr/src/packages/RPMS/i686 your .rpm file is ready for future use.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • RPM Package Management - I

    1 comments

    Package management in Linux is very much tedious job when compared to windows systems. Basically if we consider windows its very much easy even for LKG student will install the packages(in windows we will call it as softwares) very much easy main windows software packages are .exe or .bat or .msi or .cab files we will just double click it will install the package for you with minimal system knowledge this is all about windows but coming to Linux its some what complex procedure to install a package below are some of the example ways you can install the packages.

    1. Through shell script

    2. .tar.bz2 or .tar.gz files

    3. .rpm files

    4. .deb files(These are the software packages for Debian flavor of Linux)

    5. YUM

    In order to install packages in Linux one should have depth and width of full concept then only we can troubleshoot the problems what we faced while installation so coming in to the topic directly I have divided this entire document in two parts

    One is dealing with basic installation of packages

    Second one is building rpm packages for your requirements like say for your architecture (i386,1686 AMD etc)

    PART1 : Basic rpm package management

    Example1 : For checking the package is install in your system or not

    #rpm -q package name #rpm -q httpd

    Example2 : For checking what are all the packages installed in your system

    #rpm -qa

    Here q stands for query and a stands for all

    Example3 : Installing a package

    #rpm -ivh packagename.versionno.arch.rpm (i) (ii) (iii) (iv)

    Here I have to explain the above 4 thins

    (i)Indicates the package name

    (ii)Indicates the version number

    (iii)Indicates the architecture type (like i386,i686,i586,i486 etc)

    (iv)rpm extension

    Example4 : Upgreading the package

    #rpm -Uvh packagename.versionno.arch.rpm

    Example5 : Installing a package with out dependencies

    #rpm -ivh packagename.versionno.arch.rpm --nodeps

    Example6 : Installing a package when it is not able to install, if you want to install it forcefully

    #rpm -ivh packagename.versionno.arch.rpm --force

    Example7 : Installing a package with dependencies

    #rpm -ivh packagename.versionno.arch.rpm --aid

    These are some basic ways to install the packages in coming post I will discuss about some what advanced package management like creating rpm package compilation etc Happy linux.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • GOOSH

    1 comments

    Actually i am Google centric guy,who always romming around google google google to find out what Google is inventing day today. I am regular reader of googlesystem.blogspot.com and blogoscoped.com blogs, both the sites are totaly discuessing google releated information/hacks etc

    So comming to the point why i am saying all this to u? that too in my linux blog? any guesses?
    Ans : Today I found of some strange site from the above mentioned blogs ie
    goosh.org
    This one kind of shell ie. google+shell= goosh where you can search the entire web/blogs/images, you name it you will get it by just typing commnds. When we log in to goosh.org we will get the following prompt

    guest@goosh.org:/web>

    So here we can type what ever you want to search with in the web. If you want to search only in blog we have to say blog then the prompt will change to the below thing
    guest@goosh.org:/web>blog
    guest@goosh.org:/blog>

    So from now what ever you type this will seach in only blogs, if you want to know more about it just type help you will get all the help you want.

    guest@goosh.org:/web>help

    help


    commandaliasesparametersfunction
    web(search,s,w)[keywords]google web search
    lucky(l)[keywords]go directly to first result
    images(image,i)[keywords]google image search
    wiki(wikipedia)[keywords]wikipedia search
    clear(c)clear the screen
    help(man,h,?)[command]displays help text
    news(n)[keywords]google news search
    blogs(blog,b)[keywords]google blog search
    feeds(feed,f)[keywords]google feed search
    open(o)open url in new window
    go(g)open url
    more(m)get more results
    in(site)search in a specific website
    loadload an extension
    video(videos,v)[keywords]google video search
    read(rss,r)read feed of url
    place(places,map,p)[address]google maps search
    langchange language

  • Like the post? Please Subscribe to free RSS feed to get updates
  • DNS Server Syntax Checking

    0 comments

    Checking named.conf file syntax once you have updated the named.conf file some times server will not start/run because some syntax errors like spaces, dots etc. Unnaccearsly in the named.conf file. Its very diffucult to find where is the error in named.conf files. So for that we can use

    named-checkconf #named-checkconf configurationfileloc

    Example : #named-checkconf /var/named/chroot/etc/named.conf

    When you execute above command it should show errors if any according to line number, so its very much easy to check where we did the mistake. Checking Zone file(both forword and reverse)

    Syntax : #named-checkzone domainname zonefileloc

    Example : #named-checkzone example.com /var/named/chroot/var/named/example.frd example.frd is my forword zone file for my domain example.com

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Kernel Recompilation

    2 comments

    Here I am giving some steps how to complie kernel? By default RedHat will not support the ntfs partitions mounting. So we will do kernel recompilation and get the job done.

    Step1 : Before Compiling the kernel the following packages should be installed in order to compile kernel
    a. Glib-devel
    b. Gcc
    c. Ncurscs-devel
    d. Binutils
    e. Kernel-sourcecode

    Step2 : Download the latest kernel from http://www.kernel.org/ and copy the .tar.bz2 file to /usr/src folder
    #cd /usr/src
    #wget
    http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.4.tar.bz2
    #ls

    Here you have to see the downloaded file from the kernel.org

    Step3 : Now unzip the compressed kernel in the same folder it self
    #tar xvfj linux-2.6.25.4.tar.bz2
    #ls
    Now here you will find a folder with name
    linux-2.6.25.4
    #cd linux-2.6.25.4

    Step4 : If you have compiled any kernels previously first you have to clear any unwanted enteris in source kernel
    #make mrproper

    Step5 : Before recompiling the new kernel we have to take the backup of the old kernel in order to restore it. If in case you face any issues with the new kernel
    #make oldconfig
    This backed up kernel configs are stored in /usr/src/kernel/.config

    Step6 : So now every thing is fine the left part is to compile kernel, to do that we have to execute the following command
    #make menuconfig

    About this command : Actually kernel have so many modules(like process management, memory management, network management, filesystem management, device managemn) etc, So this command will give a menu kind of list where you can select the different modules.

    Linux kernel is Modular kernel, so all the management parts what I have discussed will not be loaded in to kernel at once, The menu will show some check marks.

    Type1 : Square brackets []
    If you want the module to be part of kernel select it

    For example :

    [*] indicates yes
    []
    indicates
    no

    And this <> type of brackets are used to mention wether that option should be a module or built in.

    For example :

    < > for a feature indicates that feature is not included in the kernel
    the feature is inculeded in kernel but it’s a module.
    <*>the feature is inculeded in kernel as a built in feature.

    So when you execute the above command you will get a menu in this menu select the filesystem->ntfs file system. And save it (here I am giving clear idea about how to select the filesystem type you do your R&D work and get the things done).

    Step7 : So now we have to compile this kernel with added features and to create a bz image file
    #make

    Note : This step will take more time say some 15 to 30 min depends on the features you have selected

    Step8 : Once again we have to say to kernel which are reloadable modules by executing the following command
    #make modules_install

    Step9 : Now we have to execute the follwing command to copy this kernel image to /boot and edit the grub.conf file so that from next boot
    #make install
    That’s it its done

    Some links for your additional :

    http://www.digitalhermit.com/linux/Kernel-Build-HOWTO.html
    http://www.nongnu.org/lpi-manuals/lpi-102/html/ch01s03.html
    http://www.netbsd.org/docs/guide/en/chap-kernel.html
    http://www.geekcomix.com/cgi-bin/classnotes/wiki.pl?UNIX02/Kernel_Recompilation

  • Like the post? Please Subscribe to free RSS feed to get updates
  • How To Install YUM Server In Redhat(RHEL5)

    0 comments

    In linux you can install packages through many ways like.
    1. Through RPM,
    2. Through shell script
    3. Through source tar balls etc.

    YUM(Yellow-dog Updater and Modifier) is another and advanced way of installing the packages in Linux distros such as Red-hat, Fedora.

    In RHEL4 installing packages is a tedious process, some times its headache to install all the dependencies. So Red-hat people come with a solution to overcome this problem in most situations, i.e. nothing but YUM implementation which will resolve this dependency issue. Here I am going to present some basic way how to use YUM utility to install packages locally(there are so many ways to install packages from different sources such as ftp, http etc). You can get the full details about YUM in my google docs here. One Two Three Four Five Six Seven Eight Nine Ten

    Basic YUM implementation locally:
    Step1 :
    Copy the entire OS cd's content to Hard-drive as below.

    #cp -ar /media/cdrom/* /destinationfolder

    Example : #cp -ar /media/cdrom/* /var/ftp/pub

    Note :

    1. From second cd on words no need to copy entire cd contents to drive just copy Server content in to drive.

    2. Here please take destination folder as /var/ftp/pub so that we can implement FTP server to share our reposatory.

    3. If you have RHEL5 DVD then just continue with second step.

    #cp -ar /media/cdrom/Server/* /var/ftp/pub/Server/

    Step2 : Now change the directory to /destinationfolder/Server and install the createrepo package #rpm -ivh createrepo.0.4.4-2 --aid

    Step3 : Specify the reposatory location to YUM.

    #createrep -v /destinationfolder/

    Step4 : Create a file with repo as extention and specify the YUM details in /etc/yum.repos.d folder

    #cd /etc/yum.repos.d/ #vi testing.repo

    Note : The directory /etc/yum.repos.d/ contaions two .repo files which should be moved or removed to other directory, so that YUM server will check default .repo file it self. The new file which is created contains as follows

    [station1.example.com]

    comment ="test"

    baseurl=file:///destinationfolder

    gpgcheck=0

    After entring these entries save and exit from the file.

    Let me explain what acutally this four entries mean.

    [station1.example.com] ==>This informs what is the reposatory name.

    Comment ==> Its used to see the inforamtion about the repo.

    Baseurl ==> This is the server and path of the repo(here its a local repo so the base url is just a file:///

    For example you are creating YUM server through FTP then base url should be like this

    baseurl=ftp://station1.example.com/pub/Server gpgcheck ==> This is to check the authentication of the repository, which is disabled in this case.

    Local YUM repository is created, now you can install any package you want with yum command. In order to know more about YUM, Please see man pages for YUM.

    Basic YUM Server Reposatory through FTP server :
    So what about Installing packages remotly by using this reposatory?

    Let us see how to configure client to access this repository. Before doing client configuration we have to share this reposatory through FTP or HTTP.

    Step1 : Install vsftpd server on server

    #yum install vsftpd

    Step2 : Start the ftp service and on it

    #service vsftpd restart

    #chkconfig vsftpd on

    Thats it on the server side every thing configured properly, Now move on to client machine Confugration on client side :

    Step3 : Remove/move the local reposatory file from /etc/yum.repo.d/ folder to some other location #mv /etc/yum.repo.d/* /safe-loc/

    Step4 : Create server.repo file in /etc/yum.repo.d/ with following contents [station1.example.com]

    comment ="test"

    baseurl=ftp://station1.example.com/pub/Server

    gpgcheck=0

    Save and exit the file Now start using yum to install packages, as follows.

    #yum install packagename

    Example : #yum install httpd

    To uninstall a package through YUM

    #yum remove httpd

    To see the info of a package

    #yum info packagename

    To see the package is already installed or not

    #rpm -qa grep packagename

  • Like the post? Please Subscribe to free RSS feed to get updates
  • The Runlevels

    0 comments

    Many Windows users are familiar with different modes of execution of their operating system:
    a. Safe mode
    b. Command prompt only
    c. Safe mode with network support
    d. Safe mode with vga


    And other such options that are presented during the boot-up process. Similarly, Linux has different modes of executing as well, which are known as runlevels. But unlike Windows, we can change runlevels on a fly.


    Definition for runlevel : The term runlevel refers to a mode of operation in one of the computer operating system that implement Unix System V-style initialization. This system replaces the traditional /etc/rc and /etc/rc.local scripts used in BSD UNIX. Conventionally, seven runlevels exist, numbered from zero to six, plus an alias runlevel named 'S' and/or 's'.


    Runlevels control services started by the initialization process. The number of runlevels and services started on those runlevels varies with Linux distributions. Information about the runlevels of a particular distribution is listed in file /etc/inittab.


    The contents of the file include the following:


    Default runlevel. The runlevels used by RedHat are :

    # 0 - Halt (Do not set initdefault to this option.)

    # 1 - Single User Mode

    # 2 - Multi-user, without NFS (The same as 3, if you do not have networking)

    # 3 - Full Multi-user Mode

    # 4 - Unused

    # 5 - X11

    # 6 - Reboot (Do not set initdefault to this option.)

    id:3:initdefault: # System initialization. si::sysinit:/etc/rc.d/rc.sysinit

    l0:0:wait:/etc/rc.d/rc 0

    l1:1:wait:/etc/rc.d/rc 1

    l2:2:wait:/etc/rc.d/rc 2

    l3:3:wait:/etc/rc.d/rc 3

    l4:4:wait:/etc/rc.d/rc 4

    l5:5:wait:/etc/rc.d/rc 5

    l6:6:wait:/etc/rc.d/rc 6

    Runlevel 0 : Is halt mode. Telling init to enter runlevel 0 will cause all processes to be killed off, the filesystems unmounted, and the machine to be halted. This is a perfectly acceptable way to bring down the system. On many laptops and modern desktop computers, this will also cause the machine to be turned off. Different commands to go to runlevel 0.

    # halt

    # init 0

    # telinit 0

    # shutdown -h

    Now in the above command h is halting and now indicates shutdown the computer now it self no grace/trancision time for example you want to shutdown the command after 60 min so give the below command # shutdown -h +60.

    Runlevel 1 : Runlevels 1 and 2 are generally used for debugging purposed only, and are not used during normal operations. Most desktop linux distributions boot into runlevel 5, which starts up the Graphical Login Prompt. This allows the user to use the system with X-Windows server enabled. Most servers boot into runlevel 3, which starts the text based login prompt. Linux runlevels can be changed on the fly using the init tool. If you want to switch from text based operations to the Graphical Interface, you just have to type in 'telinit 5' in the root prompt. This will bring up the Graphical Interface in your system. Each runlevel can be configured by the system administrator. The "/etc/inittab" file has information on which runlevel to start the system at and lists the processes to be run at each runlevel. Each runlevel has its own directory structure where you can define the order in which the services start. These directories are located in the /etc/rc.d/ directory, under which you have rc1.d, rc2.d, rc3.d…. rc6.d. Directories where the number from 0 to 6 that corresponds to the runlevel. Inside each directory are symbolic links that point to master initscripts found in /etc/init.d or /etc/rc.d/init.d. You can also change the runlevel at boot time. If your system uses LILO as the boot manager, you can append the runlevel to the boot command : LILO: linux 3 or LILO: linux 5. If your system uses GRUB, you can change the boot runlevel by pressing the `e’ key to edit the boot configuration. Append the runlevel to the end of the boot command as shown : kernel /vmlinuz ro root=/dev/hda1 5 different linux/unix disterbution's runlevels


    Debian Linux :
    Debian, as well as most of the distributions based on it, like Ubuntu, does not make any distinction between runlevels 2 to 5. See also the Debian FAQ on booting.
    0 - Halt
    1 - Single
    2 - Full multi-user with display manager (GUI)
    3 - Full multi-user with display manager (GUI)
    4 - Full multi-user with display manager (GUI)
    5 - Full multi-user with display manager (GUI)
    6 - Reboot

    Red Hat Linux
    Red Hat as well as most of its derivatives uses runlevels like this.
    0 - Halt
    1 - Single
    2 - Not used/User definable
    3 - Full multi-user NO display manager
    4 - Not used/User definable
    5 - Full multi-user with display manager (GUI)
    6 - Reboot

    SUSE Linux
    SUSE uses a similar setup as Red Hat :
    0 - Halt
    1 - Single
    2 - Full multi-user with no networking
    3 - Full multi-user NO display manager
    4 - Not used/User definable
    5 - Full multi-user with display manager (GUI)
    6 - Reboot

    Slackware Linux
    Slackware Linux uses runlevel 1 for maintenance, as on other Linux distributions; runlevels 2, 3 and 5 identically configured for a console (with all services active); and runlevel 4 adds the X Window System.
    0 - Halt
    1 - Single
    2 - Full multi-user NO display manager
    3 - Full multi-user NO display manager
    4 - Full multi-user with display manager (GUI)
    5 - Not used/User definable
    6 - Reboot

    Gentoo Linux
    0 - Halt
    1 - Single
    2 - No network
    3 - Full multi-user with display manager
    4 - Full multi-user with display manager (Alias for runlevel 3)
    5 - Full multi-user with display manager (Alias for runlevel 3)
    6 - Reboot

    System V Releases 3 and 4
    0 - shut down system, power-off if hardware supports it (only available from the console)
    1 - single-user mode, all filesystems unmounted but root, all processes except console processes killed.
    2 - multi-user mode
    3 - multi-user mode with
    RFS (and NFS in release 4) filesystems exported
    4 - multi-user, user-defined
    5 - halt the operating system, go to firmware
    6 - halt the system, reboot to default runlevel
    s, S - identical to 1 except current terminal acts as the system console

    Solaris
    0 - operating system halted; (
    SPARC only) drop to OpenBoot prompt
    S - single-user with only root filesystem mounted (as read-only)
    1 - single-user mode with all local filesystems mounted (read-write)
    2 - multi-user with most daemons started.
    3 - multi-user, identical to 2 (runlevel 3 runs both /sbin/rc2 and /sbin/rc3), with filesystems exported, plus some other network services started.
    4 - alternative multi-user, user defined
    5 - shut down, power-off if hardware supports it
    6 - reboot

    HP-UX
    0 - system halted
    S - single-user, booted to system console only, with only root filesystem mounted (as read-only)
    s - single user, identical to S except the current terminal acts as the system console
    1 - single-user with local filesystems mounted (read-write)
    2 - multi-user with most
    daemons started and Common Desktop Environment launched
    3 - multi-user, nearly identical to runlevel 2 with NFS exported
    4 - multi-user with
    VUE started instead of CDE
    5 - user-defined
    6 - user-defined


    AIX
    AIX does not follow the System V R4 (SVR4) run level specification. It defines run levels from 0 to 9, 0 and 1 are reserved, 2 is the default normal multiuser mode and run levels from 3 to 9 are defined by administrator.
    AIX runlevels
    ID
    Name
    Description
    0
    reserved
    1
    reserved
    2
    Normal multiuser mode
    default mode
    On
    AIX you can check the current runlevel with the following command: $ who -r

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Archive

    Translate this page

     

    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here