Learn Linux YUM-FTP-SFTP-SSH-TELNET

Linux RHEL6

                                                           WHAT IS YUM,FTP,SFTP,SSH,TELNET
YUM SERVER:-YUM (Yellow Dog Updater Modified) Is An Open Source Command-Line As Well As Graphical Based Package Management Tool For RPM (Red Hat Package Manager) Based Linux Systems. It Allows Users and System Administrator to Easily Install, Update, Remove or Search Software Packages on Systems helps us to manage packages.
What is the main use of yum server in Linux:-if whenever we want to install any rpm packages or every packages are dependent on their dependencies to work or install any rpm packages successfully without their dependencies packages didn’t get install so you have to install their dependencies and then install your selected packages then yum server helps us here to install our packages in less time and fast by managing our own yum repository by creating yum repository in Linux we can install any packages any time easily.
File transfer protocol:-data can be transferred over a network or the web by ftp and sftp
FTP:-file transfer protocol is TCP/IP application protocol and it uses port number 21 to establish connection and port no-21 to data transmission ftp is the protocol for exchanging files over the
Internet in an unsecured manner. 
SFTP:-is secure file transfer protocol which is used for data transmission over the internet in a secure way SFTP is more popular because it’s supported by Linux and UNIX servers by default.
FTP Client:-when ftp process requesting for file and other process is called ftp client.
FTP Server:-when ftp process receiving the request is called ftp server.

SSH :-is stands for Secure Socket Shell, is a UNIX-based command interface and protocol used for secured remote access to computers and networks. It is widely used by network administrators to control Web and other kinds of servers remotely. SSH commands are encrypted and secure in several ways. Both ends of the client/server connection are authenticated using a digital certificate, and passwords are protected by being encrypted. The SSH, SCP, and SFTP command line tools which are part of the SSH package, are secure versions of the earlier UNIX utilities.

TELNET :-is a protocol that allows you to connect to remote computers (called hosts) over a TCP/IP network (such as the Internet). Using telnetclient software on your computer, you can make a connection to a telnet server.

Learn Linux

FTP Configuration

How to configure ftp server in Linux:-
#rpm –qa vsftpd =to find ftp pacakages are install or not.
There are three ways to install ftp packages:-
By yum repository ,gui,rpm command here we use rpm command for this RHel dvd is must be inserted or copied.
#Cd / =to go in root
Every cd/pendrive is mounted in media directory:-
#cd media/RHel 6.0\ 1386\ Disc\ 1/Packages/
#rpm –I vsftpd -2.2.2-6.el6.1686.rpm
#it get install successfully
#rpm –qa vsftpd
#service vsftpd start (status,restart,stop)
#to permanent enables this service
#chkconfig vsftpd on

Learn Linux

Logical Volume Group in RHEL

LVM is a logical volume manager for the Linux kernel that manages disk drives and similar mass-storage devices. Suppose if you have lots of hard drive by this lvm we can combine all the hard drive together and then shrink from it by own choice.
For ex:-we have two hard drive of 40 gb 2.create partition in it 3.then make them physical volume by pvcreate cmd 4.then create volume group volume can be of 80gb 5.then I can shrink any type of volume from volume group 6.then we we have to format shrinked drive by file system by ext3, 4 or any 7.and make mount to make it usable.

Uses of lvm in:-
Database server, company server, home.

Benefits:- Allow you to create larger partitions than you could with a single drive, allow you to add hard drive, shrink drive, or move those from one to other drive.

Linux Commands

LVM Configuration in Rhel

LVM configuration Rhel 6:-
#fdisk –l =to check hardrive
#pvdisplay=to display physical volume
#pvcreate=to create physical volume.
#pvcreate /dev/sda1 /dev/sdb2
physical volume successfully created
#pvdisplay physical volume are showing
#vgdisplay=to preview volume group
#vgcreate /dev/myvggroup /dev/sda1 /dev/sdb2
#succesfully created
#vgdisplay
We have to shrink logical volume for our use
#lvdisplay=to display logical volume
#lvcreate –name –size 100M /dev/myvggroup
To make it usable format and mount is must.
#mkfs.ext4 /dev/myvggroup/test1
Mount=to display mounted directory
#mkdir /mylg
#mount /dev/myvggroup/test1/mylg/
We have successfully created logical volume from volumegroup of two harddrive.

Linux Commands

How To Extend LVM

How to extend or increase our 80 gb of volume group to 120 gb in lvm:-
#pvdisplay=to show physical volume
#vgdisplay=volume group
#lvdisplay=logical volume
How to extend volume group:-
#pvcreate /dev/sdb5(new partition)
#vgextend /dev/myvggroup /dev/sdb5
#we have successfully expended volume group
How to extend logical volume in existing volume:-
#lvdisplay=to view logical volume
#lvextend –size +1000G /dev/test1(logical volume name)


#Successfully extend logical volume

Linux Commands

How To Remove Lvm In Rhel 6

How to remove lvm in rhel 6:-
#mount=show mounted place
#umount /dev/mylg
#mount
#first delete logical volume:-
#lvdisplay
#lvremove /dev/myvggroup/test1
#yes
#vgdisplay=to view volume group
#vgremove myvggroup
#vgdisplay
#if we want to convert those physical volumes in simple partition:-
#pvremove /dev/sdb1  /dev/sda1  /dev/sda3(who are in type of physical volume

#successfully created in simple volume

Play With Manually in Linux

Creating Partitions in Rhel LINUX

Creating partitions in rhel 6:-
#fdisk –l =to show attached hard drives
#all the information’s about the hdd are saved in dev directory.
#/dev/sda,sdb,sdc,sdb,sdd or any so it is sata
#/dev/hd,hd,hd,hd, or any so it is ID type of hard drives
To make partitions in /dev/sdb:-
#fdisk /dev/sdb
#command m for help:-
#n= for create new partition
#p=to print all the partition
#n
#e for extended in 1 hdd we can make 4 partitions it can be primary partitions make also make 3 primary partitions then we can create 1 extended partition and then make logical partitions from it.
#p=for partition
#by ignoring next step
#+100M (to make 100MB of new partition)
#p=for print
#p
#it shows all the info if partition id
#wq=to quit with saving
# to synchronize partitons table
#partprobe=helps us to update our new make partitions immediately.
#to format partition
#mkfs.ext4 /dev/sdb1(new created partition)
#to make it usable mounting is must:-
#mkdir /my
#mount /dev/sdb1/my/
#cd /my/=to go in your mount place
#we have successfully mount new partitions and make it usable
#to permanent that new partition:-
#mount=it seems mounted but it is not permanent mounted for use if we restart our computer it get umount
#to permanent that partitions
#cat /etc/fstab
#we have to make entry of that new partition in it
#gedit /etc/fstab
/dev/sdb1                           /my                        ext4                      defaults                0 0  (first 0 for dump and for recovery  1 for check ,second 0 for fs check file system check)
#it requires restart to make permanent
#mount
#we have Successfully mounted new partition.

Learn Linux

Linux Process Priority Nice/Renice

What is process=process is a set of instruction which is loaded in memory whenever we run any program memory helps us to run it and help to give an unique process id and priority.
Terminate and killing Process in Linux

#ps=helps to show running process and command and unique id.

#ps –a=to view which command is running on which terminal with process id and terminal number

#ps –e=list all program process

#ps –ao tty.comm.pid= to view which command is running on which terminal with process id and terminal number

#pidof vim=to view 1 specific process id

Terminate and kill Process in Linux:-

#kill 25769(process id) =to stop and kill programs.

#kill -9 25789(process id)=to stop immediately program

#killall vim(any program name) to kill all programs like vim

#pkill –u testuser1= to kill all program of a specific user.

Process Priority with nice and renice:-

Whenever any program runs system give a process id and process priority number to that program to run id so here we can changes process priority to give high or less priority to run.

#ps –ao comm.tty,tty,nice= to show running programs with process priority

#to change any program priority and also in running program

#jitni (value)priority km hogi us program ko utni high priority mileygi priority can be change upto -20 to -90

#nice –n -5 vim(command name)

# ps –ao comm.tty,tty,nice,pid= to show running programs with process priority with process id.

#renice -4 27420=(to change running process priority.

Only root or super user can change priority to high any other user can only change it to up it means less priority