很多朋友编完lfs6.3之后还想继续安装其他软件,但苦于需要敲入很多命令容易出错,所以一般还需要安装openssh,这样就可以在windows里面用客户端SecureCRT来连接wmware中的lfs 6.3直接copy&paste了。安装samba客户端主要用来方便与windows共享文件。本文主要参照: blfs6.3 关于如何半自动化以及自动化安装lfs6.3 我之前有文章: LFS6.3半自动化脚本(原创) http://blog.chinaunix.net/u2/81513/showart.php?id=1276386 LFS6.3自动化脚本-之ALFS(jhalfs-2.3.1)(原创)http://blog.chinaunix.net/u2/81513/showart.php?id=1276389注意:在vmware中livecd通过动态域名获取的ip为192.168.187.131,编译过后我设定的lfs6.3静态ip为192.168.187.132,如果你的ip不同,请用ipconfig查看,并相应修改。 准备工作: 下载 OpenSSL-0.9.8g Download (HTTP): http://www.openssl.org/source/openssl-0.9.8g.tar.gz,这个是openssh用到的加密部分,还有Required patch : http://www.linuxfromscratch.org/patches/blfs/6.3/openssl-0.9.8g-fix_manpages-1.patch 下载 OpenSSH-4.7p1 ,Download (HTTP): http://sunsite.ualberta.ca/pub/OpenBSD/OpenSSH/portable/openssh-4.7p1.tar.gz 下载 Samba-3.0.30 ,Download (HTTP): http://us1.samba.org/samba/ftp/stable/samba-3.0.30.tar.gz 下载并解压我写的安装脚本01.sh,见附件 在windows里面添加共享目录,如share,把上面5个文件放入share目录中 总共耗时: 8:55开始执行shell,9:03 shell完毕,大概需要8分钟,接着来浪费了几分钟 9:16 kernel,9:29 编译完kernel,大概需要13分钟 总计21分钟。注意我是在vmware上做的,根据机器配置不同,大家的时间也会不一样。 好,开工了: 第1步:用live-cd启动,把下载的share中的文件拷贝到/sources目录中,以便和lfs安装其他软件一样,注意启动时设置bios启动设备第一项为光盘启动: export LFS=/mnt/lfs mkdir -pv $LFS mount /dev/hda2 $LFS mkdir -v $LFS/mylfsshell mount -t smbfs -o username=***,password=*** //192.168.187.1/share $LFS/mylfsshell/ chmod 777 $LFS/mylfsshell/*.sh cp $LFS/mylfsshell/*.* $LFS/sources/ 第2步:硬盘启动,登陆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 试一下挂载windows里面的共享目录: mount -t smbfs -o username=***,password=*** //192.168.187.1/share /mylfsshell/ ------------------------ screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http:///fileicon/zip.gif');}" onmousewheel="return imgzoom(this);" alt="" /> 文件:01.zip 大小:1KB 下载: 下载 |
|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )
GMT+8, 2024-9-30 13:18 , Processed in 0.137606 second(s), 12 queries , Gzip On, MemCache On.
Powered by Discuz! X3.5
© 2001-2023 Discuz! Team.