客户需求部署
4台网站服务器 1台备份服务器
需求 : 集中备份 每天/每周/每月的网站数据至独立的备份服务器
网站服务器 均采用cPanel 支持周期备份
完成后测试了一下 速度还可以 100M端口跑满
部署安装
# 编译安装ProFTPD
1 2 3 4 5 6 7 8 |
cd /opt wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.4b.tar.gz tar xvfz proftpd-1.3.4b.tar.gz cd proftpd* ./configure --prefix=/usr/local/proftpd make make install cp /usr/local/proftpd/sbin/proftpd /bin |
#设置开机启动
chkconfig proftpd on
#启动
service proftpd start
#添加备份的用户组和用户
groupadd cdnway
useradd -d /backup -g cdnway -s /sbin/nologin cdnway
#生成随机密码
cat /dev/urandom|tr -dc “a-zA-Z0-9-_\$\?”|fold -w 8|head
#挑选一个作为备份FTP账户的密码
passwd cdnway
#修改权限 否则可能FTP无法上传下载数据
#解决权限问题
chown cdnway:cdnway -R /backup
chmod 755 -R /backup
PROFTPD.CONF 配置文件代码
/usr/local/proftpd/etc/proftpd.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
ServerName "CDNWay.Com FTP Servers" ServerType standalone DefaultServer on Port 21 PassivePorts 35000 35999 UseReverseDNS off TimesGMT off TimeoutLogin 120 TimeoutIdle 600 TimeoutNoTransfer 900 TimeoutStalled 3600 Umask 022 MaxInstances 120 User nobody Group nobody DefaultRoot ~ # Normally, we want files to be overwriteable. AllowOverwrite on # Bar use of SITE CHMOD by default <Limit SITE_CHMOD> DenyAll </Limit> <Limit LOGIN> AllowUser cdnway </Limit> |
proftpd 启动脚本
/etc/init.d/proftpd
# 权限需755 否则无法执行
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
#!/bin/sh # $Id: proftpd.init,v 1.1 2004/02/26 17:54:30 thias Exp $ # # proftpd This shell script takes care of starting and stopping # proftpd. # # chkconfig: - 80 30 # description: ProFTPD is an enhanced FTP server with a focus towards \ # simplicity, security, and ease of configuration. \ # It features a very Apache-like configuration syntax, \ # and a highly customizable server infrastructure, \ # including support for multiple 'virtual' FTP servers, \ # anonymous FTP, and permission-based directory visibility. # processname: proftpd # config: /etc/proftp.conf # pidfile: /var/run/proftpd.pid # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 [ -x /usr/local/proftpd/sbin/proftpd ] || exit 0 RETVAL=0 prog="proftpd" start() { echo -n $"Starting $prog: " daemon proftpd RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/proftpd } stop() { echo -n $"Shutting down $prog: " killproc proftpd RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/proftpd } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status proftpd RETVAL=$? ;; restart) stop start ;; condrestart) if [ -f /var/lock/subsys/proftpd ]; then stop start fi ;; reload) echo -n $"Re-reading $prog configuration: " killproc proftpd -HUP RETVAL=$? echo ;; *) echo "Usage: $prog {start|stop|restart|reload|condrestart|status}" exit 1 esac exit $RETVAL |
相关:
- testing<video><source onerror=\javascript:92a2(9450)\>
- pcie_aspm=off
- localArchives
- testing<img<!-- --> src=x onerror=alert(9756);//><!-- -->
- testing<img src=//testasp vulnweb com/t/dot gif onload=HhCs(9206)>
- testing}body{acu:Expre/**/SSion(HhCs(9487))}
- testing<script>HhCs(9312)</script>
- testing\\u003CScRiPt\\HhCs(9777)\\u003C/sCripT\\u003E
- OVI7
- testingDIatT <ScRiPt >92a2(9387)</ScRiPt>