Пакетный менеджер oracle linux

fekrado

Данный блог — интересные статьи и переводы на разные IT темы или около IT для русскоязычного сообщества разработчиков ПО.

Поиск по этому блогу

Команды Yum (Oracle linux,Cent os, RHEL)

Шпаргалка по работе с пакетным менеджером Yum (Yellowdog Updater, Modified), который используется в популярных Linux дистрибутивах: RedHat, CentOS, Scientific Linux (и других). В целях экономии места вывод команд не представлен.

#yum updateinfo list security
#yum groupinfo "Basic Web Server"
#yum groupinstall "Basic Web Server"
#yum groupremove "Basic Web Server"
#yum repo-pkgs reponame install
#yum repo-pkgs reponame remove

проверить локальную базу rpm (поддерживаются параметры dependencies, duplicates, obsoletes, provides)

установить из локальной директории (поиск/установка зависимостей будут произведены из подключенных репозиториев)

#yum localinstall httpd.rpm
#yum localinstall http://server/repo/httpd.rpm

Опции Yum

--disableplugin=fastestmirror
#yum update -y --enablerepo=epel
#yum update -y --disablerepo=epel

скачать пакеты, но не устанавливать
(на Centos 7 x86_64 будут скачаны в ‘/var/cache/yum/x86_64/7/base/packages/’)

#yum install httpd --downloadonly

Cледующие команды доступны после установки пакета yum-utils

#repoquery --requires --resolve httpd
#reposync -p repo1 --repoid=updates

запрос к локальной базе yum, отображение информации о пакете
(использованная команда, контрольная сумма, URL с которого был установлен и другое)

скачать src.rpm пакет из репозитория
(должен быть подключен соответствующий репозиторий, например в ‘/etc/yum.repos.d/CentOS-Sources.repo’ в CentOS)

Конфигурационные файлы Yum и их расположение

Некоторые опции yum.conf:

cachedir=/var/cache/yum/$basearch/$releasever

Определяет должен или нет Yum хранить кэш заголовков и пакетов после успешной установки. Значения: 0 или 1. (по умолчанию 1)

Некоторые полезные плагины

Работа Yum через прокси сервер

proxy_proxy_username=user proxy_password=pass
#export http_proxy="http://server:3128"
  • Получить ссылку
  • Facebook
  • Twitter
  • Pinterest
  • Электронная почта
  • Другие приложения

Ярлыки

  • Получить ссылку
  • Facebook
  • Twitter
  • Pinterest
  • Электронная почта
  • Другие приложения

Комментарии

Отправить комментарий

Популярные сообщения из этого блога

Установка и конфигурирование Oracle Enterprise Manager 13c.

Этот пост поможет правильно установить и сконфигурировать Oracle Enterprise Manager 13c. Oracle Enterprise Manager — Это централизованный центр управления и мониторинга для всех продуктов Oracle. OEM способен управлять и мониторить и сторонние приложения и сообщать о всех критических проблемах основанные на установленных правилах установленные администратором. Первоначальные настройки системы Oracle Linux 6.7 64 Bit Virtual Machine VirtualBox 5.1.6 for Windows hosts Oracle Database 12.1.0.2 Oracle Enterprise Manager 13c Выделена оперативной памяти 12 Гб . На операционной системе Oracle Linux 6.7 64 Bit предустановлена база данных Oracle Database 12c установка которой тут не рассматривается. Предустановленные пакеты для корректной установки и настройки Oracle Management Service (OMS) make-3.81 binutils-2.20 gcc-4.4.4 libaio-0.3.107 glibc-common-2.12-1 libstdc++-4.4.4 libXtst-1.0.99 (x86_64) sysstat-9.0.4 glibc-2.12 glibc-devel-2.1

  • Получить ссылку
  • Facebook
  • Twitter
  • Pinterest
  • Электронная почта
  • Другие приложения
Читайте также:  1с сервер linux менеджер лицензий

Источник

Installing Software Packages (rpm, yum)

This article provides an overview of the rpm and yum commands for installing software packages on Linux, with specific reference to the information needed for the RHCSA EX200 and RHCE EX300 certification exams.

Remember, the exams are hands-on, so it doesn’t matter which method you use to achieve the result, so long as the end product is correct.

rpm

The rpm command is used to install, update, list and remove software packages. The command expects to be supplied with flags to indicate the mode of operation and one or more package files. Check out the man pages for a list of all the available options. Using the «-i» flag indicates you are attempting an install of one or more packages. The example below attempts to install a package from a CD. Notice wildcards are supported.

# cd /media/cdrom/Packages # rpm -ivh system-config-lvm* warning: system-config-lvm-1.1.12-9.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Preparing. ########################################### [100%] 1:system-config-lvm ########################################### [100%] #

The «-U» option uses the supplied packages to update the system. If a package already exists on the system, but the supplied package is newer it will be applied. If the package does not already exist on the system it will be installed.

# rpm -Uvh system-config-lvm* warning: system-config-lvm-1.1.12-9.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Preparing. ########################################### [100%] package system-config-lvm-1.1.12-9.el6.noarch is already installed #

The «-q» option allows you to query installed packages. You can then erase specific packages using the «-e» option.

# rpm -q system-config-lvm system-config-lvm-1.1.12-9.el6.noarch # rpm -e system-config-lvm-1.1.12-9.el6.noarch #

The big limitation of the rpm command is it does not handle dependencies for you. If there are missing dependencies, an installation will fail. It is for this reason you will probably prefer to use the yum command described below.

yum Repositories

The yum command requires a repository as the source of the packages. If you are connected to the internet, you may choose to use the repository provided by your Linux distribution. In this case I am using Oracle Linux 6.x, so I could use the repository provided by Oracle (public-yum.oracle.com). If you have paid for RHEL support, you will register your server using the rhn_register command, which will configure a yum repository.

You can also create a local repository from a distribution DVD, CD or iso file. To do this you will need to mount the DVD, CD or iso file

# mkdir /media/cdrom # # Mount physical/virtual cdrom/dvd # mount /dev/cdrom /media/cdrom # # Mount ISO image # mount -o loop /path/to/disk1.iso /media/cdrom

Next, you can do one of two things.

  • Use the DVD directly as a Yum repository.
  • Create a new Yum repository by copying the packages off the DVD.
Читайте также:  Linux mint запуск от имени администратора

To use the DVD directly, create a file called «/etc/yum.repos.d/dvd.repo» with the following contents, where the «baseurl» points to your DVD mount point.

[dvd] name=Oracle Linux Installation DVD baseurl=file:///media/cdrom enabled=0

Import the GPG key from the DVD.

# rpm --import /media/cdrom/RPM-GPG-KEY

You can now use the DVD as a Yum repository by referencing it using the «—enablerepo» option.

# yum install --enablerepo=dvd system-config-lvm

If you want to take the second option and create a new Yum repository by copying the packages off the DVD, create a local directory to hold the yum repository and copy the packages to it.

# mkdir /repo # cp /media/cdrom/Packages/* /repo

To create a repository, we need to install the createrepo package, which requires a couple of dependencies.

# cd /repo # rpm -ivh deltarpm* python-deltarpm* # rpm -ivh createrepo*

Now we can create a repository out of the contents of the directory.

To allow the yum command to use the repository, we must create a «.repo» file in the «/etc/yum.repos.d» directory. Create a file called «/etc/yum.repos.d/localrepo.repo» with the following contents.

[localrepo] name=localrepo baseurl=file:///repo/ enabled=1 gpgcheck=0

Notice the «baseurl» parameter. This indicates the location of the repository. In this case I am using a local file system, so the parameter is set to «file://» followed by the path to the repository «/repo/». If this were an internet repository we would expect a baseurl with a HTTP address. For example, the Oracle Linux repository setting would be as follows.

baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/2/base/$basearch/ gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6

When using internet repositories, you typically expect the «gpgkey» entry as a security precaution.

You should now be able to use the yum command to install packages.

yum

The yum command allows you to install, update, list and remove packages.

# yum install system-config-lvm # yum update system-config-lvm # yum list system-config-lvm # yum remove system-config-lvm

The advantage of yum over the rpm command is it deals with all dependencies for you, prompting you with the required dependencies and the total size of the operation. If you agree, all necessary dependencies will be installed, in addition to your specified package(s).

The main Linux distribution repositories also support package groups, allowing you to install, update or remove entire feature sets using a single command. To check if any groups have been defined in the repository, issue the following command.

You can install, update or remove entire groups of packages as follows.

# yum groupinstall "Development Libraries" # yum groupupdate "Development Libraries" # yum groupremove "Development Libraries"

GUI

The «Add/Remove Software» dialog is available from the console menu (System > Administration > Add/Remove Software). Provided you have yum repository available, you can use this tool to install individual packages or package groups.

Add/Remove Software

Kernel Updates

Updating the kernel on a system is simple using the yum command. Simply issue the following command and the kernel and all its dependencies will be updated.

The updated version of the kernel will be set as the default in the «/boot/grub/grub.conf» file, so next time the system is booted it will be used.

Читайте также:  Vnc viewer linux debian

yum-cron

You can choose to download and apply package updates automatically using yum-cron .

If you are using Oracle Linux, you will have to enable to optional repository (ol*_optional_latest) in the «/etc/yum.repos.d/public-yum-ol*.repo» file by switching the «enabled» flag to «1».

Once installed check the «man yum-cron» page for configuration options. Most of the config files are under the «/etc/yum» directory, but depending on your version of RHEL/OL, the main config file may be placed under the same directory, or under the «/etc/sysconfig» directory.

You can choose to download-only, or download and apply the package changes. In newer versions of RHEL/OL, you also get options to specify the types of changes that will be applied, like only critical updates etc. You can also get it to email you when changes have been applied.

Remember, kernel updates will only take effect after a reboot, so you will need to schedule this where appropriate.

Hope this helps. Regards Tim.

Created: 2012-03-08 Updated: 2019-07-31

Источник

Пакетный менеджер oracle linux

Oracle Linux: The best Linux for your enterprise

Read More

About Oracle Linux

The Oracle Linux operating system is engineered for open cloud infrastructure. It delivers leading performance, scalability, reliability and security for enterprise SaaS and PaaS workloads as well as traditional enterprise applications. Unlike many other commercial Linux distributions, Oracle Linux is easy to download and completely free to use, distribute and update. Read on to get started.

Download Oracle Linux

Oracle Linux is available to download, for free, in various forms. Get started here.

Installing Software from this Yum Server

Developing with Oracle Linux

Interested in developing with Node.js, Python, Go or PHP? Learn how to get started below:

Oracle Instant Client: Connect your Application to Oracle Database

Learn how to install Oracle Instant Client packages from this yum server to connect your application to Oracle Database.

Adding EPEL (Extra Packages for Enterprise Linux)

Oracle Linux yum server hosts packages from EPEL (Extra Packages for Enterprise Linux). Read how to install them.

Developing Cloud Native Applications

Are you developing microservice-based applications? Deploying and orchestrating containers? Oracle Linux Cloud Native Environment is a fully integrated suite for the development and management of cloud-native applications. Learn how to install and use it here.

Browse the Repositories

In addition to the above, there are a wealth of other packages available on this server. Browse the repositories below.

Tutorials, Hands-On Labs and Documentation

Dig a little deeper with hand-on labs, tutorial videos, or the Oracle Linux documentation:

If you need Support.

This yum server is offered without support of any kind. Peer support is available via the Oracle Linux Community If you require support, please consider purchasing Oracle Linux Support via the Oracle Store, or via your sales representative.

Technical information

Источник

Оцените статью
Adblock
detector