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 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
- 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
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
- 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