vsftpd make とおった

yum install g++
はまだエラー

yum install gcc
したらとおった


-c hash.c -O2 -march=x86-64 -mtune=atom -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
gcc -c tcpwrap.c -O2 -march=x86-64 -mtune=atom -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
tcpwrap.c:16:20: error: tcpd.h: No such file or directory
tcpwrap.c: In function ‘vsf_tcp_wrapper_ok’:
tcpwrap.c:29: error: storage size of ‘req’ isn’t known
cc1: warnings being treated as errors
tcpwrap.c:31: error: implicit declaration of function ‘request_init’
tcpwrap.c:31: error: ‘RQ_DAEMON’ undeclared (first use in this function)
tcpwrap.c:31: error: (Each undeclared identifier is reported only once



参考
http://www.creativ-tech.com/kb/vsftpd-setup-howto/

$ make
Error: tcpwrap.c:16:20: error: tcpd.h: No such file or directory
$ yum install tcp_wrappers-devel.x86_64
$ make clean
$ make



これで上が通った



/usr/bin/ld: cannot find -lcap
collect2: ld returned 1 exit status
make: *** [vsftpd] Error 1



have to install libcap-devel package


yum install libcap-devel


これでOK!!!



★★★
[root@cntest vsftpd-3.0.2]# more builddefs.h
#ifndef VSF_BUILDDEFS_H
#define VSF_BUILDDEFS_H

#define VSF_BUILD_TCPWRAPPERS
#define VSF_BUILD_PAM
#undef VSF_BUILD_SSL

#endif /* VSF_BUILDDEFS_H */

[root@cntest vsftpd-3.0.2]#



★★★

[root@cntest vsftpd-3.0.2]# history
1 pwd
2 cd /home
3 ls
4 mkdir cdrom
5 cd cdrom
6 ls
7 wget https://security.appspot.com/downloads/vsftpd-3.0.2.tar.gz
8 ls
9 gunzip vsftpd-3.0.2.tar.gz
10 ls -ltr
11 tar xvf vsftpd-3.0.2.tar
12 ls -ltr
13 cd vsftpd-3.0.2
14 ls -ltr
15 cp Makefile Makefile.org
16 cp builddefs.h builddefs.h.org
17 vi builddefs.h
18 vi Makefile
19 make
20 vi Makefile
21 gcc
22 rpm -qa | grep gcc
23 vi Makefile
24 make
25 yum install g++
26 make
27 ./configure
28 vi Makefile
29 make
30 apt-get install gcc
31 yum install gcc
32 make
33 yum install libwrap
34 vi Makefile
35 libwrap
36 yum install tcp_wrappers-devel.x86_64
37 make clean
38 make
39 df
40 yum install libcap-devel
41 make
42 history
[root@cntest vsftpd-3.0.2]#