Ubuntu/ネットワークインストール用の独自のパッケージレポジトリを作成する
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#navi(../)
* Ubuntuでパッケージのネットワークインストールに利用でき...
本資料はネットワークインストールが可能な独自パッケージリ...
#contents
#htmlinsertpcsp(linux_ads_top.html,linux-sp.html)
*関連記事 [#bff7fad4]
-[[Ubuntuでrootになる方法>Ubuntu/Ubuntuでrootになる方法]]
* aptのパッケージレポジトリ [#cdd67dcd]
新規ソフトウェアの追加やセキュリティアップデートのために、~
パッケージレポジトリからパッケージを入手しインストールす...
Ubuntuシステムの管理において日常的です。
この管理作業には、''apt-get''コマンドを使います。~
一般的に利用するレポジトリは、Ubuntuの公式パッケージレポ...
しかし、パッケージレポジトリには、公式レポジトリだけでな...
独自レポジトリを作る目的には、公式パッケージの内容に独自...
またパッケージ化されていないソフトウェアのパッケージを提...
また、特別なパッケージを提供するためではなく、インターネ...
構築作業を行なうために、暫定的に独自レポジトリを用意する...
ここでは、そのような独自レポジトリの作成手順と、その利用...
* 独自パッケージレポジトリの作成準備 [#v4aaed11]
独自のパッケージレポジトリを作成するには、以下の準備が必...
- ''apt-ftparchive''というコマンドが必要になります。~
これは''apt-utils''というパッケージに含まれています。
- レポジトリを置くマシン上でHTTPサーバが動作している必要...
以降の手順説明では、''apache2''パッケージのデフォルト設定...
- レポジトリの電子署名のために、''gpg''の鍵がセットアップ...
事前に以下のように''gpg''コマンドを実行して、鍵を作成して...
% gpg --gen-key
* 独自パッケージレポジトリの作成手順 [#fd3f4ef9]
独自パッケージレポジトリを作成するには、独自レポジトリを...
+ 独自レポジトリを作成したいマシン(ホスト名は、server1.e...
HTTPサーバによって公開できるディレクトリにするため、今回...
今回はテストのため、swiftというパッケージファイルを1つだ...
# cp swift_1.8.0-0ubuntu1.2~cloud0_all.deb /var/www/
#br
+ 以下のコマンドを実行します。
# cd /var/www
# apt-ftparchive packages . > Packages
# gzip -c9 < Packages > Packages.gz
# apt-ftparchive contents . > Contents-$(dpkg --print-ar...
# gzip -c9 < Contents-$(dpkg --print-architecture) > Con...
# apt-ftparchive release . > Release
#br
+ Releaseファイルにgpgで署名を行います。~
以下のコマンドを実行します。
# gpg --sign -b -a -o Release.gpg Release
次のユーザーの秘密鍵のロックを解除するには
パスフレーズがいります:“Admin <root@localhost>”
2048ビットRSA鍵, ID D9812CEF作成日付は2013-07-25
gpg: このセッションでgpg-agentは無効です
以上で、独自パッケージレポジトリが、作成できました。
* ネットワーク・HTTPサーバの確認 [#sd1b0e1e]
ネットワーク経由で、レポジトリにアクセスできるかどうか、c...
"/var/www"は、HTTPサーバの"/"に配置されているので、"/"へ...
作業を行ったディレクトリのコンテンツに接続できるはずです。~
先程作成した''Packages''ファイルを取得してみます。
# curl http://server1.example.tld/Packages
Package: swift
Priority: optional
Section: net
Installed-Size: 211
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@list...
Original-Maintainer: Soren Hansen <soren@ubuntu.com>
Architecture: all
Version: 1.8.0-0ubuntu1.2~cloud0
Replaces: swift (<< 1.6.0-0ubuntu1)
Depends: python-swift (= 1.8.0-0ubuntu1.2~cloud0), python
Breaks: swift (<< 1.6.0-0ubuntu1)
Filename: ./swift_1.8.0-0ubuntu1.2~cloud0_all.deb
Size: 74774
MD5sum: d37b39c1522724bc55dcac767dcd889b
SHA1: fd57a77cad7fa992135a6dfaff5696faa6ace66f
SHA256: cece959eddbb4ad2c07edc7cac03621b32f1410c1ec79883...
SHA512: c0362146e2605421a95eee0b633e6b2b3be380499b4e6309...
Description: distributed virtual object store - common f...
OpenStack Object Storage (code-named Swift) is open sou...
creating redundant, scalable object storage using clust...
servers to store petabytes of accessible data. It is no...
real-time data storage system, but rather a long-term s...
more permanent type of static data that can be retrieve...
updated if necessary. Primary examples of data that bes...
storage model are virtual machine images, photo storage...
backup archiving. Having no central "brain" or master p...
provides greater scalability, redundancy and permanence.
.
Objects are written to multiple hardware devices in the...
the OpenStack software responsible for ensuring data re...
integrity across the cluster. Storage clusters can scal...
adding new nodes. Should a node fail, OpenStack works t...
content from other active nodes. Because OpenStack uses...
ensure data replication and distribution across differe...
inexpensive commodity hard drives and servers can be us...
expensive equipment.
.
.
This package provides some core binaries and clients to...
Homepage: http://launchpad.net/swift
テストで置いたswiftパッケージについての情報ファイル(Packa...
* 独自パッケージレポジトリの利用手順 [#ne73c8c1]
作成した独自パッケージレポジトリを利用するには、利用した...
+ "/etc/apt/sources.list"に以下のような行を追加します。
#br
deb http://ホスト/ディレクトリ/ ./
#br
先程の手順で作ったレポジトリの場合には、以下のようになり...
#br
deb http://server1.example.tld/ ./
#br
+ 独自レポジトリの署名に利用したgpgの公開鍵をaptに追加し...
#br
++ 先に作成したgpg鍵の公開鍵ファイルを取得するために、レ...
#br
# gpg --export > Admin.gpg
#br
++取得したファイル(上記の例では"Admin.gpg")を、レポジト...
#br
# apt-key add Admin.gpg
OK
#br
+ apt-get update コマンドを実行し、独自レポジトリの情報が...
#br
# apt-get update
取得:1 http://server1.example.tld ./ Release.gpg [490 B]
取得:2 http://server1.example.tld ./ Release [1,202 B]
無視 http://server1.example.tld ./ Release
取得:3 http://server1.example.tld ./ Packages [1,178 B]
無視 http://server1.example.tld ./ Translation-ja_JP
無視 http://server1.example.tld ./ Translation-ja
無視 http://server1.example.tld ./ Translation-ja_JP.eucJP
無視 http://server1.example.tld ./ Translation-en
ヒット http://jp.archive.ubuntu.com precise Release.gpg
ヒット http://jp.archive.ubuntu.com precise-updates Rele...
ヒット http://jp.archive.ubuntu.com precise-backports Re...
(省略)
ヒット http://security.ubuntu.com precise-security/unive...
951 kB を 22秒 で取得しました (42.0 kB/s)
パッケージリストを読み込んでいます... 完了
以上の手順により、作成した独自パッケージレポジトリが利用...
以上、Ubuntuでネットワークインストールに利用できる独自の...
#htmlinsertpcsp(linux_ads_btm.html,linux-sp.html)
終了行:
#navi(../)
* Ubuntuでパッケージのネットワークインストールに利用でき...
本資料はネットワークインストールが可能な独自パッケージリ...
#contents
#htmlinsertpcsp(linux_ads_top.html,linux-sp.html)
*関連記事 [#bff7fad4]
-[[Ubuntuでrootになる方法>Ubuntu/Ubuntuでrootになる方法]]
* aptのパッケージレポジトリ [#cdd67dcd]
新規ソフトウェアの追加やセキュリティアップデートのために、~
パッケージレポジトリからパッケージを入手しインストールす...
Ubuntuシステムの管理において日常的です。
この管理作業には、''apt-get''コマンドを使います。~
一般的に利用するレポジトリは、Ubuntuの公式パッケージレポ...
しかし、パッケージレポジトリには、公式レポジトリだけでな...
独自レポジトリを作る目的には、公式パッケージの内容に独自...
またパッケージ化されていないソフトウェアのパッケージを提...
また、特別なパッケージを提供するためではなく、インターネ...
構築作業を行なうために、暫定的に独自レポジトリを用意する...
ここでは、そのような独自レポジトリの作成手順と、その利用...
* 独自パッケージレポジトリの作成準備 [#v4aaed11]
独自のパッケージレポジトリを作成するには、以下の準備が必...
- ''apt-ftparchive''というコマンドが必要になります。~
これは''apt-utils''というパッケージに含まれています。
- レポジトリを置くマシン上でHTTPサーバが動作している必要...
以降の手順説明では、''apache2''パッケージのデフォルト設定...
- レポジトリの電子署名のために、''gpg''の鍵がセットアップ...
事前に以下のように''gpg''コマンドを実行して、鍵を作成して...
% gpg --gen-key
* 独自パッケージレポジトリの作成手順 [#fd3f4ef9]
独自パッケージレポジトリを作成するには、独自レポジトリを...
+ 独自レポジトリを作成したいマシン(ホスト名は、server1.e...
HTTPサーバによって公開できるディレクトリにするため、今回...
今回はテストのため、swiftというパッケージファイルを1つだ...
# cp swift_1.8.0-0ubuntu1.2~cloud0_all.deb /var/www/
#br
+ 以下のコマンドを実行します。
# cd /var/www
# apt-ftparchive packages . > Packages
# gzip -c9 < Packages > Packages.gz
# apt-ftparchive contents . > Contents-$(dpkg --print-ar...
# gzip -c9 < Contents-$(dpkg --print-architecture) > Con...
# apt-ftparchive release . > Release
#br
+ Releaseファイルにgpgで署名を行います。~
以下のコマンドを実行します。
# gpg --sign -b -a -o Release.gpg Release
次のユーザーの秘密鍵のロックを解除するには
パスフレーズがいります:“Admin <root@localhost>”
2048ビットRSA鍵, ID D9812CEF作成日付は2013-07-25
gpg: このセッションでgpg-agentは無効です
以上で、独自パッケージレポジトリが、作成できました。
* ネットワーク・HTTPサーバの確認 [#sd1b0e1e]
ネットワーク経由で、レポジトリにアクセスできるかどうか、c...
"/var/www"は、HTTPサーバの"/"に配置されているので、"/"へ...
作業を行ったディレクトリのコンテンツに接続できるはずです。~
先程作成した''Packages''ファイルを取得してみます。
# curl http://server1.example.tld/Packages
Package: swift
Priority: optional
Section: net
Installed-Size: 211
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@list...
Original-Maintainer: Soren Hansen <soren@ubuntu.com>
Architecture: all
Version: 1.8.0-0ubuntu1.2~cloud0
Replaces: swift (<< 1.6.0-0ubuntu1)
Depends: python-swift (= 1.8.0-0ubuntu1.2~cloud0), python
Breaks: swift (<< 1.6.0-0ubuntu1)
Filename: ./swift_1.8.0-0ubuntu1.2~cloud0_all.deb
Size: 74774
MD5sum: d37b39c1522724bc55dcac767dcd889b
SHA1: fd57a77cad7fa992135a6dfaff5696faa6ace66f
SHA256: cece959eddbb4ad2c07edc7cac03621b32f1410c1ec79883...
SHA512: c0362146e2605421a95eee0b633e6b2b3be380499b4e6309...
Description: distributed virtual object store - common f...
OpenStack Object Storage (code-named Swift) is open sou...
creating redundant, scalable object storage using clust...
servers to store petabytes of accessible data. It is no...
real-time data storage system, but rather a long-term s...
more permanent type of static data that can be retrieve...
updated if necessary. Primary examples of data that bes...
storage model are virtual machine images, photo storage...
backup archiving. Having no central "brain" or master p...
provides greater scalability, redundancy and permanence.
.
Objects are written to multiple hardware devices in the...
the OpenStack software responsible for ensuring data re...
integrity across the cluster. Storage clusters can scal...
adding new nodes. Should a node fail, OpenStack works t...
content from other active nodes. Because OpenStack uses...
ensure data replication and distribution across differe...
inexpensive commodity hard drives and servers can be us...
expensive equipment.
.
.
This package provides some core binaries and clients to...
Homepage: http://launchpad.net/swift
テストで置いたswiftパッケージについての情報ファイル(Packa...
* 独自パッケージレポジトリの利用手順 [#ne73c8c1]
作成した独自パッケージレポジトリを利用するには、利用した...
+ "/etc/apt/sources.list"に以下のような行を追加します。
#br
deb http://ホスト/ディレクトリ/ ./
#br
先程の手順で作ったレポジトリの場合には、以下のようになり...
#br
deb http://server1.example.tld/ ./
#br
+ 独自レポジトリの署名に利用したgpgの公開鍵をaptに追加し...
#br
++ 先に作成したgpg鍵の公開鍵ファイルを取得するために、レ...
#br
# gpg --export > Admin.gpg
#br
++取得したファイル(上記の例では"Admin.gpg")を、レポジト...
#br
# apt-key add Admin.gpg
OK
#br
+ apt-get update コマンドを実行し、独自レポジトリの情報が...
#br
# apt-get update
取得:1 http://server1.example.tld ./ Release.gpg [490 B]
取得:2 http://server1.example.tld ./ Release [1,202 B]
無視 http://server1.example.tld ./ Release
取得:3 http://server1.example.tld ./ Packages [1,178 B]
無視 http://server1.example.tld ./ Translation-ja_JP
無視 http://server1.example.tld ./ Translation-ja
無視 http://server1.example.tld ./ Translation-ja_JP.eucJP
無視 http://server1.example.tld ./ Translation-en
ヒット http://jp.archive.ubuntu.com precise Release.gpg
ヒット http://jp.archive.ubuntu.com precise-updates Rele...
ヒット http://jp.archive.ubuntu.com precise-backports Re...
(省略)
ヒット http://security.ubuntu.com precise-security/unive...
951 kB を 22秒 で取得しました (42.0 kB/s)
パッケージリストを読み込んでいます... 完了
以上の手順により、作成した独自パッケージレポジトリが利用...
以上、Ubuntuでネットワークインストールに利用できる独自の...
#htmlinsertpcsp(linux_ads_btm.html,linux-sp.html)
ページ名: