UNIX Network Programming third edition source code ubuntu configuration problem Solving

Source: Internet
Author: User

First step: First download the book supporting the source unpv13e.tar.gz

The second step: after decompression into the root folder has a Readme

4Execute the following from the Src/directory:     5     6    ./configure # try-to-figure out all    implementation dif Ferences     7     8    cd Lib         # build the basic library that's programs need     9    make           # use "Gmake" Eve Rywhere on Bsd/os Systems    Ten    -    CD. /libfree  # Continue building the basic library make a    CD. /libroute # only if your system supports 4.4BSD style routing sockets           * # only if your system support s 4.4BSD style routing sockets    CD. /libxti   # Only if your system supports XTI    to           # only if your system supports XTI    C32/>CD. /intro    # Build and test a basic client program    -Make daytimetcpcli    ./daytimetcpcli 127.0.0.1    24If All this    works, you ' re all set to start compiling individual programs.

The third step: because my is Ubuntu. So run the above 6 8 9 11 12

Run under the root folder

./configure

And then

cd Lib
Run make on Enter Libfree

Cd.. /libfree
Make
Fourth step (very important):

CP./LIB/UNP.H/USR/INCLUDE/CP./config.h/usr/include/

Then go into intro and compile the first program to

Cd.. /intro make    daytimetcpcli./DAYTIMETCPCLI 127.0.0.1
Error found: Connect Error:connection refused
This situation indicates that the server did not start the daytime service!

Fifth Step:

Start the daytime service


sudo apt-get install xinetd

sudo vi/etc/xinetd.d/daytime change disable =yes to No

Then restart and execute the program to see the results:

/ETC/INIT.D/XINETD restartrather than invoking init scripts through/etc/init.d, use the service (8) utility, e.g. service X inetd restartsince The script you is attempting to invoke have been converted to Anupstart job, your may also use the Stop ( 8) and then start (8) utilities,e.g. Stop xinetd; Start xinetd. The restart (8) utility is also available.xinetd stop/waitingxinetd start/running, Process 21975[email protected]:/ myworkspace/unixnetwork/unpv13e/intro#./daytimetcpcli 127.0.0.118 APR 14:03:08 CST



UNIX Network Programming third edition source code ubuntu configuration problem Solving

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.