2

p7zip「ユーザーデータ」機能 (を使用cloud-init)を介して AWS で Amazon Linux ベースの EC2 インスタンスを起動した後、パッケージをインストールしようとしています。

#cloud-config
repo_update: true
repo_upgrade: all

packages:
 - p7zip

ただしp7zip、通常のリポジトリでは利用できず、EPEL を有効にする必要があるため、パッケージを適切に取得していないようです。

私の質問はcloud-init、EC2 インスタンスの初期化時にパッケージを取得する前に EPEL を有効にするにはどうすればよいですか?

4

3 に答える 3

2
#cloud-config
# vim: syntax=yaml
#
# Add yum repository configuration to the system
#
# The following example adds the file /etc/yum.repos.d/epel_testing.repo
# which can then subsequently be used by yum for later operations.
yum_repos:
    # The name of the repository
    epel-testing:
        # Any repository configuration options
        # See: man yum.conf
        #
        # This one is required!
        baseurl: http://download.fedoraproject.org/pub/epel/testing/5/$basearch
        enabled: false
        failovermethod: priority
        gpgcheck: true
        gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
        name: Extra Packages for Enterprise Linux 5 - Testing
于 2016-10-07T07:33:11.527 に答える