Showing posts with label Installation. Show all posts
Showing posts with label Installation. Show all posts

Wednesday, 23 September 2015

1. Redhat Linux : RHCE 6

1. Redhat Linux : RHCE 6


UNIX Developed in 1973 by Dennis Ritchie and Kennth Welsh

Features of Unix:

1. Multi taskiing
2. Multi user capability
3. Security (System level-Users & pwds, File level- rwx)
4. Portability(HW independent)
5. Help
6. Open source code

UNIX Flavours:

UNIX  - UNIX    - UFS (Unix Filesystem)
SunSolaris  - Sun Micro Systems -> Oracle - ZFS (Zeta Filesystem)
IBM   - IBM AIX   - JFS (Journalized FS)
HPUX  - HP Unix   - HPFS (High Performance FS)
Redhat   - RHEL    - ext2, ext3, ext4 Filesystems

Redhat Linux:

Linux flavours:
1. Fedora 
2. Debian 
3. Ubuntu 
4. CentOS 
5. MacOS

Certifications: 
 
RHCSA  - 2.5 Hrs 210 outof 300 for pass
RHCE  - 2 Hrs 210 outof 300 for pass


     Intoduction to Linux
     
Basic Commands:

pwd    : present working directory
hostname
whoami
who am i
tty(terminal type)
who
uname -a
cd
echo $0    : display the current shell
csh
bash
cat /etc/shells
cp /etc/passwd /tmp/passwd
grep --color root /tmp/passwd : highlights 'root'
grep ^root /tmp/passwd  : line starts with root
grep /bin/bash$ /tmp/passwd : line end with /bin/bash
grep -v /bin/bash$ /tmp/passwd : line which doesnot end with /bin/bash
grep -c /bin/bash$ /tmp/passwd : count the lines ending with /bin/bash
grep -n /bin/bash$ /tmp/passwd : give the line number
cut -c 1-4 filename  : cut first 4 characters from each line
cut -d: -f1,2,3 filename : cut the first three fields of the content
tr    : translates lower case to upper or viceversa
head    : display first n lines
tail    : display last n lines
more    : open a page without up/down arrows
less    : open a page with up/down arrows
find    : find files or folders
sort -u filename  : sort in alphabetical order
sort      
find . -atime +1  : find by time
find . -name *.*  : find by name
find . -size +1024c  
who | tee lsout   : tee outputs to file and screen

grep -v ^$   : to display all lines except blank lines
touch test{1..100}  : to create test1 - test100 files

* 64 GUI terminals are possible in Linux 6.4
* GUI terminals are called pts(psuedo terminals)
* CLI terminals from F1 to F6 are called tty


     Installation:
     
Stand alone - CD/DVD
Newtwork - Using network(Image from a storage server)

ks.cfg - kickstart configuration used for automate installation in many servers from storage server.
(Solaris it is called jumpstart)

Stand ALone: 
 
Partitions:
 
  /  - root (min 8 GB)
  /boot - boot files (min 100mb)
  swap - virtual memory(doubl the ram upto a limit)


* NTP - Network Type Protocol. Used for time synchronization. 3 NTPs all over the world.
* PXE - should be enabled for network installation
* SCSI, CATA, PATA, SATA, IDE(Intergrated Device Envt)
 IDE  - hda, hdb(hd)
 SCSI, SATA, ATA - sda, sdb(sd)
* bootloader will be installed in /boot
* pre-installation and post installation (before and after removing installation media)
* kdump is used for kernel recovery and is sored in /boot

     Linux System Structure:
     

1. Hardware
2. Kernel
3. Shell
4. Users

  Types of shells:

  sh shell - bourne shell
  bash shell - bourne again shell(Default shell in Linux)
  ksh shell 
  csh shell
  tcsh shell
  nologin shell
  zsh shell 

 Features of bash shell:

  tab completion
  # for root
  $ normal user

 Kernel Functions include:

  Job scheduling
  Process management
  Memory management
  Network Managemnt


GNOME - GNU Object Model Envt

* Kernal is the hard core of the OS
* 32 and 64 kernels are available
* Shell are of login shell and no-login shell
* /etc/shells : contains shells installed
* echo $0 gives the shell logged in
* you can change from any shell to any other shell
* /etc/profiles stores profile details(aliases can be done here)
* /etc/bashrc for all users and .bashrc for normal users.

Friday, 26 June 2015

4. Redhat Linux : RHCE 6

4. Redhat Linux : RHCE 6

 
Packages Installation 
 
RPM (Redhat Packet Management)
------------------------------
* do not resolve dependencies
* installation package should be in the pwd

YUM (Yellowdog Update Management)
---------------------------------
* resolve dependencies itself
* install from the network
* configure yum:
 Install vsftp and createrepo
 Copy packages to /var/ftp/pub/anyname(if you want to access from other clients)
 Run createrepo command 'createrepo /var/ftp/pub/anyname'
 Create /etc/yum.repos.d/packages.repo and include:
  [server]
  name=packages.repo
  baseurl=ftp://192.168.x.x/pub/anyname
  enabled=1
  gpgcheck=0
 Restart vsftp using 'service vsftp restart'

vsftpd:
------
* very secure ftp
* used to network install using yum
      Job Scheduling
      --------------
3 Types:
-------
* cron  : periodically
* anacron : different periods
* at  : one time

fields in crontab:
-----------------
  minutes  hours days of month month Days of week 
eg: */1  * *  * *  echo "Hello" > /dev/pts/4
eg: 06  15 26  * *  sh script.sh > /root/cron_out

* all the users can schedule the crone and at jobs by default
* to deny permission for any user add user in /etc/cron.deny
* to deny permission for any user add user in /etc/at.deny

Updating Kernel:
---------------
* rpm -ivh kernel.rpm
* vim /etc/grub.conf and edit as
 default=1
* yum update

/*
Commands for the day:
--------------------

* rpm -ivh packageName.version.release.arch.rpm  : installs the package
* rpm -q package      : queries the package
* rpm -qd package     : document of the package
* rpm -e package     : removes the package
* yum install package     : to install packages
* yum remove package     : removes the package
* yum info package     : gives info about the package
* yum update      : update the system
* crontab -e      : add cron jobs
* crontab -e -u username    : add cron jobs for any user
* crontab -l      : list all cron jobs
* crontab -r      : remove cron jobs
* at now      : schedule at current time
* at 23:59      : schedule at user defined time
* at -l       : list all scheduled jobs
* at -r       : remove all scheduled 'at' jobs
* createrepo /var/ftp/pub/anyname   : create local installation repository
* service vsftp restart     : restart vsftp service
*