ESXi上で仮想マシンテンプレートの構築 (その5 ネットワークユーティリティのインストール)

作業日: 30 Apr., 2013
BLFS Version 2013-04-27

今回は、ネットワーク関係のプログラムのインストール。
chroot環境でroot権限で実行するので本来は不要だが、仮にユーザ権限で実行した場合にsudoが必要なコマンドには、sudoをつけてある。

今回インストールするソフトウェアは、インストール順に下記の通り。

  1. rsync client
  2. Traceroute
  3. BIND Utilities
  4. Whois
  5. Net-tools
  6. attr
  7. libcap2
  8. ntp
  9. dhcpcd

rsync-3.0.9 client

cd /root/src-blfs &&
wget http://samba.org/ftp/rsync/src/rsync-3.0.9.tar.gz &&
tar zxf rsync-3.0.9.tar.gz &&
cd rsync-3.0.9 &&
./configure --prefix=/usr &&
make &&
make check &&
sudo make install &&
cd ../ &&
rm -rf rsync-3.0.9

Traceroute-2.0.19

cd /root/src-blfs &&
wget http://downloads.sourceforge.net/traceroute/traceroute-2.0.19.tar.gz &&
tar zxf traceroute-2.0.19.tar.gz &&
cd traceroute-2.0.19 &&
make &&
make prefix=/usr install &&
mv /usr/bin/traceroute /bin &&
cd ../ &&
rm -rf traceroute-2.0.19

BIND Utilities-9.9.2-P2

BLFSのダウンロード先からはダウンロードできなかったので注意。

cd /root/src-blfs &&
wget http://ftp.isc.org/isc/bind9/cur/9.9/bind-9.9.2-P2.tar.gz &&
tar zxf bind-9.9.2-P2.tar.gz &&
cd bind-9.9.2-P2 &&
./configure --prefix=/usr &&
make -C lib/dns &&
make -C lib/isc &&
make -C lib/bind9 &&
make -C lib/isccfg &&
make -C lib/lwres &&
make -C bin/dig &&
sudo make -C bin/dig install &&
cd ../ &&
rm -rf bind-9.9.2-P2

Whois 5.0.24

cd /root/src-blfs &&
wget http://ftp.debian.org/debian/pool/main/w/whois/whois_5.0.24.tar.xz &&
tar Jxf whois_5.0.24.tar.xz &&
cd whois-5.0.24 &&
make &&
make pos &&
make prefix=/usr install-whois &&
make prefix=/usr install-mkpasswd &&
make prefix=/usr install-pos &&
cd ../ &&
rm -rf whois-5.0.24

Net-tools-CVS_20101030

cd /root/src-blfs &&
wget http://anduin.linuxfromscratch.org/sources/BLFS/svn/n/net-tools-CVS_20101030.tar.gz &&
tar zxf net-tools-CVS_20101030.tar.gz &&
cd net-tools-CVS_20101030 &&
sed -i -e '/Token/s/y$/n/' config.in &&
sed -i -e '/HAVE_HWSTRIP/s/y$/n/' config.in &&
yes "" | make config                 &&
make &&
make update &&
cd ../ &&
rm -rf net-tools-CVS_20101030

attr-2.4.46

cd /root/src-blfs &&
wget http://download.savannah.gnu.org/releases/attr/attr-2.4.46.src.tar.gz &&
tar zxf attr-2.4.46.src.tar.gz &&
cd attr-2.4.46 &&
sed -i -e 's|/@pkg_name@|&-@pkg_version@|' include/builddefs.in &&
INSTALL_USER=root  \
INSTALL_GROUP=root \
./configure --prefix=/usr --libdir=/lib --libexecdir=/usr/lib &&
make &&
make tests root-tests ext-tests

テストは失敗するけど気にせずに続行。

sudo make install install-dev install-lib &&
sudo chmod -v 0755 /lib/libattr.so.1.1.0           &&
sudo rm -v /lib/libattr.{a,la,so}                  &&
sudo sed -i 's@/lib@/usr/lib@' /usr/lib/libattr.la &&
sudo ln -sfv ../../lib/libattr.so.1 /usr/lib/libattr.so

libcap2-2.22

cd /root/src-blfs &&
wget http://ftp.de.debian.org/debian/pool/main/libc/libcap2/libcap2_2.22.orig.tar.gz &&
tar zxf libcap2_2.22.orig.tar.gz &&
cd libcap-2.22 &&
make &&
sudo make RAISE_SETFCAP=no install &&
cd ../ &&
rm -rf libcap-2.22

ntp-4.2.6p5

cd /root/src-blfs &&
wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.6p5.tar.gz &&
tar zxf ntp-4.2.6p5.tar.gz &&
cd ntp-4.2.6p5 &&
groupadd -g 87 ntp &&
useradd -c "Network Time Protocol" -d /var/lib/ntp -u 87 \
        -g ntp -s /bin/false ntp &&
./configure --prefix=/usr --sysconfdir=/etc \
            --with-binsubdir=sbin &&
make &&
make check &&
sudo make install &&
sudo install -v -m755 -d /usr/share/doc/ntp-4.2.6p5 &&
sudo cp -v -R html/* /usr/share/doc/ntp-4.2.6p5/ &&
cd ../ &&
rm -rf ntp-4.2.6p5
sudo sh -c '
cat > /etc/ntp.conf << "EOF"
# Africa
server tock.nml.csir.co.za

# Asia
server 0.asia.pool.ntp.org

# Australia
server 0.oceania.pool.ntp.org

# Europe
server 0.europe.pool.ntp.org

# North America
server 0.north-america.pool.ntp.org

# South America
server 2.south-america.pool.ntp.org

driftfile /var/cache/ntp.drift
pidfile   /var/run/ntpd.pid
EOF'
tar jxf blfs-bootscripts-20130324.tar.bz2 &&
cd blfs-bootscripts-20130324 &&
sudo make install-ntpd &&
cd ../ &&
rm -rf blfs-bootscripts-20130324 &&
sudo ln -v -sf ../init.d/setclock /etc/rc.d/rc0.d/K46setclock &&
sudo ln -v -sf ../init.d/setclock /etc/rc.d/rc6.d/K46setclock

dhcpcd-5.6.7

cd /root/src-blfs &&
wget http://roy.marples.name/downloads/dhcpcd/dhcpcd-5.6.7.tar.bz2 &&
tar jxf dhcpcd-5.6.7.tar.bz2 &&
cd dhcpcd-5.6.7 &&
./configure --libexecdir=/lib/dhcpcd \
            --dbdir=/run             \
            --sysconfdir=/etc &&
make &&
sudo make install &&
sudo sed -i "s;/var/lib;/run;g" dhcpcd-hooks/50-dhcpcd-compat &&
sudo install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/ &&
cd ../ &&
rm -rf dhcpcd-5.6.7
tar jxf blfs-bootscripts-20130324.tar.bz2 &&
cd blfs-bootscripts-20130324 &&
sudo make install-service-dhcpcd &&
cd ../ &&
rm -rf blfs-bootscripts-20130324
cat > /etc/sysconfig/ifconfig.eth0 << "EOF"
ONBOOT="yes"
IFACE="eth0"
SERVICE="dhcpcd"
DHCP_START=""
DHCP_STOP="-k"
EOF

Comments are closed.