UNP13E在fedora 19上编译,并试运行daytimetcpcli

1) 安装virtual box 和 FC19, 搞定system-config-samba和gcc

sudo yum -y install samba

sudo yum install gcc g++

2)从图灵网站上下载UNP13E,配合unix网络编程 卷1 第三版 

http://www.ituring.com.cn/book/download/60498ad9-ede6-4023-a92b-04d47be23578

3)编译UNP13E, 按照Readme来做就是了

    ./configure    # try to figure out all implementation differences



    cd lib         # build the basic library that all programs need
    make           # use "gmake" everywhere on BSD/OS systems


    cd ../libfree  # continue building the basic library
    make


    cd ../libroute # only if your system supports 4.4BSD style routing sockets           #FC19我安装的不支持4.4BSD,会报错,直接无视

    make           # only if your system supports 4.4BSD style routing sockets

    cd ../libxti   # only if your system supports XTI       #我下载的包里没有libxti
    make           # only if your system supports XTI


    cd ../libgai      #但是有这个libgai
    make          

4)运行第一个sample

    cd ../intro    # build and test a basic client program
    make daytimetcpcli
    ./daytimetcpcli 127.0.0.1

直接报错

[legend@localhost intro]$ ./daytimetcpcli 127.0.0.1
connect error: Connection refused

找帮助,需要daytime开启才好

sudo yum -y install xinetd

sudo vi /etc/xinetd.d/daytime-stream 
sudo vi /etc/xinetd.d/daytime-dgram 

编辑修改daytime-stream和daytime-dgram如下

# This is for quick on or off of the service
        disable         = no

sudo systemctl restart xinetd.service 


再接着运行daytimetcpcli 就好了

[legend@localhost intro]$ ./daytimetcpcli 127.0.0.1
11 SEP 2013 19:01:42 CST


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值