Read more: http://bbloggertutorials.blogspot.com/2013/07/how-to-show-post-title-only-on-home.html#ixzz4QiLXfI00

Monday 21 November 2016

How to configure yum repository in Linux




1) Attach .iso image in Virtual manager (if you are running in virtual machine in your base machine) OR insert iso image cd (if your linux os running in base machine)

2) Mount iso image as follows

     mount /dev/sr0 /media/
   
3) Create one folder to copy all packages

    mkdir /repo
   
    I have created repo directory in root (/)

4) copy all packages from /media/Packages (we have recently mounted in /media)

   cp -rv /media/Packages/* /repo
  

5) for yum server, you need to install createrepo packages using rpm. install createrepo package using rpm which is located in /repo.
    (go to /repo and install following packages ie cd /repo)
   
    rpm -ivh createrepo*
   
    while installing createrepo package using rpm it will ask for failed dependancies. install those dependancies first
   
    rpm -ivh python-deltarpm-3.6-3.el7.x86_64
    rpm -ivh deltarpm-3.6-3.el7.x86_64

    now you will be able to install createrepo package. go ahead and install it
   
    rpm -ivh createrepo*
   
6) Once you installed createrepo, fire following command to create metadata file

    createrepo /repo
     it will take some, have patience
   
7) Now go to yum configuration file [Before any changes made to configuration file make sure that you have took backup of it somewhere]

    cd /etc/yum.repos.d/

    check all files here. you will be having one .repo file. edit the following line
   
    name=MyLocalRepo
    baseurl=file:///repo
    enabled=1
    gpgcheck=0
    #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

    Explanation:
   
    first line: Name of yum repo. any name you can mention here
    baseurl: location of repo directory from where it will take packages. as we created for local repo, we are mentioning as file.
    enabled, means repo it active and enabled
    gpgcheck, this often used to check key with server, hence we have created local repo so better to make its value as zero or comment the both gpgcheck line
   
    Yeap, we have sucessfully configured local yum repo. now you can install, update or remove package using yum repo.
   

Thursday 13 October 2016

Linux File Systems: Ext2 vs Ext3 vs Ext4



ext2, ext3 and ext4 are all filesystems created for Linux.
Ext2
  • Ext2 stands for second extended file system.
  • It was introduced in 1993. Developed by Rémy Card.
  • This was developed to overcome the limitation of the original ext file system.
  • Ext2 does not have journaling feature.
  • On flash drives, usb drives, ext2 is recommended, as it doesn’t need to do the over head of journaling.
  • Maximum individual file size can be from 16 GB to 2 TB
  • Overall ext2 file system size can be from 2 TB to 32 TB
Ext3
  • Ext3 stands for third extended file system.
  • It was introduced in 2001. Developed by Stephen Tweedie.
  • Starting from Linux Kernel 2.4.15 ext3 was available.
  • The main benefit of ext3 is that it allows journaling.
  • Journaling has a dedicated area in the file system, where all the changes are tracked. When the system crashes, the possibility of file system corruption is less because of journaling.
  • Maximum individual file size can be from 16 GB to 2 TB
  • Overall ext3 file system size can be from 2 TB to 32 TB
  • There are three types of journaling available in ext3 file system.
    • Journal – Metadata and content are saved in the journal.
    • Ordered – Only metadata is saved in the journal. Metadata are journaled only after writing the content to disk. This is the default.
    • Writeback – Only metadata is saved in the journal. Metadata might be journaled either before or after the content is written to the disk.
  • You can convert a ext2 file system to ext3 file system directly (without backup/restore).
Ext4
  • Ext4 stands for fourth extended file system.
  • It was introduced in 2008.
  • Starting from Linux Kernel 2.6.19 ext4 was available.
  • Supports huge individual file size and overall file system size.
  • Maximum individual file size can be from 16 GB to 16 TB
  • Overall maximum ext4 file system size is 1 EB (exabyte). 1 EB = 1024 PB (petabyte). 1 PB = 1024 TB (terabyte).
  • Directory can contain a maximum of 64,000 subdirectories (as opposed to 32,000 in ext3)
  • You can also mount an existing ext3 fs as ext4 fs (without having to upgrade it).
  • Several other new features are introduced in ext4: multiblock allocation, delayed allocation, journal checksum. fast fsck, etc. All you need to know is that these new features have improved the performance and reliability of the filesystem when compared to ext3.
  • In ext4, you also have the option of turning the journaling feature “off”.