BLFS系统工具

Fcron

定时任务,例如 make-ca 需要fcron来周期性更新证书

fcron
cd /sources

fcron_VERSION=3.2.1
tar xf fcron-${fcron_VERSION}.src.tar.gz
cd fcron-${fcron_VERSION}

# Fcron使用syslog的cron机制来记录所有消息

cat >> /etc/syslog.conf << "EOF"
# Begin fcron addition to /etc/syslog.conf

cron.* -/var/log/cron.log

# End fcron addition
EOF

# 重启syslogd是配置生效
/etc/rc.d/init.d/sysklogd reload

# 出于安全原因,需要为fcron创建一个普通用户和组
groupadd -g 22 fcron &&
useradd -d /dev/null -c "Fcron User" -g fcron -s /bin/false -u 22 fcron

# 修订文档的位置
find doc -type f -exec sed -i 's:/usr/local::g' {} \;

# 安装
./configure --prefix=/usr          \
            --sysconfdir=/etc      \
            --localstatedir=/var   \
            --without-sendmail     \
            --with-boot-install=no \
            --with-systemdsystemunitdir=no &&
make
make install

cpio

cpio
cd /sources

cpio_VERSION=2.15
tar xf cpio-${cpio_VERSION}.tar.bz2
cd cpio-${cpio_VERSION}

./configure --prefix=/usr \
            --enable-mt   \
            --with-rmt=/usr/libexec/rmt &&
make &&
makeinfo --html            -o doc/html      doc/cpio.texi &&
makeinfo --html --no-split -o doc/cpio.html doc/cpio.texi &&
makeinfo --plaintext       -o doc/cpio.txt  doc/cpio.texi

make install &&
install -v -m755 -d /usr/share/doc/cpio-${cpio_VERSION}/html &&
install -v -m644    doc/html/* \
                    /usr/share/doc/cpio-${cpio_VERSION}/html &&
install -v -m644    doc/cpio.{html,txt} \
                    /usr/share/doc/cpio-${cpio_VERSION}

hwdata

pciutils 提供支持: 包含当前PCI和厂商id数据

hwdata
cd /sources

hwdata_VERSION=0.385
tar xf hwdata-${hwdata_VERSION}.tar.gz
cd hwdata-${hwdata_VERSION}

./configure --prefix=/usr --disable-blacklist

make install

pciutils

依赖建议: hwdata

pciutils
cd /sources

pciutils_VERSION=3.13.0
tar xf pciutils-${pciutils_VERSION}.tar.gz
cd pciutils-${pciutils_VERSION}

# 避免安装pci.ids,防止和hwdata软件包冲突
sed -r '/INSTALL/{/PCI_IDS|update-pciids /d; s/update-pciids.8//}' \
    -i Makefile

# 安装PCI工具
make PREFIX=/usr                \
     SHAREDIR=/usr/share/hwdata \
     SHARED=yes

make PREFIX=/usr                \
     SHAREDIR=/usr/share/hwdata \
     SHARED=yes                 \
     install install-lib        &&

chmod -v 755 /usr/lib/libpci.so

# 然后再安装 hwdata 中的pci.ids文件
hwdata_VERSION=0.385
cd /sources/hwdata-${hwdata_VERSION}

install -m 644 pci.ids /usr/share/hwdata

which

which
cd /sources

which_VERSION=2.21
tar xf which-${which_VERSION}.tar.gz
cd which-${which_VERSION}

./configure --prefix=/usr &&
make &&
make install

sysstat

sysstat
cd /sources

sysstat_VERSION=12.7.6
tar xf sysstat-${sysstat_VERSION}.tar.xz
cd sysstat-${sysstat_VERSION}

sa_lib_dir=/usr/lib/sa    \
sa_dir=/var/log/sa        \
conf_dir=/etc/sysstat     \
./configure --prefix=/usr \
            --disable-file-attr &&
make

make install

# 通过 blfs-bootscripts-20240416 安装系统服务
cd /sources
cd blfs-bootscripts-20240416
make install-sysstat

通过cron配置定时运行

numactl

备注

numactl 不是BLFS官方手册包含,但是对于我维护服务器很有用,所以添加

numactl
cd /sources

numactl_VERSION=2.0.19
tar xf numactl-${numactl_VERSION}.tar.gz
cd numactl-${numactl_VERSION}

./configure --prefix=/usr \
            --disable-static

make

make install

ipmitool

备注

ipmitool 不是BLFS官方手册包含,但是对于我维护服务器很有用,所以添加

ipmitool
cd /sources

ipmitool_VERSION=
tar xf ipmitool-${ipmitool_VERSION}.tar.bz2
cd ipmitool-${ipmitool_VERSION}

./configure --prefix=/usr \
            --enable-mt   \
            --with-rmt=/usr/libexec/rmt &&
make &&
makeinfo --html            -o doc/html      doc/ipmitool.texi &&
makeinfo --html --no-split -o doc/ipmitool.html doc/ipmitool.texi &&
makeinfo --plaintext       -o doc/ipmitool.txt  doc/ipmitool.texi

make install &&
install -v -m755 -d /usr/share/doc/ipmitool-${ipmitool_VERSION}/html &&
install -v -m644    doc/html/* \
                    /usr/share/doc/ipmitool-${ipmitool_VERSION}/html &&
install -v -m644    doc/ipmitool.{html,txt} \
                    /usr/share/doc/ipmitool-${ipmitool_VERSION}

参考