请教: bind()失败,返回-1,我使用setsockopt(listen_fd,SOL_SOCKET,SO_REUSEADDR,(void *)&listen_opt,(int)sizeof(listen_opt))设置;还是不行?
by francybright - C/C++ - 2007-12-20 14:49:57 阅读(1463) 回复(4)
在局域网内设置一个DNS服务器,网段为192.168.2.0。域为learn.work 设置完后重新启动,提示: master zone"2.168.192.in-addr.arpa"(in) rejeted due to error(serial 20040402) 望各位师兄指点迷津
[root@localhost etc]# /usr/named/sbin/named -g 18-Dec-2008 22:41:43.273 starting bind 9.5.0-P2 -g 18-Dec-2008 22:41:43.275 loading configuration from '/usr/named/etc/named.conf' 18-Dec-2008 22:41:43.275 /usr/named/etc/named.conf:15: missing ';' before '}' 18-Dec-2008 22:41:43.276 loading configuration: failure 18-Dec-2008 22:41:43.276 exiting (due to fatal error) [root@localhost etc]# vi named.con...
安装bind 最好在安装系统时候随系统一起安装,可以随系统更新。 delphij 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/57953/showart_1274330.html
呼,这个问题有点奇怪哦。 我的机器不开HTTP的服务,也就是80端口没被绑定。 自己写个C来绑定是可以的,可是在连接的时候居然不可以? WHY咧? 有谁干过这样的坏事么? 测试程序: chao@chao-laptop:~/c-study/ch11$ ./my_server -a 127.0.0.1 -p 80 chao@chao-laptop:~/c-study/ch11$ ./my_client -a 127.0.0.1 -p 80 line:122 connect: Connection refused 我还特意把apache关掉了。 为什么会这样呢?
本文译自bind主网站上的一篇文章:http://www.isc.org/products/bind/FAQ.html。应该说,这些问题都非常典型,对bind 9用户的日常维护和管理可以提供不小的帮助。 1. 当我在Linux 2.2.x上使用以--enable-threads选项编译的bind程序时,为什么-u参数不起作用? 答: Linux线程并没有完全实现Posix线程(pthreads)标准。特别是setuid()只能对当前线程起作用,而不适用于整个进程。正是由于此项 限制,Linux上的bind 9就无法像在其他...
1.规范主机名 # cat /etc/myname ob.atyu.com 2.指定DNS服务器 # cat /etc/resolv.conf nameserver 10.0.0.200 3.建立bind的配置文件: # cat /var/named/etc/named.conf // $OpenBSD: named-simple.conf,v 1.6 2004/08/16 15:48:28 jakob Exp $ // // Example file for a simple named configuration, processing both // recursive and authoritative queries using one cache. // Update this list to include...
我新建了个域叫safenet.9966.org,但是bind死活就是不行,我一nslookup hanji.safenet.9966.org就报server can't find hanji.safenet.9966.org: SERVFAIL 以下是我的配置文件: named.conf: // // named.conf for Red Hat caching-nameserver // options { directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; forwarders {61.177.7.1;}; /* ...
struct sockaddr_in my_addr; struct sockaddr_in their_addr; memset(&my_addr, 0, sizeof(my_addr)); /*create a socket*/ if(sockfd = socket(PF_INET,SOCK_DGRAM,0)==-1) { perror("socket create error"); } /*init my_addr*/ my_addr.sin_family = PF_INET; my_addr.sin_port = htons(5001); my_addr.sin_addr.s_a...