2011年11月10日木曜日

ngIRCdをインストール

家のCentOSにircサーバでもいれてみる。

http://www.sssg.org/blogs/naoya/archives/1288
を参考にした。

ngIRCdが設定がシンプルでよいとのことだったのでngIRCdに決定。

ソースはここから取得。
http://ngircd.barton.de/pub/ngircd/ngircd-18.tar.gz

tarballを解凍してconfigure; make; make installする。
[aadimstx@localhost ngircd-18]$ ./configure --prefix=$LOCAL --exec-prefix=$LOCAL
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
checking for function prototypes... yes
checking for gawk... (cached) gawk
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether gcc -std=gnu99 accepts -fstack-protector... yes
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netinet/in_systm.h usability... yes
checking netinet/in_systm.h presence... yes
checking for netinet/in_systm.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for arpa/inet.h... yes
checking for ctype.h... (cached) yes
checking for malloc.h... yes
checking for netinet/ip.h... yes
checking for stdbool.h... yes
checking for stddef.h... yes
checking for varargs.h... no
checking whether socklen_t exists... yes
checking return type of signal handlers... void
checking for size_t... yes
checking for struct sockaddr_in.sin_len... no
checking for memmove in -lUTIL... no
checking for library containing gethostbyname... none required
checking for bind in -lsocket... no
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for strftime... yes
checking for bind... yes
checking for gethostbyaddr... yes
checking for gethostbyname... yes
checking for gethostname... yes
checking for inet_ntoa... yes
checking for setsid... yes
checking for setsockopt... yes
checking for socket... yes
checking for strcasecmp... yes
checking for waitpid... yes
checking for getaddrinfo... yes
checking for getnameinfo... yes
checking for inet_aton... yes
checking for sigaction... yes
checking for sigprocmask... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for strdup... yes
checking for strlcpy... no
checking for strlcat... no
checking for strtok_r... yes
checking for syslog in -lbe... no
checking for syslog... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for deflate in -lz... yes
checking for deflate... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for select... yes
checking for poll... yes
checking sys/devpoll.h usability... no
checking sys/devpoll.h presence... no
checking for sys/devpoll.h... no
checking for epoll_create... yes
checking for kqueue... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating doc/src/Makefile
config.status: creating src/Makefile
config.status: creating src/portab/Makefile
config.status: creating src/ipaddr/Makefile
config.status: creating src/tool/Makefile
config.status: creating src/ngircd/Makefile
config.status: creating src/testsuite/Makefile
config.status: creating man/Makefile
config.status: creating contrib/Makefile
config.status: creating contrib/Anope/Makefile
config.status: creating contrib/Debian/Makefile
config.status: creating contrib/MacOSX/Makefile
config.status: creating contrib/MacOSX/ngIRCd.xcodeproj/Makefile
config.status: creating contrib/MacOSX/ngIRCd.pmdoc/Makefile
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing depfiles commands

ngIRCd 18 has been configured with the following options:

             Target: i686-pc-linux-gnu
           Compiler: gcc -std=gnu99
     Compiler flags: -g -O2 -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes -fstack-protector -DSYSCONFDIR='"$(sysconfdir)"'
          Libraries: -lz 

    'ngircd' binary: /home/aadimstx/local/sbin
 Configuration file: /home/aadimstx/local/etc
       Manual pages: /home/aadimstx/local/share/man
      Documentation: /home/aadimstx/local/share/doc/ngircd

     Syslog support: yes     Enable debug code: no
   zlib compression: yes           IRC sniffer: no
   Use TCP Wrappers: no        Strict RFC mode: no
      IDENT support: no          IRC+ protocol: yes
      IPv6 protocol: no            I/O backend: "epoll(), select()"
        PAM support: no            SSL support: no

[aadimstx@localhost ngircd-18]$ 

[aadimstx@localhost ngircd-18]$ ./configure --prefix=$LOCAL --exec-prefix=$LOCAL
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
checking for function prototypes... yes
checking for gawk... (cached) gawk
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether gcc -std=gnu99 accepts -fstack-protector... yes
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netinet/in_systm.h usability... yes
checking netinet/in_systm.h presence... yes
checking for netinet/in_systm.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for arpa/inet.h... yes
checking for ctype.h... (cached) yes
checking for malloc.h... yes
checking for netinet/ip.h... yes
checking for stdbool.h... yes
checking for stddef.h... yes
checking for varargs.h... no
checking whether socklen_t exists... yes
checking return type of signal handlers... void
checking for size_t... yes
checking for struct sockaddr_in.sin_len... no
checking for memmove in -lUTIL... no
checking for library containing gethostbyname... none required
checking for bind in -lsocket... no
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for strftime... yes
checking for bind... yes
checking for gethostbyaddr... yes
checking for gethostbyname... yes
checking for gethostname... yes
checking for inet_ntoa... yes
checking for setsid... yes
checking for setsockopt... yes
checking for socket... yes
checking for strcasecmp... yes
checking for waitpid... yes
checking for getaddrinfo... yes
checking for getnameinfo... yes
checking for inet_aton... yes
checking for sigaction... yes
checking for sigprocmask... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for strdup... yes
checking for strlcpy... no
checking for strlcat... no
checking for strtok_r... yes
checking for syslog in -lbe... no
checking for syslog... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for deflate in -lz... yes
checking for deflate... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for select... yes
checking for poll... yes
checking sys/devpoll.h usability... no
checking sys/devpoll.h presence... no
checking for sys/devpoll.h... no
checking for epoll_create... yes
checking for kqueue... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating doc/src/Makefile
config.status: creating src/Makefile
config.status: creating src/portab/Makefile
config.status: creating src/ipaddr/Makefile
config.status: creating src/tool/Makefile
config.status: creating src/ngircd/Makefile
config.status: creating src/testsuite/Makefile
config.status: creating man/Makefile
config.status: creating contrib/Makefile
config.status: creating contrib/Anope/Makefile
config.status: creating contrib/Debian/Makefile
config.status: creating contrib/MacOSX/Makefile
config.status: creating contrib/MacOSX/ngIRCd.xcodeproj/Makefile
config.status: creating contrib/MacOSX/ngIRCd.pmdoc/Makefile
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing depfiles commands

ngIRCd 18 has been configured with the following options:

             Target: i686-pc-linux-gnu
           Compiler: gcc -std=gnu99
     Compiler flags: -g -O2 -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes -fstack-protector -DSYSCONFDIR='"$(sysconfdir)"'
          Libraries: -lz 

    'ngircd' binary: /home/aadimstx/local/sbin
 Configuration file: /home/aadimstx/local/etc
       Manual pages: /home/aadimstx/local/share/man
      Documentation: /home/aadimstx/local/share/doc/ngircd

     Syslog support: yes     Enable debug code: no
   zlib compression: yes           IRC sniffer: no
   Use TCP Wrappers: no        Strict RFC mode: no
      IDENT support: no          IRC+ protocol: yes
      IPv6 protocol: no            I/O backend: "epoll(), select()"
        PAM support: no            SSL support: no

[aadimstx@localhost ngircd-18]$ 


[aadimstx@localhost ngircd-18]$ ./configure --prefix=$LOCAL --exec-prefix=$LOCAL
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
checking for function prototypes... yes
checking for gawk... (cached) gawk
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether gcc -std=gnu99 accepts -fstack-protector... yes
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netinet/in_systm.h usability... yes
checking netinet/in_systm.h presence... yes
checking for netinet/in_systm.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for arpa/inet.h... yes
checking for ctype.h... (cached) yes
checking for malloc.h... yes
checking for netinet/ip.h... yes
checking for stdbool.h... yes
checking for stddef.h... yes
checking for varargs.h... no
checking whether socklen_t exists... yes
checking return type of signal handlers... void
checking for size_t... yes
checking for struct sockaddr_in.sin_len... no
checking for memmove in -lUTIL... no
checking for library containing gethostbyname... none required
checking for bind in -lsocket... no
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for strftime... yes
checking for bind... yes
checking for gethostbyaddr... yes
checking for gethostbyname... yes
checking for gethostname... yes
checking for inet_ntoa... yes
checking for setsid... yes
checking for setsockopt... yes
checking for socket... yes
checking for strcasecmp... yes
checking for waitpid... yes
checking for getaddrinfo... yes
checking for getnameinfo... yes
checking for inet_aton... yes
checking for sigaction... yes
checking for sigprocmask... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for strdup... yes
checking for strlcpy... no
checking for strlcat... no
checking for strtok_r... yes
checking for syslog in -lbe... no
checking for syslog... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for deflate in -lz... yes
checking for deflate... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for select... yes
checking for poll... yes
checking sys/devpoll.h usability... no
checking sys/devpoll.h presence... no
checking for sys/devpoll.h... no
checking for epoll_create... yes
checking for kqueue... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating doc/src/Makefile
config.status: creating src/Makefile
config.status: creating src/portab/Makefile
config.status: creating src/ipaddr/Makefile
config.status: creating src/tool/Makefile
config.status: creating src/ngircd/Makefile
config.status: creating src/testsuite/Makefile
config.status: creating man/Makefile
config.status: creating contrib/Makefile
config.status: creating contrib/Anope/Makefile
config.status: creating contrib/Debian/Makefile
config.status: creating contrib/MacOSX/Makefile
config.status: creating contrib/MacOSX/ngIRCd.xcodeproj/Makefile
config.status: creating contrib/MacOSX/ngIRCd.pmdoc/Makefile
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing depfiles commands

ngIRCd 18 has been configured with the following options:

             Target: i686-pc-linux-gnu
           Compiler: gcc -std=gnu99
     Compiler flags: -g -O2 -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes -fstack-protector -DSYSCONFDIR='"$(sysconfdir)"'
          Libraries: -lz 

    'ngircd' binary: /home/aadimstx/local/sbin
 Configuration file: /home/aadimstx/local/etc
       Manual pages: /home/aadimstx/local/share/man
      Documentation: /home/aadimstx/local/share/doc/ngircd

     Syslog support: yes     Enable debug code: no
   zlib compression: yes           IRC sniffer: no
   Use TCP Wrappers: no        Strict RFC mode: no
      IDENT support: no          IRC+ protocol: yes
      IPv6 protocol: no            I/O backend: "epoll(), select()"
        PAM support: no            SSL support: no

[aadimstx@localhost ngircd-18]$ 


設定ファイルをちょっぴり変更。
[aadimstx@localhost ngircd-18]$ diff /home/aadimstx/local/etc/ngircd.conf~ /home/aadimstx/local/etc/ngircd.conf
125c125
<       ;ChrootDir = /var/empty
---
>       ;ChrootDir = /home/aadimstx/local/var/empty
[aadimstx@localhost ngircd-18]$ 


etc/init.d/ngircdを配置。
これはここからDLしてlockファイルのパスを変更。
http://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git;a=blob_plain;f=contrib/ngircd-redhat.init;hb=HEAD

起動してみる。
[aadimstx@localhost local]$ etc/init.d/ngircd start
Starting ngIRCd:                                           [  OK  ]
[aadimstx@localhost local]$ 

0 件のコメント:

コメントを投稿