码迷,mamicode.com
首页 > 其他好文 > 详细

LFS部署

时间:2016-05-11 20:17:12      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:lfs

LFS部署

 

参考网站

http://blog.chinaunix.net/uid-25909619-id-3766865.html

 

http://www.ha97.com/887.html

 

安装ssh wget 参考网站

http://blog.csdn.net/whoami021/article/details/18773421

http://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssl.html

http://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssh.htm

http://ftp.osuosl.org/pub/blfs/conglomeration/blfs-bootscripts/blfs-bootscripts-20060910.tar.bz2

 

 

主要工作步骤

1 准备工作

创建LFS创作基地

建立lfs用户的环境

 2 开始制作工具链

进入LFS包编译目录

第一次做工具链

测试工具链

3 创建root环境,第二次制作工具链  测试工具链

4 内核编译

5 配置ssh  wget

6 碰到的问题总结

 

 



livecd加载启动,然后wget 下载  wegt openssl   ssh  blfs-bootscripts 

Wget下载

1.  tar xvf wget-1.10.2.tar.gz  

2.  cd wget-1.10.2  

3.  ./configure --prefix=/usr --sysconfdir=/etc &&  

4.  make  

5.  make install  

6.  cd ..  

7.  rm -rf wget-1.10.2  

openssl

下载并解压然后包

./config--prefix=/usr         \

         --openssldir=/etc/ssl \

         --libdir=lib          \

         shared                \

         zlib-dynamic &&

make depend           &&

make

sed -i ‘s# libcrypto.a##;s# libssl.a##‘ Makefile
make MANDIR=/usr/share/man MANSUFFIX=ssl install &&
install -dv -m755 /usr/share/doc/openssl-1.0.2h  &&
cp -vfr doc/*     /usr/share/doc/openssl-1.0.2h

openssh

下载并解压包

install  -v -m700 -d /var/lib/sshd &&
chown    -v root:sys /var/lib/sshd &&
 
groupadd -g 50 sshd        &&
useradd  -c ‘sshd PrivSep‘ \
         -d /var/lib/sshd  \
         -g sshd           \
         -s /bin/false     \
         -u 50 sshd

 

./configure --prefix=/usr                     \
            --sysconfdir=/etc/ssh             \
            --with-md5-passwords              \
            --with-privsep-path=/var/lib/sshd &&
make

blfs-bootscripts可以让ssh 自动开启启动。

1.  tar xvf blfs-bootscripts-20060910.tar.bz2  

2.  cd blfs-bootscripts-20060910  

3.  make install-sshd  

4.  cd ..  

5.  rm -rf blfs-bootscripts-20060910  

 

6碰到的问题总结

 

问题1    在第二次配置工具链的时候做make  有问题, 还有就是make  check 过不去一直有点错误   工具链测试过不了

 

解决方法, make不过去, 因为我的root环境配置 有问题,  make  check 2个报错  但是可以忽略

工具链 测试readelf -l a.out | grep‘tools‘     提示no  a.out 文件或者目录   前面的第二次配置环境 chroot 的部署不知root的用户目录下面造成过一次

 

问题2   E2fsprogs-1.40.2  make  check  报错提示 failed  to allocate scratch memory   这个问题我在网上没有找到好的解决方法,    直接用sed 的设置把它给忽略跳过

 

 

问题3   编译完成重启后,grub下面,   

解决方法,  是因为我的/boot/grub/menu.lst 文件配置错误   root=/dev/hda2 写错

 

 

问题4 重启后一直处于  startingsystem log daemon   然后不启动了

 

解决问题,是因为我的/etc/inittab 文件中有一个把:写错为了;

 

 

 


LFS部署

标签:lfs

原文地址:http://527322.blog.51cto.com/517322/1772166

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!