第1步:进Bios设置live-cd启动,把下载的share中的文件拷贝到/sources目录中,以便和lfs安装其他软件一样,注意启动时设置bios启动设备第一项为光盘启动: export.html' target='_blank'>export LFS=/mnt/lfs mkdir -pv $LFS mount /dev/hda2 $LFS mkdir -v $LFS/mylfsshell wget http://www.openssl.org/source/openssl-0.9.8g.tar.gz wget http://www.linuxfromscratch.org/patches/blfs/6.3/openssl-0.9.8g-fix_manpages-1.patch wget http://sunsite.ualberta.ca/pub/OpenBSD/OpenSSH/portable/openssh-4.7p1.tar.gz wget http://us1.samba.org/samba/ftp/stable/samba-3.0.30.tar.gz wget http://blogimg.chinaunix.net/blog/upfile2/081013235116.zip unzip 081013235116.zip chmod 777 $LFS/mylfsshell/*.sh cp $LFS/mylfsshell/*.* $LFS/sources/ 第2步:进Bios设置硬盘启动,登陆root账户,安装openssh和samba client,这里我把安装命令做成批处理了,可以直接执行: sh /sources/01.sh 第3步,重新编译linux内核,使内核支持smbfs,由于lfs6.3内核默认的没有编译smbfs,所以这里需要重新编译内核,这里和lfs6.3手册里类似: cd /sources tar xvf linux-2.6.22.5.tar.bz2 cd linux-2.6.22.5 make mrproper make menuconfig make make modules_install cp -v arch/i386/boot/bzImage /boot/lfskernel-2.6.22.5 cp -v System.map /boot/System.map-2.6.22.5 cp -v .config /boot/config-2.6.22.5 install -d /usr/share/doc/linux-2.6.22.5 cp -r Documentation/* /usr/share/doc/linux-2.6.22.5 第4步,大功告成,重启系统,从硬盘启动 reboot 启动ssh,这样就可以windows里面的SecureCRT可以登入了,哈,简单吧 /usr/sbin/sshd 检查sshd服务是否正常启动: ps -aux|grep sshd