• LFS6.3安装全过程(四)


    tar xvf db-4.5.20.tar.gz
    cd db-4.5.20
    patch -Np1 -i ../db-4.5.20-fixes-1.patch
    cd build_unix
    ../dist/configure --prefix=/usr --enable-compat185 --enable-cxx
    make
    make docdir=/usr/share/doc/db-4.5.20 install
    chown -Rv root:root /usr/share/doc/db-4.5.20
    cd ..
    cd ..
    rm -rf db-4.5.20

    tar xvf sed-4.1.5.tar.gz
    cd sed-4.1.5
    ./configure --prefix=/usr --bindir=/bin --enable-html
    make
    make install
    cd ..
    rm -rf sed-4.1.5

    tar xvf e2fsprogs-1.40.2.tar.gz
    cd e2fsprogs-1.40.2
    sed -i -e 's@/bin/rm@/tools&@' lib/blkid/test_probe.in
    mkdir -v build
    cd build
    ../configure --prefix=/usr --with-root-prefix="" \
    --enable-elf-shlibs
    make
    make install
    make install-libs
    cd ..
    cd ..
    rm -rf e2fsprogs-1.40.2

    tar xvf coreutils-6.9.tar.bz2
    cd coreutils-6.9
    patch -Np1 -i ../coreutils-6.9-uname-1.patch
    patch -Np1 -i ../coreutils-6.9-suppress_uptime_kill_su-1.patch
    patch -Np1 -i ../coreutils-6.9-i18n-1.patch
    chmod +x tests/sort/sort-mb-tests
    ./configure --prefix=/usr
    make
    make NON_ROOT_USERNAME=nobody check-root
    echo "dummy:x:1000:nobody" >> /etc/group
    su-tools nobody -s /bin/bash -c "make RUN_EXPENSIVE_TESTS=yes check"
    sed -i '/dummy/d' /etc/group
    make install
    mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin
    mv -v /usr/bin/{false,hostname,ln,ls,mkdir,mknod,mv,pwd,readlink,rm} /bin
    mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin
    mv -v /usr/bin/chroot /usr/sbin

    mv -v /usr/bin/{head,sleep,nice} /bin
    cd ..
    rm -rf coreutils-6.9

    tar xvf iana-etc-2.20.tar.bz2
    cd iana-etc-2.20
    make
    make install
    cd ..
    rm -rf iana-etc-2.20

    tar xvf m4-1.4.10.tar.bz2
    cd m4-1.4.10
    ./configure --prefix=/usr
    make
    make install
    cd ..
    rm -rf m4-1.4.10

    tar xvf bison-2.3.tar.bz2
    cd bison-2.3
    ./configure --prefix=/usr
    echo '#define YYENABLE_NLS 1' >> config.h
    make
    make install
    cd ..
    rm -rf bison-2.3

    tar xvf ncurses-5.6.tar.gz
    cd ncurses-5.6
    patch -Np1 -i ../ncurses-5.6-coverity_fixes-1.patch
    ./configure --prefix=/usr --with-shared --without-debug --enable-widec
    make
    make install
    chmod -v 644 /usr/lib/libncurses++w.a
    mv -v /usr/lib/libncursesw.so.5* /lib
    ln -sfv http://www.cnblogs.com/lib/libncursesw.so.5 /usr/lib/libncursesw.so

    for lib in curses ncurses form panel menu ; do \
    rm -vf /usr/lib/lib${lib}.so ; \
    echo "INPUT(-l${lib}w)" >/usr/lib/lib${lib}.so ; \
    ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \
    done
    ln -sfv libncurses++w.a /usr/lib/libncurses++.a

    rm -vf /usr/lib/libcursesw.so
    echo "INPUT(-lncursesw)" >/usr/lib/libcursesw.so
    ln -sfv libncurses.so /usr/lib/libcurses.so
    ln -sfv libncursesw.a /usr/lib/libcursesw.a
    ln -sfv libncurses.a /usr/lib/libcurses.a

    make distclean
    ./configure --prefix=/usr --with-shared --without-normal \
    --without-debug --without-cxx-binding
    make sources libs
    cp -av lib/lib*.so.5* /usr/lib

    cd ..
    rm -rf ncurses-5.6

    tar xvf procps-3.2.7.tar.gz
    cd procps-3.2.7
    make
    make install
    cd ..
    rm -rf procps-3.2.7

    tar xvf libtool-1.5.24.tar.gz
    cd libtool-1.5.24
    ./configure --prefix=/usr
    make
    make install
    cd ..
    rm -rf libtool-1.5.24

    tar xvf perl-5.8.8.tar.bz2
    cd perl-5.8.8
    echo "127.0.0.1 localhost $(hostname)" > /etc/hosts
    ./configure.gnu --prefix=/usr \
    -Dman1dir=/usr/share/man/man1 \
    -Dman3dir=/usr/share/man/man3 \
    -Dpager="/usr/bin/less -isR"
    make
    make install
    cd ..
    rm -rf perl-5.8.8

    tar xvf readline-5.2.tar.gz
    cd readline-5.2
    sed -i '/MV.*old/d' Makefile.in
    sed -i '/{OLDSUFF}/c:' support/shlib-install
    patch -Np1 -i ../readline-5.2-fixes-3.patch
    ./configure --prefix=/usr --libdir=/lib
    make SHLIB_LIBS=-lncurses
    make install
    mv -v /lib/lib{readline,history}.a /usr/lib
    rm -v /lib/lib{readline,history}.so
    ln -sfv http://www.cnblogs.com/lib/libreadline.so.5 /usr/lib/libreadline.so
    ln -sfv http://www.cnblogs.com/lib/libhistory.so.5 /usr/lib/libhistory.so
    cd ..
    rm -rf readline-5.2

    tar xvf zlib-1.2.3.tar.gz
    cd zlib-1.2.3
    ./configure --prefix=/usr --shared --libdir=/lib
    make
    make install
    rm -v /lib/libz.so
    ln -sfv http://www.cnblogs.com/lib/libz.so.1.2.3 /usr/lib/libz.so
    make clean
    ./configure --prefix=/usr
    make
    make install
    chmod -v 644 /usr/lib/libz.a
    cd ..
    rm -rf zlib-1.2.3

    tar xvf autoconf-2.61.tar.bz2
    cd autoconf-2.61
    ./configure --prefix=/usr
    make
    make install
    cd ..
    rm -rf autoconf-2.61

    tar xvf automake-1.10.tar.bz2
    cd automake-1.10
    ./configure --prefix=/usr
    make
    make install
    cd ..
    rm -rf automake-1.10

    tar xvf bash-3.2.tar.gz
    cd bash-3.2
    tar -xvf ../bash-doc-3.2.tar.gz
    sed -i "s|htmldir = @htmldir@|htmldir = /usr/share/doc/bash-3.2|" \
    Makefile.in
    patch -Np1 -i ../bash-3.2-fixes-5.patch
    ./configure --prefix=/usr --bindir=/bin \
    --without-bash-malloc --with-installed-readline
    make
    sed -i 's/LANG/LC_ALL/' tests/intl.tests
    sed -i 's@tests@& </dev/tty@' tests/run-test
    chown -Rv nobody ./
    su-tools nobody -s /bin/bash -c "make tests"
    make install
    cd ..
    rm -rf bash-3.2

    exec /bin/bash --login +h

    tar xvf bzip2-1.0.4.tar.gz
    cd bzip2-1.0.4
    patch -Np1 -i ../bzip2-1.0.4-install_docs-1.patch
    make -f Makefile-libbz2_so
    make clean
    make
    make PREFIX=/usr install
    cp -v bzip2-shared /bin/bzip2
    cp -av libbz2.so* /lib
    ln -sv http://www.cnblogs.com/lib/libbz2.so.1.0 /usr/lib/libbz2.so
    rm -v /usr/bin/{bunzip2,bzcat,bzip2}
    ln -sv bzip2 /bin/bunzip2
    ln -sv bzip2 /bin/bzcat
    cd ..
    rm -rf bzip2-1.0.4

    tar xvf diffutils-2.8.1.tar.gz
    cd diffutils-2.8.1
    patch -Np1 -i ../diffutils-2.8.1-i18n-1.patch
    touch man/diff.1
    ./configure --prefix=/usr
    make
    make install
    cd ..
    rm -rf diffutils-2.8.1

    tar xvf file-4.21.tar.gz
    cd file-4.21
    ./configure --prefix=/usr
    make
    make install
    cd ..
    rm -rf file-4.21

    tar xvf findutils-4.2.31.tar.gz
    cd findutils-4.2.31
    ./configure --prefix=/usr --libexecdir=/usr/lib/findutils \
    --localstatedir=/var/lib/locate
    make
    make install
    mv -v /usr/bin/find /bin
    sed -i -e 's/find:=${BINDIR}/find:=\/bin/' /usr/bin/updatedb
    cd ..
    rm -rf findutils-4.2.31

    tar xvf flex-2.5.33.tar.bz2
    cd flex-2.5.33
    ./configure --prefix=/usr
    make
    make install
    ln -sv libfl.a /usr/lib/libl.a
    cat > /usr/bin/lex << "EOF"
    #!/bin/sh
    # Begin /usr/bin/lex

    exec /usr/bin/flex -l "$@"

    # End /usr/bin/lex
    EOF
    chmod -v 755 /usr/bin/lex
    cd ..
    rm -rf flex-2.5.33

    tar xvf grub-0.97.tar.gz
    cd grub-0.97
    patch -Np1 -i ../grub-0.97-disk_geometry-1.patch
    ./configure --prefix=/usr
    make
    make install
    mkdir -v /boot/grub
    cp -v /usr/lib/grub/i386-pc/stage{1,2} /boot/grub
    cd ..
    rm -rf grub-0.97

    tar xvf gawk-3.1.5.tar.bz2
    cd gawk-3.1.5
    patch -Np1 -i ../gawk-3.1.5-segfault_fix-1.patch
    ./configure --prefix=/usr --libexecdir=/usr/lib
    cat >> config.h << "EOF"
    #define HAVE_LANGINFO_CODESET 1
    #define HAVE_LC_MESSAGES 1
    EOF
    make
    make install
    cd ..
    rm -rf gawk-3.1.5

    tar xvf gettext-0.16.1.tar.gz
    cd gettext-0.16.1
    ./configure --prefix=/usr
    make
    make install
    cd ..
    rm -rf gettext-0.16.1

    tar xvf grep-2.5.1a.tar.bz2
    cd grep-2.5.1a
    patch -Np1 -i ../grep-2.5.1a-redhat_fixes-2.patch
    chmod +x tests/fmbtest.sh
    ./configure --prefix=/usr --bindir=/bin
    make
    make install
    cd ..
    rm -rf grep-2.5.1a

    tar xvf groff-1.18.1.4.tar.gz
    cd groff-1.18.1.4
    patch -Np1 -i ../groff-1.18.1.4-debian_fixes-1.patch
    sed -i -e 's/2010/002D/' -e 's/2212/002D/' \
    -e 's/2018/0060/' -e 's/2019/0027/' font/devutf8/R.proto
    PAGE=A4 ./configure --prefix=/usr --enable-multibyte
    make
    make install
    ln -sv eqn /usr/bin/geqn
    ln -sv tbl /usr/bin/gtbl
    cd ..
    rm -rf groff-1.18.1.4

    tar xvf gzip-1.3.12.tar.gz
    cd gzip-1.3.12
    ./configure --prefix=/usr --bindir=/bin
    make
    make install
    mv -v /bin/{gzexe,uncompress,zcmp,zdiff,zegrep} /usr/bin
    mv -v /bin/{zfgrep,zforce,zgrep,zless,zmore,znew} /usr/bin
    cd ..
    rm -rf gzip-1.3.12

    tar xvf inetutils-1.5.tar.gz
    cd inetutils-1.5
    patch -Np1 -i ../inetutils-1.5-no_server_man_pages-2.patch
    ./configure --prefix=/usr --libexecdir=/usr/sbin \
    --sysconfdir=/etc --localstatedir=/var \
    --disable-ifconfig --disable-logger --disable-syslogd \
    --disable-whois --disable-servers
    make
    make install
    mv -v /usr/bin/ping /bin
    cd ..
    rm -rf inetutils-1.5

    tar xvf iproute2-2.6.20-070313.tar.gz
    cd iproute-2.6.20-070313
    sed -i -e '/tc-bfifo.8/d' -e '/tc-pfifo.8/s/pbfifo/bfifo/' Makefile
    make SBINDIR=/sbin
    make SBINDIR=/sbin install
    mv -v /sbin/arpd /usr/sbin
    cd ..
    rm -rf iproute-2.6.20-070313

    tar xvf kbd-1.12.tar.bz2
    cd kbd-1.12
    patch -Np1 -i ../kbd-1.12-backspace-1.patch
    patch -Np1 -i ../kbd-1.12-gcc4_fixes-1.patch
    ./configure --datadir=/lib/kbd
    make
    make install
    mv -v /usr/bin/{kbd_mode,openvt,setfont} /bin
    cd ..
    rm -rf kbd-1.12

    tar xvf less-406.tar.gz
    cd less-406
    ./configure --prefix=/usr --sysconfdir=/etc
    make
    make install
    cd ..
    rm -rf less-406

    tar xvf make-3.81.tar.bz2
    cd make-3.81
    ./configure --prefix=/usr
    make
    make install
    cd ..
    rm -rf make-3.81

    tar xvf man-db-2.4.4.tar.gz
    cd man-db-2.4.4
    mv man/de{_DE.88591,}
    mv man/es{_ES.88591,}
    mv man/it{_IT.88591,}
    mv man/ja{_JP.eucJP,}
    sed -i 's,\*_\*,??,' man/Makefile.in
    sed -i -e '\%\t/usr/man%d' -e '\%\t/usr/local/man%d' src/man_db.conf.in
    cat >> include/manconfig.h.in << "EOF"
    #define WEB_BROWSER "exec /usr/bin/lynx"
    #define COL "/usr/bin/col"
    #define VGRIND "/usr/bin/vgrind"
    #define GRAP "/usr/bin/grap"
    EOF
    patch -Np1 -i ../man-db-2.4.4-fixes-1.patch
    ./configure --prefix=/usr --enable-mb-groff --disable-setuid
    make
    make install
    cat >> convert-mans << "EOF"
    #!/bin/sh -e
    FROM="$1"
    TO="$2"
    shift ; shift
    while [ $# -gt 0 ]
    do
    FILE="$1"
    shift
    iconv -f "$FROM" -t "$TO" "$FILE" >.tmp.iconv
    mv .tmp.iconv "$FILE"
    done
    EOF
    install -m755 convert-mans /usr/bin
    mkdir -p /usr/share/man/en
    cp -rv man /usr/share/man/en
    cd ..
    rm -rf man-db-2.4.4

    tar xvf mktemp-1.5.tar.gz
    cd mktemp-1.5
    patch -Np1 -i ../mktemp-1.5-add_tempfile-3.patch
    ./configure --prefix=/usr --with-libc
    make
    make install
    make install-tempfile
    cd ..
    rm -rf cd mktemp-1.5

    tar xvf module-init-tools-3.2.2.tar.bz2
    cd module-init-tools-3.2.2
    patch -Np1 -i ../module-init-tools-3.2.2-modprobe-1.patch
    ./configure
    make check
    make distclean
    ./configure --prefix=/ --enable-zlib
    make
    make INSTALL=install install
    cd ..
    rm -rf module-init-tools-3.2.2

    tar xvf patch-2.5.4.tar.gz
    cd patch-2.5.4
    ./configure --prefix=/usr
    make
    make install
    cd ..
    rm -rf patch-2.5.4

    tar xvf psmisc-22.5.tar.gz
    cd psmisc-22.5
    ./configure --prefix=/usr --exec-prefix=""
    make
    make install
    mv -v /bin/pstree* /usr/bin
    ln -sv killall /bin/pidof
    cd ..
    rm -rf psmisc-22.5

    tar xvf shadow-4.0.18.1.tar.bz2
    cd shadow-4.0.18.1
    patch -Np1 -i ../shadow-4.0.18.1-useradd_fix-2.patch
    ./configure --libdir=/lib --sysconfdir=/etc --enable-shared \
    --without-selinux
    sed -i 's/groups$(EXEEXT) //' src/Makefile
    find man -name Makefile -exec sed -i 's/groups\.1 / /' {} \;
    sed -i -e 's/ ko//' -e 's/ zh_CN zh_TW//' man/Makefile

    for i in de es fi fr id it pt_BR; do
    convert-mans UTF-8 ISO-8859-1 man/${i}`"
    make DESTDIR=/ EXTRAS="`echo extras/*/`" install
    cp -v etc/udev/rules.d/[0-9]* /etc/udev/rules.d/
    cd udev-config-6.3
    make install
    make install-doc
    make install-extra-doc
    cd ..
    install -m644 -v docs/writing_udev_rules/index.html \
    /usr/share/doc/udev-113/index.html
    cd ..
    rm -rf udev-113

    tar xvf util-linux-2.12r.tar.bz2
    cd util-linux-2.12r
    sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
    -i $(grep -rl '/etc/adjtime' .)
    mkdir -pv /var/lib/hwclock
    patch -Np1 -i ../util-linux-2.12r-cramfs-1.patch
    patch -Np1 -i ../util-linux-2.12r-lseek-1.patch
    ./configure
    make HAVE_KILL=yes HAVE_SLN=yes
    make HAVE_KILL=yes HAVE_SLN=yes install
    cd ..
    rm -rf util-linux-2.12r

    tar xvf vim-7.1.tar.bz2
    cd vim71
    patch -Np1 -i ../vim-7.1-fixes-1.patch
    patch -Np1 -i ../vim-7.1-mandir-1.patch
    echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
    ./configure --prefix=/usr --enable-multibyte
    make
    make install
    ln -sv vim /usr/bin/vi
    for L in "" fr it pl ru; do
    ln -sv vim.1 /usr/share/man/$L/man1/vi.1
    done
    ln -sv ../vim/vim71/doc /usr/share/doc/vim-7.1
    cat > /etc/vimrc << "EOF"
    " Begin /etc/vimrc

    set nocompatible
    set backspace=2
    syntax on
    if (&term == "iterm") || (&term == "putty")
    set background=dark
    endif

    " End /etc/vimrc
    EOF
    cd ..
    rm -rf vim71

    logout

  • 相关阅读:
    MVC发布出现:未能将文件binxxx.xml 复制到 objReleasePackageTmpinxxx.xml,未能找到文件
    微信第三方平台,微信支付开发 服务商模式 签名错误
    微信第三方平台代公众号发起网页授权 48001 api unauthorized 问题
    微信官方平台第三方开发 关于代公众号发起网页授权
    关于微信第三方平台全网发布的坑
    ASP.NET之MVC 微信公众号授权给第三方平台的技术实现流程(获取第三方平台access_token)
    Maven命令安装jar包到本地仓库
    jsp中jstl标签的类似 if
    一道经典的Java面试题:equals ,== 和hashcode()的区别
    Eclipse快捷键-方便查找
  • 原文地址:https://www.cnblogs.com/snailrun/p/2644834.html
Copyright © 2020-2023  润新知