LINUX

REDHAT ENTERPRISE LINUX 6.0

Index

S.NO
CHAPTER NAME
PAGE.NO:
1.
LINUX IDEAS AND HISTORY
3-4
2.
Linux Usage Basics
4-5
3.
Running commands
5-8
4.
User And Group Permissions
9-10
5.
Some important directories
10-12
6.
Permissions
12-13
7.
Using Bash shell
13-14
8.
Basic shell script
14-15
9.
Io (input and output) redirections
15
10.
Text processing tools
16
11.
vim editor
16-17
12.
Root password breaking
17
13.
Network configuration
17-18
14.
Create partition
18-20
15.
Printer configuration
20-21
16.
Get help
21
17.
Using GNOME Desktop
21-22
18.
Commands About Network
22
19.
Control The Boot Process
22-23
20.
Run levels
23-24
21.
Linux path
24
22.
Monitor System Resources
24-25
23.
Process Management Tools
25
24.
Register With Redhat Network
25
25.
Manage system software
25-26
26.
Administrator Remote Systems
26
27.
Deploy File Sharing Service
26-28
28.
Web server configuration
28-29
29.
Secure Network Service
29-30
30.
Configuring The General Services
30-32



Linux 5.0 Hardware requirements:
Ø  Intel P-IV Processer or above
Ø  512MB minimum of RAM (1GB required)
Ø  25GB free of HDD space
Ø  VGA Monitor
Ø  Mouse and keyboard
Ø  DVD-ROM with bootable DVD

Linux 6.0 Hardware requirements:
Ø  64 bit operating system it is
Ø  P-IV and above microprocessor
Ø  1GB minimum of Ram
Ø  25GB or above HDD free space
Ø  VGA monitor
Ø  Mouse and key board
Ø  DVD – ROM with bootable DVD




1.     LINUX IDEAS AND HISTORY

What is open source?
Ø  software and source code available to all
Ø  It must be freely distributed
Ø  The ability to modify and create derived works.
Ø  All are free to modify the software

1.      The first Linux O.S released in 1984, the GNU project.
G à GNU
N à not
U à Unix
Ø  Creates open source version of Unix utilities
Ø  Creates the GPL [General Public License]
2.      In 1991 year, Linus torvalds creates open source, Unix kernel and shell, released under the GPL, GNU project utilities.
3.      Now today, it is called as Linux
Ø  Unix utilities + Linux kernel +GNU utilities, all over called as Linux



About Linux:
Ø  Linux is one of the clone [small part] from the Unix
Ø  Backend of Linux is Unix
Ø  Manufactured in AT and T Bell labs
Ø  Open source
Ø  It provides a very huge security
Ø  ext3 file system based in RHEL 5.0
Ø  In Latest RHEL 6.0, ext4 file system
Ø  RHEL -> [Redhat Enterprise Linux]
Ø  In Linux O.S everything is file represented including Hardware.
Ø  In Linux 5 Editors are there
They are
1.      vi editor à it is from Unix O.S
2.      vim editor à vi improved
3.      gvim editor ( graphical vi improved )
4.      nano editor
5.      gedit editor (Graphical edit)
Ø  In Linux O.S, There is no drives like in Microsoft O.S
Ø  What the partitions are while installing the O.S those are call directories



Operating system


                                         Microsoft                                              Unix



                                                               Linux                      Solaris             Aix            Sonic        HP UNIX



                        Redhat         Fedora          Suse                        Ubuntu                     arrya bati



    Redhat Client                           Redhat Server
          Editions                      Editions
            7.x                            RHEL  1.0
            8.0                            RHEL  2.0
            9.0                            RHEL  3.0
            10.0                          RHEL  4.0
            11.0                          RHEL  5.0
                                             RHEL  6.0 (latest)

2. Linux Usage Basics

  Log in to Linux system:
Two types of login screens
1.   Virtual console [text base]
2.   Graphical login [display manager]

Login user name and password
  Here user name: Root
  Password: xxxxxx

Directories:
1.      /
2.      /boot
3.      /home
4.      /tmp
5.      /usr
6.      /var/ftp/pub
Ø  “ / ” means file system
Ø  Linux O.S is case sensitive.
Ø  Kernel, shell are in Linux
Ø  Kernel is nothing but Hardware
Ø  Shell is nothing but software
Ø  In Linux by defaults /bin/bash shell
Ø  In Linux need not to install the antivirus
Ø  RHL[Redhat Linux] it is client O.S
Ø  RHEL[Redhat enterprise Linux] it is server O.S
Ø  If we want to install any third party package, we should have to take .rpm extension 
(rpm à Redhat package manager)
Ø  If we want to install it there is no facility in CD’s, It is from Internet.
Ø  There are six virtual consoles and one graphical console
To go command prompt Ctrl+Alt+F1 to F6
To go graphical prompt Ctrl+Alt+F7

Switching between consoles:
à A typical Linux O.S will run six virtual consoles.
     Ctrl + Alt + F1 to Ctrl + Alt +F6
à A graphical console
       Ctrl +alt + F7
Two desktop environments
1.      GNU network object model environment default Desktop [GNOME]
2.      KDE à Alternate  K Desktop Environment.

Root user:
Ø  Root user is called as “super user“ Account in Linux.
Ø  It is also called as an Administrator
Ø  Root has near complete control over the system
Ø  There are two types of command prompts.
1.   # à root user login
2.   $ à normal user login


3.     Running commands
Basic syntax:
All commands have following the syntax.
Command<>options<>arguments

date: This command is used to display date and time
Syntax: date<>options
Ex: #date

cal: This command is used to display the calendar.
Syntax: cal<>month<>year
Ex: #cal<>4<>1980

If we want to display the calendar page by page
Syntax: cal<>month<>year<>|more
Ex: #cal<>4<>1980<>|more

To display total year calendar
Syntax: cal<>year
Ex: #cal<>1940

pwd: This command is used to display the current working directory
Syntax: #pwd
Ex: #pwd

clear: This command is used to clear the screen
Syntax: clear
Ex: #clear
cat: This command is used to create a new text file in Linux operating system
Syntax: cat<>><>filename
Ex: #cat<>><>ahamed.txt
- - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - - -
To save the data, press Ctrl + d

Again this cat command is used to display the contents of the particular file
Syntax: cat<>file name
Ex: #cat<>ahamed.txt

To append the data in a particular file we can use this cat command.
Syntax: cat<>>><>file name
Ex: cat<>>><>ahamed.txt

To check whether the data is append or not in the particular file
Ex: #cat<>ahamed.txt

To create hidden file in Linux operating system we can use this cat command
Syntax: cat<>><>.filename
Ex: #cat<>> <>.ahamed.txt

ls: This command is used to list the contents of the current directory or specified directory
Syntax: ls<>options

ls<>-a: This command is used to display the file and directories including hidden files also
Syntax: ls<>-a

Blue color : directories
White color : file and normal file

ls<>-l: This command is used to display the files, directories, owner of the file, date and time, file with extension.  It also displays the permissions of the files and directories.
Syntax: ls<>-l
It shows 7 columns information.
Ex:
1
2
3
4
5
6
7
-rw-r--r--
1
root
root
63
may31 12:00
ahamed


ls<>-r: This command is used to display the files and directories with a recursive.
Syntax: ls<>-r
ls<>-il: This command is used to display the in node values of directories and files.
Syntax: ls<>-il

mkdir: This command is used to make a directory
Syntax: mkdir<>directry name
Ex: #mkdir<>ahamed

cd: This command is used to change the directory.
Syntax: cd<> directory name
Ex: #cd<>ahamed

If we want to come out from the directory
Syntax: cd..

To come out from your previous working directory
Syntax: cd

cp: This command is used to copy the file and directories from one location to another location
Syntax: cp<>source<>target
Ex: cp<>/root/ahamed/*<>/root/nnbrothers

mv: This command is used to move the file and directories from one location to another location
Syntax: mv<>source<>targer
Ex: mv<>/root/ahamed<>/root/nnbrothers

This command is also used to rename the files
Syntax: mv<>old file<>new file
Ex: #mv<>ahamed.txt<>nnbrothers.txt

touch: This command is used to create empty file or files
Syntax: touch<>filenames
Ex: #touch<>file1<>file2<>file3

rm: This command is used to remove the file or files
Syntax: rm<>filename
Ex: #rm<>ahamed.txt

rm<>-rf: this command is used to remove the files force fully
Syntax: rm<>-rf<>file name
Ex: #rm<>-rf<>ahamed.txt

rmdir: This command is used to remove the directory
Syntax: rmdir<>directory name
Ex: #rmdir<>ahamed
But the directory must be empty

rm<>-r: This command is used to recursively remove the directory
Syntax: rm<>-r<>directory name
Ex: rm<>-r<>ahamed

who: this command is used to know about that who are logged in the system
Syntax: who
Ex: #who


4.     User And Group Permissions

Ø Every user is assigned a unique user ID number(UId)
Ø UId “0“ identity root
Ø Users are assigned a home directory and program that is run when they login

useradd: This command is used to create a user account  in Linux O.S
syntax: useradd<>name
Ex: #useradd<> ahamed

Passwd: This command is used to set a password to the particular user account
Syntax: passwd<>name of the user
EX: passwd<>ahamed
It is shows
New unique password:
Confirm password:
If we want to create a user account the user will be stored in four places in Linux O.S
They are
1.      /etc/passwd file
2.      /etc/shadow file
3.      /etc/group file
4.      /home directory

1.      /etc/passwd:  This file is used to store the user date base
2.      /etc/shadow: This  file is used to store the user’s password in encryption method
3.      /etc/group: This  file is used to store group account which is primary group
4.      /etc/home: It is maintains all the user home directories, while installing the O.S.  It acts as a partition

Groups
Ø user’s are assigned to groups
Ø Each group is assigned a unique group Id [GID]
Ø Group account data base stored in /etc/group file.
Ø Each user is given their own private group

groupadd: This command is used to create a primary group in Linux O.S
Syntax: groupadd<>group account name
Ex: #groupadd<>marketing

Permissions:
Permissions are 3 types, in Linux
1.   Read
2.   Write
3.   Execute
Three types of persons users
1.   Owner
2.   Group
3.   Others


1
2     3     4
5     6     7
8     9     10
-
File or directory
r      w     -
Users
r     -     -
Groups
r       -       -
Others




5.Some important directories

àA collection of information is called file
àA collection of files is called as a directory
àA collection of root directories is called file system structure


“/ ”


/bin      /sbin     /boot    /home        /var         /mnt           /etc          /dev        /lib       /usr    /proc     /root


/bin: It is used to store user commands
Ex: #cd<>/bin
1. touch command
2. tar command
3. umount
4. vi editor
5. date
6. cat
etc…

/sbin: It is used to store many of the system commands
Ex: cd<>/sbin
1. shutdown
2. fdisk
3. tune2fs
4. chkconfig
5. e2lable
etc…

/root: It is used for super user account.  It is Important home directory for root
Ex: cd<>/root
1. Desktop directory
2. anaconda file
3. install.log

/boot: It contains operating system boot process.  It contains the kernel and other files used during system startup.  It contains operating system boot loader[GRUB]
Ex: #cd<>/boot

/mnt(mount): This directory contains the mount point for the file system.  This directory is empty
Ex: DVD writer accessing
#mount<>/dev/dvd<>/mnt

/lib( library ): It contains many library files used by the system
Ex: #cd<>/lib
1.   libsepol.so.1
2.   libssl.so.0.98b
Note:lib files we can’t modify

/etc: this directory is important, contains system configurations
Ex: #cd<>/etc

/var(variable): this directory contains details about variable files, such as log file, mail files etc…
Ex: #cd<>/var
1.   log directories
2.   games directories
3.   tmp directories
4.   etc..

/usr: It contains file and directories directly relating to the user of the system
Ex: #cd<>/user
1.   bin directory
2.   etc directory
3.   lib directory
4.   etc

/proc(process): This directory is used to maintain the PID values [process identification]
Ex: #cd<>/proc
1.   1
2.   10
3.   109
4.   11
5.   etc

/dev (device): It stores the device information about the total hardware components of the particular system
Ex: #cd<>/dev
1.   audio
2.   bus
3.   disk
4.   fd
5.   net
6.   etc..


/home: It maintains the user home directories while installing is a partition. Now it is a home directory after installation.
Ex: cd<>/home
It shows the directories of users.

6.     Permissions

In Linux there are three types of permissions
1.   read permission
2.   write permission
3.   execute permission

In Linux two types of changing permissions
1.   symbolic method
2.   numeric method

chmod: This command is used to assign the permissions to the particular file or directories
syntax: chmod <>[symbolic method/numeric method]<>file name

symbolic method:


Who may be
Operator may be
Permissions may be
u -> user or owner
g -> group
o -> others
a -> all three categories
+ -> add permission
- -> remove permission
= ->assign permission
r -> read
w -> write
x -> execute


Numeric method:
User is a 3 digit mode numbers
Ø first digit specifies owner’s (user) permission
Ø second digit specifies group permission
Ø third digit specifies other’s permissions
Permissions are
4 -> for read operation
2 -> for write operation
1 -> for execute operation

Ex:

1
2      3      4
5      6      7
8      9      10
-
r      w      
u
r       -       -
g
r       -        -
o


Now
r = 4
w = 2
x = 1
If we want to give the execute permissions to user, it will happen like this
4+2+1=7
Ex: chmod<>741<>filename

7.     Using Bash shell

In Linux 5.0, 6.0 by default shell name is “bash shell”.  It acts as user interface.
Ø Shell is nothing but software
Ø Kernel is nothing but hardware

It provides environment like settings path, home directory etc …
It provides best path like commands.
There are 4 types of features in the “bash shell”
1.   History
2.   Alias
3.   Name completion
4.   Display command

history: this command is used to see the list of remembered commands.
Syntax: history
Ex: #history

alias: this command is used to put a duplicate name to the particular command.
Syntax: alias<>aliasname<>=command
Ex: #alias<>c=clear

Name completion: In Linux O.S well support to name completion of the absolute path
Syntax: cd<>filename+tab

Display command: use up and down arrow keys, it displays previous commands.

8.     Basic shell script
Shell scripts are text files, contains series of commands are statements to be executed shell scripts are useful for
Ø Auto mating commonly used commands.
Ø Performing system administration.
Ø Creating simple applications
Ø Manipulation of text or files

Step-1:
Use vim editor to create text files, give the file name with .sh extension
Syntax: #vim<>iiht.sh
Press “ i “ to insert mode
type it
#!/bin/sbin
echo “the current date and time are $(date)”
echo “the current month and year calendar $(cal)”
To save it, press esc:wq
Step-2:
 To make this file script to execute give permission
Syntax: #chmod<>u+x<>iiht.sh

Step-3: to view this script
Syntax: #./iiht.sh

Change host name:
In Linux to change host name (system name) follow this
Syntax: #vim<>/etc/sysconfig/network
Press “ i “ to insert mode
Host name =system1 [change by our wish]
To save it press esc:wq

9.     Io (input and out put) redirections

There are three types of input and out put [io] redirections operators in Linux O.S
1.   Standard input [STD in]
2.   Standard output [STD out]
3.   Standard error [STD rr]

Standard input: In Linux redirect standard input was “ < “ operator.  In this standard input we can use “ tr “ command will be taken their input from a file.  If  “ 1 “ is given ad an argument.
Ex:
1.   #cat<>><>ahamed.txt
hai this is linux 6.0
To save it press ctrl+D
2.   #tr<>’a-z’<>’A-Z’<><<>ahamed.txt
It shows
HAI THIS IS LINUX 6.0.

STANDARD OUTPUT: In Linux standard output operator is “ > “
syntax: command<>><>filename
ex: create empty file
1.   #touch<>file1
2.   #ls<>-l<>><>file1
3.   #cat file1
Standard error: In Linux the standard error redirecting operator is “ 2> “.
Syntax: command <>2>file name
Ex: #cat<>redhat
It shows,
file not fount error message when file was not in
1.   Create empty file
#touch<>file
2.   Cat<>redhat
3.   #cat<>redhat<>2><>file
4.   #cat<>file

10.                        Text processing tools

head: This command is used to display the first ten lines of a file
Syntax: head<>-n<>no. of lines<>filename or path
Ex: #heat<>-n<>3<>ahamed.txt<-

tail: This command is used to display the last ten lines
Syntax: tail<>-n<>no. of lines<>filename

wc(word count):
It is used to count the words, lines bytes and characters.
Syntax: wc<>options<>filename
1.   #wc<>ahamed.txt<-
2.   #wc<>lwc<>ahamed.txt<-
L -> lines
w -> words
c -> characters

aspell: This command is used to interactively spell check the files
syntax: aspell<>check<>filename

11.                        vim editor
A new version of “ vi “ editor, the standard Unix text editor.
Vim -> vi improved
Advantages:
Ø Do more with fewer key stocks.
Ø No dependence on mouse
Syntax: vim<>file name
Ex: #vim<>ahamed.txt<-

In vim editor, there are three main modes.
1.   Command mode
2.   Insert mode
3.   Execute mode
To modify a file
(insert mode) “ i “ begins insert mode at cursor so that you can type the data.
“ A “ -> append to end of line
“ I “ -> insert at beginning the line
“ o “ -> insert new line [below]
“ O “ -> insert new line [above]
Saving a file and existing :
Press esc key -> :w <- [for writes the file to disk]
Press esc key -> :wq <- [for write and quit ]
Press esc key -> :q! <- [quits, even if changes are lost]
Manipulating text commands in “ vim “ editor :
Press “ esc “ key and then type it

Name
Change
Delete
Copy
Line
Letter
Word
Paragraph above
Paragraph bellow
cc
cl
cw
c{
c}
dd
dl
dw
d{
d}
yy
yl
yw
y{
y}


12.                         Root password breaking
Restart the computer and keep pressing “down arrow“  key.
Ø Select the operating system, press “ e “ (edit)
Ø Select second option, press “ e “
Ø Give space and type “ 1 “, press “ enter “
Ø Press “ b “ (boot)


13.                        Network configuration

Network addresses


                                         Physical                                                         logical

                                     MAC address                                    IP address
                                         
                                      48 bit length                                
It is totally hexa decimal code              Static IP        Dynamic IP

                  Fixed by LAN adaptor.                        manually assigning IP  DHCP provides IP


In CUI:
System-config-network: This command is used to assign the ip address to the particular system
Syntax: #system-config-network<-
After type this command
Select Eht0 device -> enter
                           -> fallow the steps
In Linux net mask will be as subnet mask in Microsoft

Service-network-restart: This command is used to start the network services.
Syntax: #service-network-restart<-
Eth -> Ethernet
Eth0 -> on board
Eth1 -> additional
Process: #system-config-network<-
Select Eth0 device -> press “ enter “<-
Now it will show, one configuration table, then follow the steps like this
Divert configuration
Name: eth0
Device: eth 0
Use DHCP: [*]->[remove the as trick, press space bar]
Static IP: 192.168.1.1
Net mask: 255.255.255.0
Default gateway:

Ø Press [tab] key, to select [ok]
Ø Again press [tab], quit
Ø Enter
Ø Command [#service-network-restart]
Ø Enter
Ping: This command is used to check the connectivity of the system
Syntax: #ping<>ip address
Ex: #ping<>192.168.1.2<-

14.                        Create partition

fdisk: This command is used to create a partition and deleting partition on the particular Linux system
Syntax: fdisk<>option
Ex: #fdisk<>-l<-
It shows details about devices in their
Example total cylinders -> 82699 [ex only]
Last device endpoint -> 80194
There is “2505” free space available
To create partition: follow the steps
step-1:
 #fdisk<>-l<-
See the details, if free space is available then
#fdisk<>/dev/sda<-
Command: n<-
First cylinder [57432-82700, default 57432] <-
Last cylinder <-
Command: w<-
Step-2:
#fdisk<>-l to view our new partition
Step-3:
#partprobe ->(it is only in RHEL5)
[In RHEL 6, the command is #kpartx<>/dev/sda]
To restart the partition tab
Step-4:
 #init<>6<-
To restart the computer
Step-5:
To format the partition to access [compulsory do it]
#mkfs<>-t<>ext3<>/dev/sda10<-
ext3 ->our file system RHEL5
ext4 -> file system supported in RHEL6, ext3 also supported [ our wish ]
/dev/sda10 -> it is our new creating partition number
Step-6:
create a directory to make mount to partition to we access
#mkdir<>/redhat [ give “ / “ before the name of directory ]
#mount<>/dev/sda10<>/redhat<-
again to see
#mount <-
Step-7:
Go to the file system table to permanent the mount partition  [device]
#vim<>/etc/fstab<-
Go to the last line, press  “i“ to insert mode
Now type it
/dev/sda10 press “ tab “ /redhat press “ tab” ext3 press “ tab “ defaults press “ tab “ 0 press “ space bar “ 0<-
Save it esc:wq<-
#mount<>-0<>remount<>/dev/sda10 or /redhat<-
Step-8:
Now to conform this device is as permanent device
#cd<>/redhat<-
It shows [last + found ] directory.  Now it is permanent device [partition]

To delete the partition:
Step-1: #unmount<>/redhat<-
Step-2: #vim<>/etc/fstab<-
Press “ i “
Delete the last line
Save it, esc:wq<-
Step-3: #rm<>-r<>/redhat<- [to remove the directory]
Step-4: #fdisk<>/dev/sda<-
Command: d<-
Partition (1 – 10): 10<-
Command: w <-
Step-5: init<>6<- [restart the computer]

15.                        Printer configuration
Go to GUI mode
Select system -> administration
->printing
->click new printer
->give the printer name
->click forward
->lpt port [line printer terminal]
->click forward
->printer selection Ex:(HP)
->click forward
->model number Ex:[deskjet 660c]
->click forward
->apply
->now select our printer
->click make default printer
If we want to make this system a printer server, now follow the steps
ð  Select server settings
ð  It shows some options
ð  Select all
ð  Apply
Printer commands:
lpq: This command is used to display, whether the printer is ready to install or not
Syntax: lpq<-
(view the contents of the print queue)

lpr: This command is used to sends a print job to the printer queue to be print.
Syntax: lpr<-
Ex:lpr<>-p<>linux printer<>-#5<>Prasad.txt<-
lpq<- (to check the print queue)

lprm: To remove the print jobs from the queue
Syntax: lprm<>job number<-
Ex: #lprm<>1<-
If we want to remove the print connection then go to the [GUI]
Click system -> administration
-> Printing
-> Select the printer
->Click delete
In command prompt
System-config-printer<-
[to view the wizard of printer configuration]
Printer configuration data is stored in /etc/cups/printer.conf
To open this 
#vim<>/etc/cups/printer.conf<-
Cups: -. Common UNIX Printer
16.                        Get help
Many soft help, here in Linux O.S
Command prompt:
1.   whatis: To display  the shortcut description about particular command
Syntax: whatis<>command
Ex: #whatis<>cat<-
2.   --help: To display the summary of particular command
Syntax: command<>--help
Ex: #cat<>--help<-
3.   info: To gives the information about particular command.
Syntax: info<>command
Ex: #info<>cat<-
4.   man: The “ man “ command is used to provides a full of documentation for the particular command
Syntax: man<>command<-
Ex: man<>cat<-
In GUI click on system menu-> click help

17.                        Using GNOME Desktop
GNOME -> GNU network object model environment
Ø GNOME is the powerful default graphical desktop environment for redhat enterprise Linux
Ø It provides an integrated, attractive desktop for users and developers on top of the graphical environment provides by (X Windows system)
Ø X windows system called as display manager
Ø In Linux system administration is known as for the power and flexible of command line interface
Only

18.                        Commands About Network
1.   System-config-network: -> To assign ip address
2.   ifconfig-> To display the network configuration
#ifconfig<>|more<-
3.   ifdown-> To display the network adaptor
#ifdown<>eth0<-
4.   ifup-> To enable the network adaptor
#ifup<>eth0
5.   service-network-restart: After assigning ip we must have to restart the service
#service-network-restart<-
6.   Global network setting:
#vim<>/etc/sysconfig/network<-
To change host name
Device and networking settings are stored in
#vim<>/etc/sysconfig/network-scripts/ifcfg-eth0<-
In this configuration file, we can change network address also
arpa<>-a: To display the MAC address of other network system
Ex: arpa<>-a<>192.168.1.20<-
If our system ip is 192.168.1.10<- (same network)
In GUI
Click  -> system
->administration
->network
19. Control The Boot Process

Boot loaders


                                        Lilio                                              GRUB
                              (Linux loader)                          (grand unified boot loader)

lilo: A boot loader is a small program that exits in the system and loads the operating system in to the system’s memory (RAM) at system boot
lilo is a flexible boot loader for Linux which is independent of a file system

MBR(HDD has)
Small logical program
Fixed by manufacture of HDD in logical circuit board
lilo loads computer memory in two stages
Stage-1:
Ø Iit is called as primary boot loader
Ø It checks the “ BIOS “ wither the “ HDD “ detected or not
Ø And will be check the MBR and loads in to the memory
Stage-2:
Ø It is called as secondary boot loader
Ø It reads into memory and display the redhat entraprise linux screen
The configuration file was /etc/lilo.conf
GRUB:
It provides the bridge in the boot process between the hardware and Linux kernal
In the Linux GRUB stage supports 446 bytes of disk space.
The boot loader will be stored in /boot partition
GRUB configuration file was stored in /boot/grub/grub.conf
Making presentence grub changes:
Comment line begins with the symbol [#]
ð Default = number, number is the default boot stanza
ð Timeout = number, it specifies how long the O.S countdown occurred
Note: when our the configuration of grub is edited or modified there is no need to restart the grub or computer
20.Run levels
The run level determines which service are started automatically on your Linux system
Init<>1 -> To login as single user mode
Init<>2 -> To login as multi user mode without network supporting
Init<>3 -> To login as multi user with network support
Init<>4 -> Not used
Init<>5 -> Graphical login mode
Init<>6 -> system restart
Init<>0 -> System shutdown
The configuration file of run levels is /etc/init/tab<-

Manage files from the command line:
Linux file hierarchy concepts:
1.   Files and directories are organized into a single-root  inverted tree structure
2.   File system begins at the root directories, represented by a “ / “ (forward slash )
3.   Name are case sensitive
4.   Path are delimited by “ / “
ex: /hom, /boot, /tmp etc

Graphical navigation
Command line equivalent
1.      Click from folder to folder to move around
2.      Open a folder to view its contents
3.      List of folders in the location bar
1.      Cd<>[directory name]
2.      Ls<>[directory]
3.      pwd

21. Linux path
There are two types of paths in Linux operating system
1.   absolute path
2.   relative path
absolute path :
Ø Begins with forward slash
Ø complete “root map” to file location
Ø can be used anytime you wish to specify a filename
relative path:
Ø Do not begins with slash
Ø specify location relative to your current working directory
Ø can be used as a shorter way to the specify file name

22. Monitor System Resources

process scheduling:
The “cron” mechanism is controlled by a process named “crond”.  This process runs every minute and determines if any entry in used cron table need to be executed.
Command: crontab
Syntax: crontab<>-e<-
Ex: # crontab<>-e<-
Crontab fileds:
Minute           0-59
Hour              0-23
Day of month            0-31
Month                        0-12
Day of week  0-6 ( Sunday)
Crontab<>-l: To show the crontab details
Crontab<>-r: To remove the crontab list

23. Process Management Tools

The GNOME system monitor is a utility which make it easy to observe which process are running on the system and what resource they are currently running
Desktop   -> right click
-> open terminal
-> #cd <-
#gnome-system-monitor<-
Or
Click applications   -> system tools
         ->system monitor
In system monitor
System, process, resources, file systems are the options in this

24. Register With Redhat Network

Redhat network is centrally managed service that makes it easy to display software and software updates to RHEL systems and to remotely managed and monitor those systems

click system -> administration
          ->RHN
25. Manage system software

Command: rpm<>-ivh
This command is used to install the redhat packages on the particular Linux system.
Syntax: #rpm<>-ivh<>package name
i -> install
v -> verbose
h -> percentage of installation
Ex: login to root
#rpm<>-ivh<>vsftpd-2.2.2-6.e/6.i686.rpm<-
To uninstall the package:
Click system -> administration
->add/remove programs
->click continue any way
->click on all packages
->search our software which we want to remove
->remove tick mark
->apply
->click remove
->ok
->close
In command rpm<>-e<>package name to uninstall

26. Administrator Remote Systems

1.   ssh(secure shell): This command is used to connect the systems remotely
Syntax: ssh<>other system ip
Ex: #ssh<>1.0.0.2<-
2.   scp(secure copy): This command is used to copy the file or directories through network

                    192.168.1.10              192.168.1.20



                                                                                   Root 1 packages
                   System 1                       System 2

Login to root user
In system – 1:
Create new directory to store packages
#mkdir<>packages<-
#scp<>192.168.1.20: /root/packages/*<>/root/packages

27. Deploy File Sharing Service

FTP server configuration (FTP): The file transfer protocol is one of the oldest network protocols still in common use on the internet.  It provides a simple way for systems to transfer files to and from a remote server over the network
There are four steps for deploy a network FTP service
1.   Package install
2.   Start the service
3.   Enable the configuration
4.   We can use firefox browser or command line
Package name : vsftpd
Service name : vsftpd
Port number : 20,21

               192.168.1.10                              192.168.1.20




         System 1                                   System 2

System-1:
Login into root user account #cd<>packages<-
#rpm<>-ivh<>vsftpd…..rpm<-
When we install the package, configuration file also installed automatically
To open the configuration file
#vim<>/etc/vsftpd/vsftpd.conf<-
Then we check 12th line in configuration table
Anonymous<>enable=yes
Save it, Esc :wq<-
To put some data that what we want to show to others
#cd<>/var/ftp/pub<-
Create one or more directories or not.  (It is our wish )
#mkdir<>RHEL6<-
#cd<>RHEL6<-
#cat<>><>linux.txt<-
- - - - - - -
- - - - - - -
-- - - - - - - <-
Save it , Ctrl+d<-
To check config
#chkconfig<>vsftpd<>--list<-
#chkconfig<>vsftpd<>on<-
#service<>-vsftpd<>restart<- (2time)
And, do FTP firewall on
System-2:
Check the communication in between system 1and System 2
#ping<>192.168.1.10<-
#ftp<-
It shows
ftp>
then type ftp>0<>192.168.1.10<-
type, anonymous <-
#ls<-
Cd<>pub<-
#ls<-
It shows the directories
RHEL6
To download files
Get<>linux.txt<-(file name)
To exit type, quit<-
To check the downloading file in our system in root
#ls<>-l<-
28. Web server configuration
Display a web server:
Package name: httpd
Service name: httpd

   192.168.1.10                               192.168.1.20




         System 1                                   System 2

System-1: login  into root user
Step-1:
#cd<>packages<-
#rpm<>-ivh<>httpd-------.rpm<- (4 packages are compulsory install)
To check the information about packages are installed or not
# rpm<>-q<>package name
Step-2 : Now create a web page
#cd<>/var/www/html<-
#vim<>index.txt [compulsory type [index.txt] only]
Press “ i “ to insert mode
<html>
<head>
<body bgcolor=”blue”>
<font size=”12”>
Font color=”red”>
<marqueue>
Hai this is NN brothers
</marqueue>
</font>
</body>
</head>
</html>
Now open the configuration file
#vim<>/etc/httpd/conf/httpd.conf<-
Press “i” to insert mode
Now type it
<VirtualHost<>192.168.1.10>
Press “enter” and also press “tab”
Type it
Server admin<>192.168.1.10
Enter + tab, type it
Document root <>/var/www/html
Enter</virtual host>
After completing configuration start service
#chkconfig<>httpd<>--list<-
#chkconfig<>httpd<>on<-
#service<>httpd<>restart<- (2times)
Now go to GUI
è Applications
è Internet
è Firefox
è Now type
è (http://192.168.1.10)
è Enter
Note: after completing service
Click system
->administration
->firewall
->you can select trusted service
->www (select)
->click apply
Then you get the service

29. Secure Network Service

Activate And Deactivate Firewall Protection:
In Linux firewall are names as (ip tables)
Where there are many independent layers of security policy.  In Linux the firewall is a layer of protection implanted by the kernel which sits between network application and the network.
The firewall can easily  managed using  system -> administration ->firewall
Or
In command prompt
#system-config-firewall<-

SE linux with ssl:
(ssl) -> (security Shell layer)
Note: web server must be run in the system (http)
Security Authentication:
Can access the website with user name and password only
Step-1
Ø #cd<>/var/www/html<-
Ø #vim<>.htaccess<-
Press “ i “ to insert mode
Type it
auth name<>”only for members”<-
auth type<>basic<-
auth userfile<>/var/www/html/.htpasswd<-
require<>valid-user
Save it esc:wq<-
Ø Create one user and exist user
->useradd ahmed<-
->passwd ahamed<-
To create password for the web site
#htpasswd<>-cm<>/var*www*html/.htpasswd<>ahamed<-
Ø To open the configuration file
#vim<>/etc/httpd/conf/httpd.conf<-
Go to the last line, type it
<directory<>/var/www/html>
auth name  “secret stuff”
auth type basic
auth user file /var/www/html/.htpasswd
Require valid-user
</directory>
Save it, esc:wq<-
30. Configuring The General Services
Secure access to remote desktop:
While many date centers, will standardize on ssh [secure shell] for remote administration of Unix and Linux system[it is in command line]. Some will use VNC [virtual network computing] for remote administration for networking.
Redhat enterprise Linux 6 supports the implementation of VNC server, that can allow one or more remote graphical desktop . This can also found by
Click -> applications
->Internet
->tigervnc viewer
If it is not available, then install the packages
#rpm<>-ivh<>tigervnc<-
After installing the packages the configuration file was
#vim<>/etc/sysconfig/vncservers
To enable the remote desktop
System->preference
 ->remote desktop
 ->select allow other users
 ->select password
 ->apply

VNC Server Configuration

   192.168.1.10                               192.168.1.20




         System 1                                   System 2

System-1: go to GUI
Desktop->right click
->open terminal
#cd<-
#cd<>packages<-
#rpm<>-ivh<>tigervnc-1----------.rpm<-
#rpm<>-ivh<>tigervnc-2----------.rpm<-
Create two user accounts
#user add<>ahamed<-
#passwd<>ahamed<-
Redhat
#user<>Prasad<-
Passed<>Prasad<-
Redhat
To open the configuration file
#vin<>/ect/sysconfig/vncservers<-
Goto the last line, type it
VNCSERVERS=2:prasad<>/:ahamed
VNCSERVERARGS[1]=”-geometry 800*600”
VNCSERVERARGS[2]=”-geometry 800*600”
VNCSERVERARGS[2]=”-localhost”
Save it esc:wq<-
Now, to set the VNC password for the particular user i.e., ahamed, Prasad
#su - prasa<-
$vncpasswd<-
Redhat123
$exit<-
#su - ahamed<-
$vncpasswd<-
Redhat123<-
$exit<-
#chkconfig<>vncserver<>--list<-
#chkconfig<>vncserver<>on<-
#service<>vncserver<>restart<- (2times)
System-2: Goto GUI
Open terminal
#vncviewer <>-via<>prasad@192.168.1.10<>localhost:2<-
It shows, are you sure you want (yes/no): yes
Prasad@192.168.1.10 passwd : redhat<-
vnc password : redhad123

No comments:

Post a Comment