按照我们以前讲述的关于源码安装软件的步骤: 首先到压缩包存放的目录下(假设我们要把vsftpd安装到usr/profile下):
0)cd /usr/profile
1)tar zxvf vsftpd-2.2.2.tar.gz (解压)
2)cd vsftpd-2.2.2 (到解压后的目录下)
===========为统一管理配置文件,可作如下修改。============
vi /usr/profile/vsftpd-2.2.2/defs.h
#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd.conf" ======= old
#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd/vsftpd.conf" ====== new
vi /usr/profile/vsftpd-2.2.2/tunables.c
查找etc
const char* tunable_banned_email_file = "/etc/vsftpd.banned_emails"; ======= old
const char* tunable_banned_email_file = "/etc/vsftpd/vsftpd.banned_emails"; ======= new
const char* tunable_chroot_list_file = "/etc/vsftpd.chroot_list"; ======= old
const char* tunable_chroot_list_file = "/etc/vsftpd/vsftpd.chroot_list"; ======= new
const char* tunable_userlist_file = "/etc/vsftpd.user_list";======= old
const char* tunable_userlist_file = "/etc/vsftpd/vsftpd.user_list"; ======= new
const char* tunable_email_password_file = "/etc/vsftpd.email_passwords"; ======= old
const char* tunable_email_password_file = "/etc/vsftpd/vsftpd.email_passwords"; ======= new =====================================================================================================
install steps:
进入解压有的目录cd
/usr/profile/vsftpd-2.2.2
1)make
2)make install
3)mkdir /etc/vsftpd
4)cp vsftpd.conf /etc/vsftpd/
5)cp RedHat/vsftpd.pam /etc/pam.d/vsftpd
6)vi /etc/vsftpd/vsftpd.conf 在文件的最末尾加上一行: pam_service_name=vsftpd (如果不加入这行,则不允许本地用户登陆)
注:也可直接把《最简洁vsftpd.conf配置.txt》直接覆盖etc/vsftpd/vsftpd.conf
最简洁vsftpd.conf配置.txt内容如下:
local_enable=YES
local_root=/usr/software
write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
pam_service_name=vsftpd
3101

被折叠的 条评论
为什么被折叠?



