gfcsftp


wget https://security.appspot.com/downloads/vsftpd-3.0.2.tar.gz

cd vsftpd-3.0.2
# vi builddefs.h

#ifndef VSF_BUILDDEFS_H
#define VSF_BUILDDEFS_H

#define VSF_BUILD_TCPWRAPPERS ★define に変更する
#define VSF_BUILD_PAM
#define VSF_BUILD_SSL ★define に変更する

#endif /* VSF_BUILDDEFS_H */

# vi Makefile
CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 ¥
-Wall -W -Wshadow -Werror -Wformat-security ¥
-D_FORTIFY_SOURCE=2 ¥
#-pedantic -Wconversion

これを以下に修正(-march=i686 -mtune=atom)を追加

CFLAGS = -O2 -march=i686 -mtune=atom -fPIE -fstack-protector --param=ssp-buffer-size=4 ¥
-Wall -W -Wshadow -Werror -Wformat-security ¥
-D_FORTIFY_SOURCE=2 ¥

# make



wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.gz
gunzip gcc-4.9.2.tar.gz
tar xvf gcc-4.9.2.tar
cd gcc-4.9.2

[root@cnserver0 gcc-4.9.2]# cat /proc/version
Linux version 2.6.32-431.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Fri Nov 22 03:15:09 UTC 2013
[root@cnserver0 gcc-4.9.2]#

[root@cnserver0 gcc-4.9.2]# cat /etc/redhat-release
CentOS release 6.5 (Final)
[root@cnserver0 gcc-4.9.2]#



[root@cnserver0 vsftpd-3.0.2]# make
gcc -c main.c -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wall -W -Wshadow -Werror -Wformat-security -D_FORTIFY_SOURCE=2 -idirafter dummyinc
make: gcc: Command not found
make: *** [main.o] Error 127
[root@cnserver0 vsftpd-3.0.2]# pwd
/home/software/vsftpd-3.0.2