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