|
楼主 |
发表于 2007-9-13 19:28:48
|
显示全部楼层
CBLFS部分 ( 几个常见软件的安装 )
CLFS完成之后,还只是一个基础系统,很多事情都做不了.当然,也还不能满足我的需要.所以还需要继续安装软件.我选择先安 装一些比较常见比较有用的软件.
0101-PCI_Utilities-64bit- cd /sources
- tar xf /CBLFS/pciutils-2.2.6.tar.bz2
- cd pciutils-2.2.6
- sed -i 's/null ;/null 2>\&1 ;/' update-pciids.sh &&
- make PREFIX=/usr LIBDIR=/usr/lib64 CC="gcc ${BUILD64}" ZLIB=no
- make PREFIX=/usr LIBDIR=/usr/lib64 install
- make PREFIX=/usr LIBDIR=/usr/lib64 install-lib
- cd ..
- rm -rf pciutils-2.2.6
复制代码
0102-cpio-64bit- cd /sources
- tar xf /CBLFS/cpio-2.9.tar.bz2
- CC="gcc ${BUILD64}" ./configure CPIO_MT_PROG=mt --prefix=/usr --libdir=/usr/lib64 \
- --bindir=/bin --libexecdir=/tmp \
- --with-rmt=/usr/sbin/rmt &&
- make
- make install
- cd ..
- rm -rf cpio-2.9
复制代码
0103-pkg-config-x86_64- cd /sources
- tar xvf /CBLFS/pkg-config-0.22.tar.gz
- cp -a pkg-config-0.22{,-64}
- # 32bit
- cd pkg-config-0.22
- # Compile the package:
- CC="gcc ${BUILD32}" ./configure --prefix=/usr --with-pc-path=/usr/share/pkgconfig &&
- make
- # Install the package
- make install
- mv -v /usr/bin/pkg-config{,-32}
- # 64bit
- cd ../pkg-config-0.22-64
- # Compile the package:
- CC="gcc ${BUILD64}" ./configure --prefix=/usr --with-pc-path=/usr/share/pkgconfig &&
- make
- # Install the package
- make install
- cd /sources
- rm -rf pkg-config-0.22{,-64}
- cat > /etc/profile << "EOF"
- # Begin /etc/profile
- # Based on the profile scripts in BLFS http://www.linuxfromscratch.org/blfs/view/svn/postlfs/profile.html
- for script in /etc/profile.d/*.sh
- do
- source $script
- done
- unset script
- # End /etc/profile.d
- EOF
- install -d -m755 /etc/profile.d
- cat > /etc/profile.d/10-pkg_config_path.sh << "EOF"
- # Begin /etc/profile.d/10-pkg_config_path.sh
- export PKG_CONFIG_PATH32="/usr/lib/pkgconfig"
- export PKG_CONFIG_PATHN32="/usr/lib32/pkgconfig"
- export PKG_CONFIG_PATH64="/usr/lib64/pkgconfig"
- # End /etc/profile.d/10-pkg_config_path.sh
- EOF
- source /etc/profile
复制代码 注意: 上面的 source /etc/profile 这条命令一定要手工敲入。
0104-openSSL-64bit- cd /sources
- tar xf /CBLFS/openssl-0.9.8e.tar.gz
- # 64bit
- #cd ../openssl-0.9.8e-64
- # This patch allows OpenSSL to be installed into a dir other then lib:
- patch -Np1 -i /CBLFS/openssl-0.9.8e-allow_lib64-1.patch
- # Apply patch to correct GCC-4.2.0 problems:
- patch -Np1 -i /CBLFS/openssl-0.9.8e-gcc42_fix-1.patch
- # Configure the Package (Use the appropriate command):
- ./Configure linux-x86_64 --openssldir=/etc/ssl --prefix=/usr shared
- # Compile the package:
- USE_ARCH=64 make CC="gcc ${BUILD64}" PERL=/usr/bin/perl LIBDIR=lib64
- # Install the package:
- USE_ARCH=64 make PERL=/usr/bin/perl MANDIR=/usr/share/man LIBDIR=lib64 install
- #
- cd ..
- rm -rf openssl-0.9.8e{,-64}
复制代码
0105-OpenSSH-64bit- # OpenSSH User/Group & PrivSep Dir
- groupadd -g 48 sshd &&
- useradd -c 'sshd PrivSep' -d /var/lib/sshd -g sshd -s /bin/false -u 48 sshd &&
- install -v -m700 -d /var/lib/sshd &&
- chown -v root:sys /var/lib/sshd
- cd /sources
- tar xf /CBLFS/openssh-4.6p1.tar.gz
- cd openssh-4.6p1
- CC="gcc ${BUILD64}" ./configure --prefix=/usr --sysconfdir=/etc/ssh \
- --libexecdir=/usr/sbin --with-md5-passwords \
- --with-privsep-path=/var/lib/sshd &&
- make
- make install &&
- install -v -m755 -d /usr/share/doc/openssh-4.6p1 &&
- install -v -m644 INSTALL LICENCE OVERVIEW README* WARNING.RNG \
- /usr/share/doc/openssh-4.6p1
- cd ..
- rm -rf openssh-4.6p1{,-64}
- # Configuring
- # BootScript
- #Install the init script included in the blfs-bootscripts package.
- tar xf /CBLFS/blfs-bootscripts-20060910.tar.bz2
- cd blfs-bootscripts-20060910
- make install-sshd
复制代码
0106-glib-2- #Required
- # * pkg-config
- cd /sources
- # ftp://ftp.gtk.org/pub/glib/2.12/glib-2.14.0.tar.bz2
- tar xvf /CBLFS/glib-2.14.0.tar.bz2
- cp -a glib-2.14.0{,-64}
- # 32bit
- cd glib-2.14.0
- # Compile the package:
- CC="gcc ${BUILD32}" ./configure --prefix=/usr --host=${CLFS_TARGET32} &&
- make
- # Install the package
- make install
- # find /usr/bin/{glib-genmarshal,glib-gettextize,glib-mkenums,gobject-query} -exec mv -v {} {}-32 \;
- # 64bit
- cd ../glib-2.14.0-64
- # Compile the package:
- CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 &&
- make
- # Install the package
- make install
- cd ..
- rm -rf glib-2.14.0{,-64}
复制代码
0107-FUSE-64bit
这个包被SSHFS依赖。编译FUSE需要Linux kernel source , 如果在编译内核后删除了源码目录,需要重建源码目录,没有必要再编译一次内核。- # Required : Linux kernel source
- cd /sources
- tar xf /CBLFS/fuse-2.7.0.tar.gz
- cd fuse-2.7.0
- CC="gcc ${BUILD64}" ./configure --prefix=/usr \
- --libdir=/usr/lib64 --with-kernel=/lib64/modules/$(uname -r)/source &&
- make
- make install
- cd ..
- rm -rf fuse-2.7.0
复制代码
0108-SSHFS-64bit
这个软件很方便。我的台式机和笔记本拷贝文件就靠它了。- cd /sources
- tar xf /CBLFS/sshfs-fuse-1.8.tar.gz
- cd sshfs-fuse-1.8
- PKG_CONFIG_PATH="$PKG_CONFIG_PATH64" CC="gcc ${BUILD64}" \
- ./configure --prefix=/usr
- make
- make install
- cd ..
- rm -rf sshfs-fuse-1.8
复制代码
0109-eject-64bit
这个软件用来控制光驱托盘的进/出。- cd /sources
- tar xf /CBLFS/eject-2.1.5.tar.gz
- # 64bit
- cd eject
- CC="gcc ${BUILD64}" ./configure --prefix=/usr &&
- make
- make install
- cd ..
- rm -rf eject
复制代码
0110-wget-64bit- cd /sources
- tar xvf /CBLFS/wget-1.10.2.tar.gz
- cd wget-1.10.2
- CC="gcc ${BUILD64}" ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64 &&
- make
- make install
- cd ..
- rm -rf wget-1.10.2{,-64}
复制代码
0111-GPM- cd /sources
- tar xvf /CBLFS/gpm-1.20.1.tar.bz2
- cp -a gpm-1.20.1{,-64}
- # 32bit
- cd gpm-1.20.1
- patch -Np1 -i /CBLFS/gpm-1.20.1-segfault-1.patch &&
- patch -Np1 -i /CBLFS/gpm-1.20.1-silent-1.patch &&
- CC="gcc ${BUILD32}" ./configure --prefix=/usr --sysconfdir=/etc &&
- LDFLAGS="-lm" make
- make install &&
- ldconfig
- mv -v /usr/sbin/gpm{,-32}
- #
- # 64bit
- cd ../gpm-1.20.1-64
- patch -Np1 -i /CBLFS/gpm-1.20.1-segfault-1.patch
- patch -Np1 -i /CBLFS/gpm-1.20.1-silent-1.patch
- CC="gcc ${BUILD64}" ./configure --prefix=/usr --sysconfdir=/etc \
- --libdir=/usr/lib64 &&
- LDFLAGS="-lm" make
- make install &&
- cp -v conf/gpm-root.conf /etc &&
- ldconfig
- cd ..
- rm -rf gpm-1.20.1{,-64}
- # BootScript
- #tar xvf /CBLFS/blfs-bootscripts-20060910.tar.bz2
- cd blfs-bootscripts-20060910
- make install-gpm
- # configuration information
- cat > /etc/sysconfig/mouse << "EOF"
- # Begin /etc/sysconfig/mouse
- MDEVICE="/dev/psaux"
- PROTOCOL="imps2"
- GPMOPTS=""
- # End /etc/sysconfig/mouse
- EOF
- /etc/rc.d/init.d/gpm start
复制代码
0112-zhcon-0.2.5-to-0.2.6-32bit
Linux中的ucdos,不用启图形就可以使用中文了。因为64位还有些问题,所以这里暂时安装32位的用用。zhcon 默认是 gb2312 编码,打过0.2.6补丁的支持utf8,可以在字符环境下敲入 zhcon --utf8 启动 。- cd /sources
- tar xvf /CBLFS/zhcon-0.2.5.tar.gz
- cd zhcon-0.2.5
- zcat /CBLFS/zhcon-0.2.5-to-0.2.6.diff.gz | patch -p1
- # 32bit
- CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \
- ./configure --prefix=/usr --sysconfdir=/etc/zhcon
- make
- make install
- mv -v /usr/bin/zhcon{,-32}
复制代码
0113-unzip- cd /sources
- tar xf /CBLFS/unzip552.tar.gz
- cd unzip-5.52
- make -f unix/Makefile LOCAL_UNZIP=-D_FILE_OFFSET_BITS=64 \
- CC="gcc ${BUILD64}" LD='$(CC)' CF="-O -Wall -I. -DUSE_UNSHRINK" \
- unzips
- make -f unix/Makefile prefix=/usr install
- cd ..
- rm -rf unzip-5.52
复制代码
0114-rar-for-linux- #Non-Multilib
- tar xf /CBLFS/rarlinux-3.7.1.tar.gz
- cd rar
- sed -i -e "s/\/local//" Makefile
- make install
- cd ..
- rm -rf rar
复制代码
0115-python- cd /sources
- tar xvf /CBLFS/Python-2.5.tar.bz2
- cp -a Python-2.5{,-64}
- # 32Bit
- cd Python-2.5
- # Compile the package:
- patch -Np1 -i /CBLFS/Python-2.5-gdbm-1.patch &&
- CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" ./configure --prefix=/usr \
- --enable-shared &&
- make EXTRA_CFLAGS="-fwrapv"
- # Install the package
- make install &&
- mv -v /usr/bin/python{,-32} &&
- mv -v /usr/bin/python2.5{,-32} &&
- mv -v /usr/include/python2.5/pyconfig{,-32}.h
- # 64Bit
- cd ../Python-2.5-64
- # Change the libdir that Python is going to use to lib64:
- patch -Np1 -i /CBLFS/Python-2.5-multilib-1.patch
- sed -i -e "s:@@MULTILIB_DIR@@:lib64:g" \
- Lib/distutils/command/install.py \
- Lib/distutils/sysconfig.py \
- Lib/site.py \
- Makefile.pre.in \
- Modules/Setup.dist \
- Modules/getpath.c \
- setup.py
- # Compile the package:
- patch -Np1 -i /CBLFS/Python-2.5-gdbm-1.patch &&
- CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" ./configure --prefix=/usr \
- --libdir=/usr/lib64 --enable-shared &&
- make EXTRA_CFLAGS="-fwrapv"
- # Install the package
- make install &&
- mv -v /usr/bin/python{,-64} &&
- mv -v /usr/bin/python2.5{,-64} &&
- ln -sfv multiarch_wrapper /usr/bin/python &&
- ln -sfv multiarch_wrapper /usr/bin/python2.5 &&
- mv -v /usr/include/python2.5/pyconfig{,-64}.h
- cd /sources
- rm -rf Python-2.5{,-64}
- # 这里选择通用的。详情请看CBLFS手册。
- # Creating a Generic Stub Header
- cat > /usr/include/python2.5/pyconfig.h << "EOF"
- /* pyconfig.h - Stub Header */
- #ifndef __STUB__PYCONFIG_H__
- #define __STUB__PYCONFIG_H__
- #if defined(__x86_64__) || \
- defined(__sparc64__) || \
- defined(__arch64__) || \
- defined(__powerpc64__) || \
- defined (__s390x__)
- # include "pyconfig-64.h"
- #else
- # include "pyconfig-32.h"
- #endif
- #endif /* __STUB__PYCONFIG_H__ */
- EOF
复制代码
0116-doxygen- cd /sources
- tar xvf /CBLFS/doxygen-1.5.3.src.tar.gz
- cp -a doxygen-1.5.3{,-64}
- # 32Bit
- cd doxygen-1.5.3
- # Compile the package:
- CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" ./configure --prefix /usr --docdir /usr/share/doc &&
- make
- # Install the package
- make install
- mv -v /usr/bin/doxygen{,-32}
- # 64Bit
- cd ../doxygen-1.5.3-64
- # Compile the package:
- CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" ./configure --prefix /usr --docdir /usr/share/doc &&
- make
- # Install the package
- make install
- #If you wish to generate and install the package documentation (note that man pages have already been installed), you must have Python, teTeX (for HTML docs) and Ghostscript (for PDF docs) installed, then issue the following command:
- #这里不需要:
- #make install_docs
- cd /sources
- rm -rf doxygen-1.5.3{,-64}
复制代码
0117-alsa-lib
安装了这么多软件,还没有安装图形,心情很郁闷。现在把alsa装上,把mpg123安装上,然后拷贝几个mp3过来听听。- cd /sources
- tar xvf /CBLFS/alsa-lib-1.0.14.tar.bz2
- cp -a alsa-lib-1.0.14{,-64}
- # 32Bit
- cd alsa-lib-1.0.14
- # Compile the package:
- CC="gcc ${BUILD32}" ./configure &&
- make
- # Install the package
- make install
- # 64Bit
- cd ../alsa-lib-1.0.14-64
- # Compile the package:
- CC="gcc ${BUILD64}" ./configure --libdir=/usr/lib64 &&
- make
- # Install the package
- make install &&
- install -v -m644 -D doc/asoundrc.txt \
- /usr/share/doc/alsa-lib-1.0.14/asoundrc.txt
- cd ..
- rm -rf alsa-lib-1.0.14{,-64}
复制代码
0118-alsa-plugins- cd /sources
- tar xvf /CBLFS/alsa-plugins-1.0.14.tar.bz2
- cp -a alsa-plugins-1.0.14{,-64}
- # 32Bit
- cd alsa-plugins-1.0.14
- # Compile the package:
- CC="gcc ${BUILD32}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" ./configure &&
- make
- # Install the package
- make install
- #cd /sources
- #tar xvf /CBLFS/alsa-plugins-1.0.14.tar.bz2
- # 64Bit
- cd ../alsa-plugins-1.0.14-64
- # Compile the package:
- CC="gcc ${BUILD64}" PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" ./configure --libdir=/usr/lib64 &&
- make
- # Install the package
- make install &&
- install -v -m755 -d /usr/share/doc/alsa-plugins-1.0.14 &&
- install -v -m644 doc/{README*,*.txt} \
- /usr/share/doc/alsa-plugins-1.0.14
- cd /sources
- rm -rf alsa-plugins-1.0.14{,-64}
复制代码
0119-alsa-utilities- cd /sources
- tar xvf /CBLFS/alsa-utils-1.0.14.tar.bz2
- cp -a alsa-utils-1.0.14{,-64}
- # 32Bit
- cd alsa-utils-1.0.14
- # Compile the package:
- CC="gcc ${BUILD32}" ./configure &&
- make
- # Install the package
- make install
- # 64Bit
- # Compile the package:
- cd ../alsa-utils-1.0.14-64
- CC="gcc ${BUILD64}" ./configure &&
- make
- # Install the package
- make install
- cd /sources
- rm -rf alsa-utils-1.0.14{,-64}
- # Configuration Information
- #
- # Use a bootscript to store the values at shutdown.
- cd /sources/blfs-bootscripts-20060910/
- make install-alsa
- # The first time the alsactl program is run from the udev rule below, it will complain that there is no state in /etc/asound.state. You can prevent this by running the following commands as the root user:
- [color=red]
- #touch /etc/asound.state &&
- #alsactl store
- [/color]
- # As the root user, install a new Udev rules file to create the audio device nodes and run the restore script:
- cat > /etc/udev/rules.d/15-alsa.rules << "EOF"
- # Give the audio group ownership of sound devices
- SUBSYSTEM=="sound", GROUP="audio"
- SUBSYSTEM=="snd", GROUP="audio"
- # ALSA Devices
- # When a sound device is detected, restore the volume settings
- KERNEL=="controlC[0-9]*", NAME="snd/%k", ACTION=="add", RUN+="/usr/sbin/alsactl restore %n"
- KERNEL=="hw[CD0-9]*", NAME="snd/%k"
- KERNEL=="pcm[CD0-9cp]*", NAME="snd/%k"
- KERNEL=="midiC[D0-9]*", NAME="snd/%k"
- KERNEL=="timer", NAME="snd/%k"
- KERNEL=="seq", NAME="snd/%k"
- EOF
- chmod 644 /etc/udev/rules.d/15-alsa.rules
- udevtrigger /etc/udev/rules.d/15-alsa.rules
复制代码
现在可以尝试运行 alsamixer 命令,调节音量大小了。m键是打开/关闭声音,上下光标键是调节大小,左右方向键移动,Esc或Ctrl加C键可以退出。
0120-alsa-tools- cd /sources
- tar xvf /CBLFS/alsa-tools-1.0.14.tar.bz2
- cp -a alsa-tools-1.0.14{,-64}
- # 32Bit
- cd alsa-tools-1.0.14
- cd ac3dec
- # Apply the following patch in the top-level directory of alsa-tools before building ac3dec:
- #patch -Np1 -i /CBLFS/alsa-tools-1.0.14-ac3dec_config_update-1.patch
- # Compile each package with:
- CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" USE_ARCH=32 PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" \
- ./configure --prefix=/usr &&
- make
- # Install each package with:
- make install
- # 64Bit
- cd ../../alsa-tools-1.0.14-64
- cd ac3dec
- # Apply the following patch in the top-level directory of alsa-tools before building ac3dec:
- #patch -Np1 -i /CBLFS/alsa-tools-1.0.14-ac3dec_config_update-1.patch
- # Before building qlo10k1 apply the following sed so it looks in the correct dir for libraries:
- sed -i "s@QTDIR/lib@&64@g" configure
- # Compile each package with:
- CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" USE_ARCH=64 PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" \
- ./configure --prefix=/usr --libdir=/usr/lib64 &&
- make
- # Install each package with:
- make install
- cd /sources
- rm -rf alsa-tools-1.0.14{,-64}
复制代码
0121-alsa-oss- cd /sources
- tar xvf /CBLFS/alsa-oss-1.0.14.tar.bz2
- cp -a alsa-oss-1.0.14{,-64}
- # 32Bit
- cd alsa-oss-1.0.14
- # Compile the package:
- CC="gcc ${BUILD32}" ./configure &&
- make
- # Install the package
- make install
- # 64Bit
- cd ../alsa-oss-1.0.14-64
- # Compile the package:
- CC="gcc ${BUILD64}" ./configure --libdir=/usr/lib64 &&
- make
- # Install the package
- make install
- cd /sources
- rm -rf alsa-oss-1.0.14{,-64}
复制代码
0122-mpg123- #Required
- # * ALSA OSS or OSS kernel Support
- cd /sources
- tar xvf /CBLFS/mpg123-0.67.tar.bz2
- cp -a mpg123-0.67{,-64}
- # 32Bit
- cd mpg123-0.67
- # Configure and compile the package:
- CC="gcc ${BUILD32}" ./configure --prefix=/usr &&
- make
- make install
- mv -v /usr/bin/mpg123{,-32}
- # 64bit
- cd ../mpg123-0.67-64
- CC="gcc ${BUILD64}" ./configure --prefix=/usr &&
- make
- make install
- cd ..
- rm -rf mpg123-0.67{,-64}
复制代码
如果硬盘上有mp3音乐,现在就可以用 mpg123 xxx.mp3 来播放mp3音乐了,可以使用通配符“ * ”号。
前面安装过openSSH 和 sshfs 了,所以这安装过openSSH之后,我就启用 ssh 服务从台式机登录到笔记本进行编译安装软件了。sshfs这个软件挺好用的,两台机器只需要用交叉线连接,配一下IP地址就可以了传送文件了。 |
|