Skip to content

Instantly share code, notes, and snippets.

@tsujimitsu
Created September 23, 2012 08:23
Show Gist options
  • Save tsujimitsu/3769342 to your computer and use it in GitHub Desktop.
Save tsujimitsu/3769342 to your computer and use it in GitHub Desktop.
Linux

Create Local Repository

epel

Download rpm files

### Download Mirror Repository Files by wget
$ mkdir -p /usr/local/setup/local-repo/epel/6/x86_64/
$ cd /usr/local/setup/local-repo/epel/6/x86_64/
$ wget -r -np -nH -l 1 --timestamping -A .rpm -R "index.html?*" http://dl.fedoraproject.org/pub/epel/6/x86_64/
→ wgetで対象サイトからダウンロード(再帰的に、親ディレクトリは除外、ローカルディレクトリより新しいものを)
$ cd /usr/local/setup/local-repo/epel/6/
$ wget http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6

Maintain repository directory

$ rm -f /usr/local/setup/local-repo/epel/6/x86_64/robots.txt
$ cp -Rp /usr/local/setup/local-repo/epel/6/x86_64/pub/epel/6/x86_64 /usr/local/setup/local-repo/epel/6/x86_64
$ rm -rf /usr/local/setup/local-repo/epel/6/x86_64/pub

Edit .repo file

$ vi /etc/yum.repos.d/local-repo.repo
[local-epel]
name=Extra Packages for Enterprise Linux 6 - x86_64 (local repository)
baseurl=file:///usr/local/setup/local-repo/epel/6/x86_64
enabled=0
gpgcheck=1
gpgkey=file:///usr/local/setup/local-repo/epel/6/RPM-GPG-KEY-EPEL

Create repo command

$ yum install -y createrepo
$ createrepo /usr/local/setup/local-repo/epel/6/x86_64

Test install

$ yum install cobbler --enablerepo=local-epel

Reference

# Reference
*1 http://itpro.nikkeibp.co.jp/article/COLUMN/20060227/230806/
*2 http://itpro.nikkeibp.co.jp/article/COLUMN/20060224/230589/
# kill*1
1625番のプロセスを強制終了する
$ kill -9 1625
# &*2
sortコマンドをバックグラウンドで動かす
$ sort address > result &
[1] 3603
$ jobs
[1]+ Running sort address > result &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment