People who install LFS with LiveCD know that there are ifconfig tools in the CD bag. and can use wget and so on automatically connected to the Internet. But after I have finished loading the LFS, I need to set up resolv.conf and IPv4 (or Ifconfig.eth0). This will enable you to access the Internet under a virtual machine, and also use SSH.
With the DHCP, needless to say, I will record how to set the static IP. Static settings We have to know ip,gateway,nameserver.
My approach is to start with the LiveCD first, and then enter the Ifconfig record IP address. then enter Route-n. Record 3 data, I want only 3. One is IP, one thing gateway, and one is nameserver (spare that I casually fill in). These 3 data can be obtained through the above 2 instructions.
Then restart, after entering the LFS, respectively in the/etc/sysconfig/netword-device/ifconfig.eth0/ipv4 and/etc/reslov.conf set up on the line. Add: 1, resolv.conf best to write search Loacldomain. 2, if you are installed under the virtual machine, then you can in the XP Control Panel network to see your gateway and DNS server.
The following starts with a copy from the Internet. Remember to recompile the kernel. In the process of compiling, there is a graphical interface that directly save the exit on OK, inside the setting and in the installation of LFS when you set is a touch the same, I have seen.
Tar xvf openssl-0.9.8g.tar.gz
CD openssl-0.9.8g
Patch-np1-i.. /openssl-0.9.8g-fix_manpages-1.patch
./CONFIG–OPENSSLDIR=/ETC/SSL–PREFIX=/USR Shared
Make Mandir=/usr/share/man
Make Mandir=/usr/share/man Install
Cp-v-R Certs/etc/ssl
Install-v-d-m755/usr/share/doc/openssl-0.9.8g
Cp-v-R doc/{howto,readme,*.{ Txt,html,gif}}/
/usr/share/doc/openssl-0.9.8g
Cd..
RM-RF openssl-0.9.8g
Tar xvf openssh-4.7p1.tar.gz
CD OPENSSH-4.7P1
Install-v-m700-d/var/lib/sshd &&
Chown-v root:sys/var/lib/sshd &&
Groupadd-g sshd &&
Useradd-c ' sshd privsep '-d/var/lib/sshd-g sshd/
-s/bin/false-u sshd
Sed-i ' s@-lcrypto@/usr/lib/libcrypto.a-ldl@ ' configure
Sed-i ' s@-ldes@@ ' Configure &&
./CONFIGURE–PREFIX=/USR–SYSCONFDIR=/ETC/SSH–DATADIR=/USR/SHARE/SSHD/
–libexecdir=/usr/lib/openssh–with-md5-passwords/
–WITH-PRIVSEP-PATH=/VAR/LIB/SSHD/
–with-xauth=/usr/bin/xauth &&
Make
RM/USR/BIN/SCP &&
If Test-f/usr/bin/scp-bak
Then
Rm/usr/bin/scp-bak
Fi
Make install
Install-v-m755-d/USR/SHARE/DOC/OPENSSH-4.7P1
Install-v-m644 Install LICENCE OVERVIEW readme*. RNG/
/usr/share/doc/openssh-4.7p1
Cd..
RM-RF OPENSSH-4.7P1
After the installation is complete, enter usr/local/sbin/sshd-d to debug, the success is OK. I wish you success.
Beyond C + + original articles, reproduced please indicate the source and retain the original link
This article link: http://www.beyondc.cn/lfs-configure-ip-and-installed-openssh.html