Friday, 18 March 2011

Reduntancy Array of Independent Devices

RAID-Reduntancy Array of Independent Devices:

-- to backup the data in secondary storage devices. -- it have a Software RAID: .It allows to combine several disk into a larger RAID devices. .A RAID devices can be configured to provide additional speed and reliabiliy. it compared to using an individual drive.

Logical Volume

Logical Volume:

--> To Create LVM partitions are using [8e]
--> Physical Volume Creation
--> pvcreate devicename1 devicename2..
Example:
# pvcreate /dev/hda10 /dev/hda11
# pvcreate /dev/sda10 /dev/sda11 [sata hard drive]

--> Volume group creation
--> vgcreate volumegroupname devicename1 devicename2
--> logical volume creation
# lvcreate -L size -n lv1 vg

To Create a file system:

mke2fs -j /dev/vg/lv1

mount /dev/vg/lv1 /data

/etc/fstab
--- /dev/vg/lv1 /data auto default 1 2


To extend a Logical Volume:

lvextend -L +200m /dev/vg/lv1
mount -0 remount /dev/vg/lv1

To reduce Logical Volume:

lvreduce -L -100m /dev/vg/lv1
mount -o remount /dev/vg/lv1


To Check:

ext2online /dev/vg/lv1 [in el4]

or
resize -t /dev/vg/lv1 [in el5]

Cron Tab

Cron Tab:

-->to execute a command for particular time.
#crontab -u username -e
Example:
#crontab -u root -e

min hr day of month month day of week
01 20 22 08 08

Example:

tar -cvf /root/backup/home /home
service crond restart


crond -l
-->it will be displayed to what information available in crond file.

Shut down to the Machine at Everyday:
min hr day of month month day of week
01 20 * * *
/sbin/init 0
service crond restart
service crond on



Note:

Package Name: crontaps

User Quota

User Quota:

--> to set a limited storage file system.Its called user User systems.
vi /etc/fstab
to set hard disk or particular user --> Userquota, defaults


Group Quota:

--> to set a limited storage file system.Its called Group quota systems.
vi /etc/fstab
to set hard disk or particular user --> groupquota, defaults

Remote Installation

Remote Installation:

It means to get from the server data [linux system file system] to install
in client machine thru YUM Method
Procedure:
--> First a copy to all that linux cd to store in a server.
--> Share the folder to nfs thru vi /etc/fstab 192.168.1.1/16
--> In client system first bootable cdrom, give cd to install such as
linux askmethod
--to give client IP address and gateway
Manual TCP/IP Configuration:
-- IPV4 address 192.168.1.1/16
-- gateway 255.255.255.0
--Name Server
--> give path with server ip address
--> nfs setup
NFS server name 192.168.1.240[to give whether ip address or name.]
Directory of server. [path]
then click to ok button.

Example: # Vi /etc/yum.respoes.d/rhel
-- ftp://server1.example.com/pub/server
-- ftp://server1.example.com/pub/updates

# yum install dialog (it is a package name)

# yum install kernel *(it is a package name)

Remote System:
To logon the remote system. It is centralized the data in network. Its also called VPN.
VPN:
Virtual Private Network, Those who are system want to connected to server in a network.It
is possible to login any one system in online thru VPN.

Firewall

 Firewall:

Definition:
Firewall means that to protect from the several processing into a server.
Here firewall as a IPTABLES.
IPTABLES-Firewall:
iptables -L --> list out the entries
iptables -L --> flash the entries
iptables -L --> adding the new role
service ip tables save
-p --> specify protocols
-s --> source ip address
-d --> designation ip address
--sport --> source port address
--dport --> designation port address
--j --> applying the policy

ACCEPT --> allow
REJECT --> deny
DROP --> Temporary stop.

Example:
#iptables -A INPUT -P ICMP -s 192.168.0.0/24 -d 192.168.0.1 --j drop
- do not to ping the server ip to any system in a network.




Note:
vi /etc/sysctl.conf
line no 7 and 13 --> to change 0 to 1. both of it.
Don't to forgot to change the configuration file.
once time when am i used that method, that time i forgot to configured.

Network Information System

Network Information System:

TO SET IN A SERVER SIDE:
Nis Domain Name: RHCE
-->vi /etc/sysconfig/network
nisdomain=RHCE;
service ypserv restart or reload[in real time]
service portmap restart or reload[in real time]


chkconfig ypserv on
chkconfig portmap on

mkdir /rhome
vi /etc/default/useradd
--home=/rhome
--> to create user
service nfs reload
service portmap reload

chkconfig nfs on
chkconfig portmap on

vi /etc/exports
--/rhome(rw,sync)
-->/usr/lib/yp/ypinit -m

chkconfig ypserv on
chkconfig yppasswd on

TO SET IN A CLIENT SIDE:
-->go for->NETCONFIG-> QUTHCONFIG->ENTER
mkdirypcat passwd
mkdir /rhome
--> vi /etc/auto.master -- /rhome /etc/auto.misc
--> vi /etc/auto.misc
--username -rw,soft,info 192.168.1.1/r/r...




Note:
SERVER Package Name: yptools,ypserv
CLIENT Package Name: autofs,bind

Thursday, 17 March 2011

Network File System

NETWORK FILE SYSTEM[NFS]:



--> To sharing the data between two system in a network.
--> To share the resource in between unix family.
install package.
configure the file.
activity the service.
vi /etc/exports source machine
Example:

media/sda7 192.168.1.1/16(rw,sync)
--> service nfs reload
--> service portmap reload




Note:
Package NAme: nfs, portmap
exportfs -r --> to re-exports the nfs.


Domain Name System[DNS]

Domain Name System[DNS]:



Definition:

It is a service and it translate to human readable domain name to ip and vice versa.
DNS server name contain webserver name & IP.
home ____ ISP ____ DNS _____ webserver
Virtual Hosting:
one IP contains more than one names. Its called website.
Example:
linux.com[website],IP 192.168.0.65
-it will register to DNS.
SERVER CONFIGURATION FILE SYSTEM:

#/var/named/chroot/etc
#vi named.conf
zone "linux.com In {
type master;
file "nita.zone"
}
To create DB file name:[linux.zone]
cd /var/named/chroot/var/named
cp localdomain.zone linux.zone
vi linux.zone
localhost root {
system4

IN ANS [localhost] system4


linux.com IN A 192.168.0.65 [web server name]

}

CLIENT CONFIGURATION:

Then Next Step:
vi /etc/hosts
192.168.0.0/16
vi /etc/resolv.conf
nameserver 192.168.0.4 assign DNS address
dig linux.com
vi /etc//httpd/conf/httpd.conf
go for last line.

Document Root /var/www/html
ServerName system4

Virtual Host:
More then one web server to be formed. It's called virtual host.




Note:
Package Name:
Server side:named
Client side: httpd

Tellnet

Tellnet:

- For remote login from windows to linux and not vice versa.But can also linux to linux



Configuration:
vi /etc/xinetd.d/telnet
disable= no

# service xinetd reload
# chkconfig xinetd on
testparm --> to view the share user's.

Note:
Package Name: xinittelnet
Service Name: xinetd

Remote Login

REMOTE LOGIN:


-- To connect witha network system in same operating system(os-linux) family.
Configuration:
--> vi /etc/xinetd.d/rlogin
--dsiable='no'
service xinetd reload
chkconfig xinetd on




Note:
Package Name:xinetd.d
Service Name:xinetd

Basic and Advanced Linux Command

Basic and Advanced Linux Command:


--> To transfer the file from source to desination machine
Purpose:
Download(Source to desination)
Upload(Desination to source)
#vi /etc/vsftpd/vsftpd.conf
#setsebool -P allow_ftpd_full_access 0

#service vsftpd reload
#chkconfig vsftpd on


Note: Package Name:vsftpd

DHCP[Dynamic Host Configuration Protocol]

DHCP[Dynamic Host Configuration Protocol]:

--> to assign IP address automatically
Step:
#/usr/share/doc-3.0.5/dhcpd.conf copy to vi /etc/dhcpd.conf
Install Package
rpm -ivh dhcp
t0 configuration file
vi /etc/dhcpd.conf
activate the services
service dhcpd restart
Open to Configuration file:
range subnetmask netid
192.168.1.1 to 192.168.1.248 255.255.255.0 192.168.1.240

--> To Manually assign to IP for which system you need to assign as a Server Machine.




Note:
        Package Name:dhcpd

TCP/IP [Transmission Control Protocol&Internet Protocol]

TCP/IP [Transmission Control Protocol&Internet Protocol]:

Definition: It is used for Communicating the system in a network. It means set of rules. Actually TCP/IP was designed for unix family but it will be support for all type of operating system. So it is a platform independent. It's called Internet Protocols. Its Control mainly IP address. Two types of ADDRESS:
software address: It's a network IP address , 32-bit address.
Hardware address It's a network MAC address , 48-bit address.


                                                            
                                                                                                                                                                                                                                                 IP    MAC
Assigned by Administrator    Assigned by Manufactured concern.
It means nic[network interface card]
Temporary address.    Permanent address
Example: Router Identification.

Software IP address: It's a 32-bit address. It's caontain four octal-bit

8       8       8       8
w       x       y       z

--to identify amachine in a network.

W min value 0000 0000
W max value 1111 1111

Types of Classes:               Range

CLASS A
                             0-126       127 as aloop backup.It's means that controlling the network devices.
CLASS B                             128-191
CLASS C                             192-223
CLASS D                             224-239
CLASS E                             240-255





CLASS A
IP Address Contains two parts Net ID Host ID

8       8       8       8
w       x       y       z
|
|
/
W as a Net ID        then another x,y,z as a Host ID.

Types of Octal ID:               Range

W                                                  0-126
X                                                   0-255
Y                                                   0-255
Z                                                   0-255





CLASS B
IP Address Contains two parts Net ID Host ID

8       8       8       8
w       x       y       z
|______|
     |
     |
    /
W ,X as a Net ID   Y,Z as a Host ID.

Types of Octal ID:               Range

W                                                  0-126
X                                                   0-255
Y                                                   0-255
Z                                                   0-255





CLASS C
IP Address Contains two parts Net ID Host ID

8       8       8       8
w       x       y       z
|__________|
        |
        |
       /
W ,X,Y as a Net ID        Z as a Host ID.

Types of Octal ID:               Range

W                                                  0-126
X                                                   0-255
Y                                                   0-255
Z                                                   0-255





CLASS D

IP Address Contains two parts Net ID Host ID

8       8       8       8
w       x       y       z
|_______________|-->         W X,Y,Z as a Net ID.

Types of Octal ID:               Range

W                                                  0-126
X                                                   0-255
Y                                                   0-255
Z                                                   0-255





CLASS E

--Its a Reserved for future Purpose Only.



Note: Netbeu was designed for windows family. IPx/SPx was designed for Novell Network.

RedHat Package Manager

RedHat Package Manager:

To install a package
To delete a package
To overrite a package
To verify a package
#rpm option packagename
Example:
rpm -ivh kernel*

i- for install [install the prticular package]
v- for verbose[to process will dsiplay on the screen]
h- for hash[to display the symbol ###]

Overrite the package[already installed]:
#rpm -ivh --force package name
Example:
#rpm -ivh --force vsftpd

verify the package:
#rpm -qa

Remove the package:
# rpm -e package name
Example:
# rpm -e vsftpd

To avoid dependency:
# rpm-ivh -nodeps dhcp

delete but we don't package name:
# rpm -qa| grep vsftpd
-- to display all vsftpd files.

Storage Management:

Storage Management:


Hard disk:
It contains two main part.
IDE
sata

IDE:
/dev/hda ----> It's a Primary Master Partition.
/dev/hdb ----> It's a Primary Slave Partition.
/dev/hdc ----> It's a secondary Master Partition.
/dev/hdd ----> It's a secondary Slave Partition.

SATA:
/dev/sda ----> It's a Primary Master Partition.
/dev/sdb ----> It's a Primary Slave Partition.
/dev/sdc ----> It's a secondary Master Partition.
/dev/sdd ----> It's a secondary Slave Partition.

To view Harddisk Information:
#fdisk -l

To Enter the Partition into a harddisk:
fdisk /dev/hda or for sata fdisk /dev/hda

command P-partition information
hda1 Partition name in linux c: in windows
hda2 Partition name in linux d: in windows
. .
. .
. .

To create the new partition:
New partition Command for create n
size +1024 [1 GB].
-To save and exit the partition using w.

To Create a File System:
#mkfs -t file system name device name
MKFS - Making File System.
ext3 - extended 3 in el5.

Example:
# mkfs -t ext3 /dev/hda8

Difference Between ext2 and ext3:
ext2 - do not support the data recovery.
ext3 - support data recovery.

To Access the partition:
#mount -t ext3 /dev/hda8 /hard8
-- you create the files and it will be automatically to stored into a hard8.

To Delete the partition:
Command delete for d
to be delete for particular linux partition[when you are selected that partition.]




Note:
save and exit: wq
without save: q

Printer management:

Printer management:


#system-config-printer
select to txtprinter
entry to server1.example.com[server of domain network192.168.0.0/16]
printer name as a pinters
and save it.

Saturday, 12 March 2011

Linux Startup and Shutdown

Linux Startup and Shutdown:


init 0
-It will set to Runlavel to init 0.when will system on , check with runlevel but set to init 0.
Generate to shutdown system.
init 1
-For server maintenance or single user mode(only used for supper user). when will single user mode is enabled automatically
server is enabled automatically server is down.
-So single user is disabled in server network will on time.
init 2
-Multiuser mode without NFS. It will not be shared to server linux system.
init 3
_Multiuser with nfs and Character based Interface but without GUI.
init 4
-It is not used at this time. It is reserve for future enhancement.
init 5
-Multiuser with GUI.This is default runlevel of linux.
init 6
-reboot the server or a client system.

Thursday, 10 March 2011

Backup and Restore

Backup and Restore:


--> for safety and encrypted the data from desination.
--> tar command will be used into linux operating system.


#tar option desination Source

cvf-->Create Verbose File Process Example: Backup from cd to hdd. #tar -cvf /root/backup/cdrom.tar /media/cdrom

Note: dont need to mount for cdrom.It willbe automaticallly on mountfor when which command to be used.

Example:
Backup from cd to New Partition hdd.
tar -cvf /dev/hda10 /media/cdrom.

Note:
when you which used to this command , before you took the new hdd partition.

To View the Backup:
tar option backup filename (desination)
tar -tvf /root/seeni/nsbel.tar /home/nsbel

t->listof backup
f-> backup media file
v->verbose



Note:
when will backup , then automatically path will be optained.

Syallabus

International RedHat Examination:
Backup and Restore
Linux Startup and Shutdown
Printer Management
Storage Management
RedHat Package Manager
TCP/IP
DHCP-Dynamic Host Configuration Protocol
Telnet
Rlogin-Remote login
FTP-File Transfer Protocol
Samba Server
NFS-Network File System
DNS-Domain Name System
NIS-Network Information System
Squid Server-proxy server
Firewall
Remote Installation
User quota
Crontab
LVM-Logical Volume Method
RAID-Redutancy Array of Independent Device
Troubleshooting

Wednesday, 9 March 2011

Samba Server

SAMBA SERVER:


-->samba is used to share the resource in between windows os & linux os.
--> Microsoft network is based on the common interface file system,
which was developed from the server smb(server message block) protocol.
--> SMB developed in 1980's by IBM,Microsoft&Intel.
[Server Configuration]

#vi /etc/samba/smb.conf
work group=RHCE
hosts allow =192.168.1.1/16

[my share]
path=/home/seeni
writable=no
browsable=yes
valid users=seeni,nsbel


# service smb reload
#chkconfig smb on


Samba Passwd:

             # smbpasswd -a username
             # /etc/samba/passwd
             # smbpasswd -d username -->-d for disable
             # smbpasswd -e username -->-e for enable
             # smbpasswd -x username -->-x for delete




Note:
Package Name: samba
Service Name:smb

Exam Held RedHat Linux -Session

 Pattern
                        Two Session

 Session 1: . Minor Troubleshooting . Major Troubleshooting

 Session 2: .RedHat Certified Technician .RedHat Certified Engineering

Session 1:
Minor Troubleshooting:
It Contains two phase. They are asked in eight question for your First phase. In a first phase contains four compulsory question and fout non-compulsory. So you have do not problem in first Session because they are not consider to as a mark. It is a qualification for next session.
But you have mind these are all four compulsory question you must to solve. Whether It means you become to a next session or you come out to the Exam.

Major Troubleshooting:
They are given two big problem.They are not consider as a mark when you have solved that's problem or else.

Session 2:
RedHat Certified Technician[RHCT]:
It contains ten question. They are given to ten marks for each question. You should solved to minimum seven question of ten(7/10).That's scored you are passed otherwise failed.That means a minimum pass mark in RHCT. Then you get RHCT International Certification.It will be consider to for every solved problem as a mark. If you solved to every problem to get upto ten marks.


RedHat Certified Engineering[RHCE]:
It contains ten question. They are given to ten marks for each question. You should solved to minimum seven question of ten(7/10).That's scored you are passed otherwise failed.That means a minimum pass mark in RHCE. Then you get RHCE International Certification.It will be consider to for every solved problem as a mark. If you solved to every problem to get upto ten marks.


Note: To given additional Three question for yourself. So dont problem to get a certification.

Major Troubleshooting:

         It Mainly to Five Type of Problem from They are asked.
                1.fstab-problem
                2.grub-problem
                3.initrd file problem
                4.grub file installation problem
                5.Bash problem


                              Do that given Procedure:
                               --> Boot from CD.
                               --> boot: linux rescue method.

                               chroot /mnt/sysimage


                               #mkdir /r
                               #mkdir /b
                               #mount /dev/hda1 /b
                               #mount /dev/hda3 /r
                               #vi /r/etc/fstab
                               #/dev/hda3 / ext3 defaults 1 1
                               #/dev/hda1 /boot ext3 defaults 1 2
                               :wq


                               vi /b/grub/grub.conf

                               kernel /vmlinuz-2.6.18-8.el5
                               ro root=/dev/hda3 rhgh quiet
                               :wq



                -->Then Reboot Your System

                Boot from harddisk linux Operating system. If booting means problems are solved[ok].
                Otherwise booting from CD.

                          #chroot /mnt/sysimage
                         chroot:cannot run command '/bin/sh '
                         No such file or directory.


                         So
                          #/mnt/sysimage/bin/bash
                          #cp /usr/bin/bash /mnt/sysimage/bin/bash
                          #chroot /mnt/sysimage
                          #grub-install /dev/hda
                          #cd /boot
                          #ls

                          Now if you have initrd files reboot for your system otherwise make initrd image.
                          #cat /etc/grub.conf
                          #mkinitrd /boot/initrd-2.6.18.8.el5.img
                          --> to change below same
                          2.6.18.8.el5
                         -->save and exit
                      -->then reboot from your system.

Minor Troubleshooting:

It Mainly to Five Type of Problem from They are asked.
1.fstab-problem
2.grub-problem
3.initrd file problem
4.grub file installation problem
5.Bash problem
Do these work first:
-----------------------------------------------------First Problem-------------------------------------------------------
Go to single user mode and change user password.After you try to login.
Come to same problem to that means change to your attribute file. Such as given.,
#lsattr /etc/passwd
#lsattr /etc/shadow
#chattr -i /etc/passwd i->for Immunable.It Maeans readonly operations are performed.
#chattr -i /etc/shadow i->for Immunable.It Maeans readonly operations are performed.
Now you will to change a user password.

#passwd root

Try to login

#login
If you login. It means proceed otherwise check to the passwd file
#vi /etc/passwd
root:x:0;0:root:/root: /sbin/login--> ( change login to bash)

After you have to change that file to below have it

#root:x:0;0:root:/root: /sbin/bash

Then open to shadow file..
#vi /etc/shadow
root:!xxxxx /:13946:0:99997:7::13936
_______ _____
passwd was locked. passward was expired.
So want to unlocked user passward in a file.
#passwd -u root -->this command is used to unlock to that file.
#change -E never root
-----------------------------------------------------Second Problem-------------------------------------------------------
go for #vi /etc//securetty1
delete include of all text in that file and type given instruction to that file.
In mind have you dont to give a blank space for every line.

                                              console
                                              vclo
                                              vcl1
                                              vcl2
                                              vcl3
                                              vcl4
                                              vcl5
                                              tty1
                                              tty2
                                              tty3
                                              tty4
                                              tty5
                                             :wq

and to save it.

                #ls -l /etc/securetty

                -rwxrwxrwx 1 root root

                chmod 600 /etc/securetty
-----------------------------------------------------Third Problem------------------------------------------------------

go for #vi /etc/pam.d/login

to change given same

pam--> securetty
pam--> nologin., so

then go for
#setup-> authconfig-> next

-----------------------------------------------------Fourth Problem-----------------------------------------------------
go for #vi /etc/rc.local

touch /etc/nologin ----> to remove this line in rc.local file

:wq

init 3

login: root
passwd: redhat [to give any password ,when you went to single user mode on that time gave that password]

Session 2:
RedHat Certified Technician[RHCT]:
It contains ten question. They are given to ten marks for each question. You should solved to minimum seven question of ten(7/10).That's scored you are passed otherwise failed.That means a minimum pass mark in RHCT. Then you get RHCT International Certification.It will be consider to for every solved problem as a mark. If you solved to every problem to get upto ten marks.



Note: To given additional Three question for yourself. So dont problem to get a certification.

Session 2:
RedHat Certified Engineering[RHCE]:
It contains ten question. They are given to ten marks for each question. You should solved to minimum seven question of ten(7/10).That's scored you are passed otherwise failed.That means a minimum pass mark in RHCE. Then you get RHCE International Certification.It will be consider to for every solved problem as a mark. If you solved to every problem to get upto ten marks.


Note: To given additional Three question for yourself. So dont problem to get a certification.