What is a repository in Centos and what does it contain. I I remove all the .repo files from the system. What will be its implications. Will it remove the packages as well and will hinder normal operations or will package just not get auto-updated?
"Repositories" are locations where you can download software.
".repo" files are definition files for repositories you might wish to use.
Deleting a .repo file will not affect any packages you already have installed - it will just prevent you from updating it (assuming the package in question is available only from that one repository).
You can learn more here:
https://www.centos.org/docs/5/html/yum/sn-yum-maintenance.html
https://www.digitalocean.com/community/tutorials/how-to-set-up-and-use-yum-repositories-on-a-centos-6-vps
Repositories in CentOS are collections of software that the server administrator can easily install.
For instance, should you choose to install Firefox, the following command will query all configured repositories, and if one of the repos has Firefox then yum will download and install it:
$ sudo yum install firefox
Additionally, you can search for software without installing it:
$ yum provides firefox
Therefore, repositories (or repos) are online collections of software which yum may query and download from.
Related
I have a question about package management in Ubuntu. I know that there exist standard repositories from which I install software in form of packages. Suppose I want to install some software that don't exist in standard repositories. What should I do? Of course I want to track and manage this software as easy as software from standard repository. What is the canonical way of managing such software on Linux, especially Ubuntu OS? Any answer would be appreciated.
You can manage packages that are installed outside of the standard APT repositories, but not that easy. Packages that are installed with apt install /path/to/package-downloaded-elsewhere-but-not-from-repo.deb are not usually receive updates, so you'll only stuck with install and uninstall stuff.
My customer is migrating off of Nexus (which has a yum repository), and they want to use Gitlab. I know Docker can hold docker images and JAR files via its maven feature. But does Gitlab allow you to host yum repositories as well? I wasn't able to find anything after some googling.
You can store rpm packages (or .deb, etc.) in the Gitlab Registry, but there isn't official support for that package type so you'd have to use the "Generic" version. The downside to this is that you wouldn't be able to use the Gitlab Registry as a yum repo, however you could do something like:
#this downloads the package with filename `:filename:`
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/:project_id:/packages/generic/:package_name:/:package_version:/:filename:"
# Use rpm to install a package from a local file instead of a yum repo:
rpm -i :filename:.rpm
# For this use case, the file will have to be a .rpm file
The -i flag tells rpm to install the package. Another option is to yum localinstall :filename.rpm:.
Generic Packages must be enabled on your Gitlab instance (if you're using a self-hosted version).
Generic Packages docs are here: https://docs.gitlab.com/ee/user/packages/generic_packages/#download-package-file
An example .gitlab-ci.yml file using Generic Packages is here: https://gitlab.com/guided-explorations/cfg-data/write-ci-cd-variables-in-pipeline/-/blob/master/.gitlab-ci.yml
Check out OpenRepo: https://github.com/openkilt/openrepo
This is an open source package hosting server that can make packages available for both Debian (APT) and Red Hat (RPM) files.
In this case, you would configure your GitLab CI build to push your rpm files to the OpenRepo server.
This question already has answers here:
How to install packages offline?
(12 answers)
Closed 2 years ago.
we have rhel linux machine without network access
and we want to install ansible on that machine
but we want to install the ansible from binaries ( not like pip/yum install ) , because we want to avoid any pip dependencies issues
is any approach that is relevant ?
example of the legacy way
Step 1: Update your Control Node
Any time you are installing new software, it is a good idea to ensure your existing operating system software is up to date. Let’s start with that task first.
yum update
Step 2: Install the EPEL Repository
Installing Ansible is pretty straightforward. First, we’ll need to install the CentOS 7 EPEL repository.
yum install epel-release
Step 3: Install Ansible
Next, we install the Ansible package from the EPEL repository.
yum install ansible
Perhaps not ideal, but you can just run from source. I've done it that way for years without any problems. I just put the initialization routine in my .bashrc file, so it's always ready to use.
Running Ansible from source (devel)
Once you pull from git on a machine that has internet access, sneakernet it over to the machine you want it on.
As mentioned in the official documentation you can use rpm available in official release repo. Since you dont have internet access you will have to download it somewhere else & copy it over to control node.
RPMs for currently supported versions of RHEL, CentOS, and Fedora are available from EPEL as well as releases.ansible.com.
Or
You can also build an RPM yourself. From the root of a checkout or tarball, use the make rpm command to build an RPM you can distribute and install
However I would not recommend Running Ansible from source (devel) because as already mentioned in the doc, this could be unstable.
Note
You should only run Ansible from devel if you are actively developing content for Ansible. This is a rapidly changing source of code and can become unstable at any point.
If you would like to build rpm on your own, you should probably use the tagged releases.
Available both in github & Ansible releases
I am trying to build QT4 (porting from Redhat 5 to 7 with an upgraded gcc compiler) in RedHat 7 and I was getting an error saying X11/Xlib.h can't be found. Anyways, after doing some research most people said to install libX11-devel to get those x11 libraries. Since I am using an offline machine I can't do "apt-get" type commands and have to manually install RPMs. So, I went to my RH-7 installation DVD and got "libX11-devel-1.6.3-3.el7.x86-64" (I have 64 bit OS) and tried to install using "yum install libX11-devel-1.6.3-3.el7.x86_64" and I am getting dependencies errors. It's saying
...Requires: pkgconfig(kbproto)
...Required: pkgconfig(xcb)
...Requires: pkgconfig(xproto)
...Requires: pkgconfig(xcb) >= 1.1.92
So, here are my questions.
1) when it says "pkgconfig(kbproto)", is it saying find the "kbproto....RPM" and do a "yum install". In my dvd I only have "xorg-x11-proto-devel-7.7.13.el7.noarch.rpm". Do I have to somehow find "xorg-x11-proto......x86_64.rpm" since it's a 64 bit machine?
2) Is there a difference between "yum install" and pkgconfig "install"? Are there any other installation variants in Linux?
3)For an offline machine, Is there anyway I can get all the dependencies and install everything at once ?
4) Why is it saying "xcb" requires twice. If I just get a xcb...rpm version above 1.1.92 can I just install it once?
Before actually answering the questions, I am going to suggest to see if you can get the latest version of the packages. The packages on the installation DVD may be really out of date and contain known vulernabilities, and other bugs. Can you use yumdownloader - in an online environment - to download the latest version onto a separate DVD and use that as the installation source? See https://access.redhat.com/solutions/10154 for more information.
To answer the questions themselves:
Requires: foo can refer to a package foo or a "feature" foo. pkgconfig(kbproto) is a "feature" (or virtual requires). You can use yum/rpm to see what provides this. On my Fedora box, for example, rpm -q --provides xorg-x11-proto-devel shows that this package indeed provides pkgconfig(kbproto).
As for x86_64 vs noarch, it doesn't matter. noarch packages work everywhere. Other packages are restricted to the platform. So x86_64 only works on intel/amd x86 64-bit machines. Installing noarch should be fine in your case. If you only had a i686 package, though, that wouldn't be sufficient. You would have to find a x86_64 or noarch package.
Yes, there's a big difference between yum and pkg-config. They do completely different things. One is a system tool for installing RPM packages. The other is a tool for developers for using the right headers and compiler flags. If your concern is finding/installing RPMs, do not use pkg-config directly.
Do you have access to an online machine that can access the RHEL 7 yum repositories? On that machine, do something like this:
mkdir rhel7-packages
cd rhel7-packages
yum provides '*/X11/Xlib.h' # make a note of the package that provides this file. it's libX11-devel on Fedora here
yumdownloader --resolve libX11-devel # download libX11-devel and all dependencies not installed on the system
Then copy/install the RPMs on the machine without internet access.
It's probably printing out xcb twice because it's two different requirements. The unversioned requirement will be satisfied if you install any verison of xcb. The versioned requirement will only be satisfied if you install 1.1.92. If you install 1.1.92, it will satisified both the requirements.
1.
You have to resolve the dependency on the system where you are building your package. This means you need to have those dependencies installed, inclusing libX11-devel. To do that, download the RPMs manually from EL7 repos to local disk and run this:
$ mkdir -p /tmp/libX11_dep_rpms && cd /tmp/libX11_dep_rpms
# Download all dependencies from here. All your packages should be available here:
# http://mirror.centos.org/centos-7/7/os/x86_64/Packages/
# Then install
$ yum localinstall *.rpm
# After this you should be able to build your qt4 package, provided all dependencies are resolved. Otherwise, repeat the procedure for all dependencies
# If you can't download packages, then you need to create a FULL DVD ISO that will contain all packages.
2.
pkgconfig ensures that a requirement is coming from a particular build that provides a particular version of the library. Here are some detail.
3.
Get the Everything ISO from EL7.
4.
This has to do with the pkgconfig and library versions.
I am trying to install nagios 4.0.6 and nagios -plugins-2.0.2 on fedora 17.
I have followed steps which is mentioned in sourceforge documentation.
http://nagios.sourceforge.net/docs/3_0/quickstart-fedora.html
unfortunately /usr/local/nagios/bin/nagios this file isnt created I mean even bin folder haven't created. so that I am unable to start nagios service.
What should I do?
You can install Nagios right from the Fedora repositories.
yum install nagios nagios-plugins
You can also see a list of Nagios-related packages with: yum search nagios.
I suggest you always install apps from the repositories, since the package manager will take care of the dependencies as well as the installation, and the packages there have been already revised and tested for the version of your OS. Use only 3rd party source builds or install/build the packages manually as a last resort.