Inetd transplant

inetd choice and access

Busybox1.1.3 provides inetd support. If the reader is not available using an older version of Busybox for inetd, consider using netkit suite to provide network services. It is strongly recommended to use a higher version of Busybox. This section describes the second half if the compiler deploy inetd netkit among.

 

Get inetd

Netkit suite from   ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/ download. Wherein netkitbase0.17 includes inetd program. Download netkitbase0.17 to the / tmp directory and decompress it.

 

 

Compile inetd

 

Modify configure file

We need to modify the configure script before you start configuring netkitbase lest it executes the test program on the host. [Arm @ localhost netkitbase0.17] # vi configure

 

Will appear in each row ./ conftest || exit 1;

changed to:

# ./ conftest || exit 1;

 

Compile

[arm@localhost netkit­base­0.17]$ CC=arm­linux­gcc ./configure [arm@localhost netkit­base­0.17]$ make

 

 

Configuring inetd

 

Copy inetd to the root file system usr / sbin directory

[arm@localhost netkit­base­0.17]$ cp inetd/inetd /home/arm/dev_home/rootfs/my_rootfs/usr/sbin/

 

Inetd inetd.conf configuration file copy to the root file system / mnt / etc directory

[arm@localhost netkit­base­0.17]$ cp etc.sample/inetd.conf /home/arm/dev_home/rootfs/my_rootfs/mnt/etc

 

If necessary, modify inetd.conf configuration file

For example: support the telnetd inetd.conf configuration file as follows

# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args> telnet     stream                             tcp                   nowait   root                   /usr/sbin/telnetd

 

Copy the configuration file

There are many network directory etc.sample the configuration file, some of which need to be copied to the root file system directory etc among recorded as follows: [arm @ localhost netkitbase0.17] $ cd etc.sample /

[arm@localhost etc.sample]$ cp host.conf /home/arm/dev_home/rootfs/my_rootfs/mnt/etc/ [arm@localhost etc.sample]$ cp hosts /home/arm/dev_home/rootfs/my_rootfs/mnt/etc/ [arm@localhost etc.sample]$ cp networks /home/arm/dev_home/rootfs/my_rootfs/mnt/etc/ [arm@localhost etc.sample]$ cp protocols /home/arm/dev_home/rootfs/my_rootfs/mnt/etc/ [arm@localhost etc.sample]$ cp resolv.conf /home/arm/dev_home/rootfs/my_rootfs/mnt/etc/ [arm@localhost etc.sample]$ cp services /home/arm/dev_home/rootfs/my_rootfs/mnt/etc/

 

More important configuration file as follows:

host.conf: When there is simultaneous with DNS name resolution and / etc / hosts table mechanism hosts in the system, it is clear from the file /etc/host.conf resolver query sequence

 

hosts: Record the host name to address mapping protocols IP: Record common network protocol, and port alias relations, web applications depend on this file resolv.conf: Specifies the DNS server services: record-known network services and ports, network programming rely on this document

Guess you like

Origin www.cnblogs.com/fanweisheng/p/11105676.html