pure-ftp安装

#!/bin/bash

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin

export PATH

INSTALL_SRC="/soft/src"


echo "================Pureftpd Install==============="

cd $INSTALL_SRC

tar zxf pure-ftpd-1.0.36.tar.gz

cd pure-ftpd-1.0.36/

./configure --prefix=/usr/local/webapps/pureftpd CFLAGS=-O2 \

--with-language=english \

--with-welcomemsg \

--with-quotas \

--with-puredb \

--with-diraliases \

--with-ratios \

--with-ftpwho \

--with-throttling

make && make install


mkdir -p /usr/local/webapps/pureftpd/etc/

cp configuration-file/pure-config.pl /usr/local/webapps/pureftpd/sbin/pure-config.pl

chmod 755 /usr/local/webapps/pureftpd/sbin/pure-config.pl


cp $INSTALL_SRC/pure-ftpd-1.0.36/configuration-file/pureftpd.conf /usr/local/webapps/pureftpd/etc/pureftpd.conf

ln -s /usr/local/webapps/pureftpd/sbin/pure-ftpd /usr/sbin

#groupadd ftpgroup

groupadd ftpgroup

useradd -g ftpgroup -d /dev/null -s /etc ftpuser


cd $INSTALL_SRC/

cp init.d.pureftpd /etc/init.d/pureftpd

chmod +x /etc/init.d/pureftpd

chkconfig --add pureftpd

chkconfig pureftpd on


if [ -s /sbin/iptables ]; then

/sbin/iptables -I INPUT -p tcp --dport 21 -j ACCEPT

/sbin/iptables -I INPUT -p tcp --dport 20 -j ACCEPT

/sbin/iptables-save

fi

/etc/init.d/pureftpd start


                                                                                                              注:本文带安装所需源码包

 

 

 

 

 

你可能感兴趣的:(ftp,系统软件)