Linux Classroom Series – 29/Jul/2020

Linux Repository Based Software Management

  • A linux repository is a storage location from which our system can install applications as well as Operating system updates.
  • Each repository is collection of software hosted on remote server so that it can be used my many systems for installing/updgrading softwares (packages)

YUM

  • yum is a popular packaging/updating tool for managing software on Linux systems. It is basically a wrapper program for RPM with enhancements.

  • Yum is pre installed on rhel family like centos, redhat, amazon linux

  • Recommendataion: Use cheatsheet Refer Here

  • Sample commands

    • yum install <package-name>: install the package
    • yum erase <package-name>: remove the specified package
    • yum search <package-pattern>: searches the lust of package names
    • yum deplist <package-name>: List all the libraries and moduels that the package depends on
    • yum check-update: Refreshes the local cache of yum database
    • yum reinstall <package-name>
    • yum update <package-name>
    • yum upgrade: Upgrades all packages install in your system to latest release
  • Yum configuration is located at /etc/yum.conf provides system-wide configuration options for yum.

  • In yum we can navigate to /etc/yum.repos.d Preview

  • If you want to add a repo create a file with .repo extensionin this folder and add the information

[REPO-NAME]
name=REPOSITORY-NAME
mirrorlist=<http-url>
#baseurl
gpgcheck=1
gpgkey

  • Case study:
    • Install OpenJDK 8 using yum (Linux has repository already added)
    sudo yum search jdk
    sudo yum info java-1.8.0-openjdk-devel
    sudo yum install java-1.8.0-openjdk-devel -y
    
    Preview
    • Install Logstash (Linux doesnt have a repository where the software is distributed)
      • Lets add information about a new repository to our redhat system. create a new file called as elastic.repo in /etc/yum.repos.d with following info
      [logstash-7.x]
      name=Elastic repository for 7.x packages
      baseurl=https://artifacts.elastic.co/packages/7.x/yum
      gpgcheck=1
      gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
      enabled=1
      autorefresh=1
      type=rpm-md
      
      Preview Preview

APT

  • APT is a tool for managing packages on ubuntu based systems

  • Refer Here for apt based cheat sheet

  • Lets install Java8 in ubuntu (repository already added) Preview Preview

  • Lets install logstash (repository not added) Refer Here

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Plugin for Social Media by Acurax Wordpress Design Studio

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube