linux中pure-ftp搭建

Pure-ftpd简介

Pure-Ftpd是一款是非常出色的软件,在linuxBSD等开源系统中,Pure-Ftpdvsftpd平分秋色,都是一个快速、高效、轻便、安全的FTP服务器,Pure-Ftpdvsftpd略微复杂,但是优势是Pure-Ftp有一个非常出色的管理面板,这个就是“UsermanagerforPureFTPd”,虽然已经多年不更新,但是仍然可以在最新版的ubuntuserver中运行良好

环境:PureAdmin-0.3.tar.gzpure-ftpd-1.0.36.tar.gz

pureftpd-mysql.confpureftp.sqlZendOptimizer-3.3.3-linux-hicode.tar.gz

原理图:

201424128.png

1.搭建lamp环境yum安装

2.[root@localhostpureftp]#vim/etc/yum.repos.d/rhel-debuginfo.repo

3.图1

195508776.png

4.[root@localhostpureftp]#yuminstallhttpdmysqlmy-serverphpphp-gdphp-mbstringphp-mysqlmysql-devel

5.[root@localhostpureftp]#servicehttpdstart

6.[root@localhostpureftp]#chkconfighttpdon

7.[root@localhostpureftp]#servicemysqldstart

8.[root@localhostpureftp]#mysqladmin-uroot-ppassword'123'

9.测试:

10.[root@localhosthtml]#vim/var/www/html/index.php写入

11.<?php

12.phpinfo()

13.?>

14.图2

195559167.png

15.ftp服务器的实现

16.[root@localhostpureftp]#tar-zxvfpure-ftpd-1.0.36.tar.gz-C/usr/local/src/

17.[root@localhostsrc]#cd/usr/local/src/pure-ftpd-1.0.36/

18../configure\

19.--prefix=/usr/local/pureftpd\安装目录

20.--with-mysql\与mysql结合

21.--with-shadow\接受本地账号于虚拟账号

22.--with-pam\验证

23.--with-welcomemsg\定制一些欢迎消息

24.--with-uploadscript\

25.--with-cookie\

26.--with-virtualchroot\支持虚拟目录

27.--with-virtualhosts\支持虚拟主机

28.--with-diraliases\支持别名

29.--with-quotas\支持磁盘配额

30.--with-puredb\虚拟账号于本地账号的映射

31.--with-sysquotas\系统的配额

32.--with-ratios\速率

33.--with-ftpwho\开启服务器独立

34.--with-throttling\域值

35.--with-language=simplified-chinese语言

36.make&&makeinstall

37.mkdir/usr/local/pureftpd/etc创建pure-ftp的配置文件

38.[root@localhostpureftpd]#cd/usr/local/src/pure-ftpd-1.0.36/configuration-file/

39.[root@localhostconfiguration-file]#chmoda+xpure-config.plpure-ftpd的控制文件

40.[root@localhostconfiguration-file]#cppure-config.pl/usr/local/pureftpd/sbin/

41.root@localhostconfiguration-file]#cppure-ftpd.conf/usr/local/pureftpd/etc/配置文件

42.[[email protected]]#cdcontrib/

43.[root@localhostcontrib]#cpredhat.init/etc/init.d/pureftpd控制脚本

44.[root@localhostcontrib]#chmoda+x/etc/init.d/pureftpd

45.[root@localhostcontrib]#vim/etc/init.d/pureftpd

46.图3

195651311.png

47.[root@localhostcontrib]#servicepureftpdstart

48.wed管理

49.[root@localhost~]#cdpureftp/

50.[root@localhostpureftp]#tar-zxvfPureAdmin-0.3.tar.gz-C/var/www/html/

51.[root@localhostpureftp]#cd/var/www/html/

52.[root@localhosthtml]#mvPureAdmin-0.3/pureadmin

53.导入数据库pureftp.sql初始文件

54.[root@localhostpureftp]#vimpureftp.sql

55.图3

195823876.png

56.[root@localhostpureftp]#mysql-uroot-p<pureftp.sql导入数据库文件

57.[root@localhost~]#mysql-uroot�Cp

58.mysql>grantallprivilegesonftpusers.*toftp@localhostidentifiedby'tmppasswd';ftpuser里面所有表格授权给ftp通过本机来登陆的,密码为tmpasswd

59.mysql>flushprivileges;权限刷新

60.去掉一个横线,才可以执行起来

195904500.png

61.图5

200005987.png

62.图6

200041974.png

63.图7

201505389.png

64.管理界面

65.[root@localhostpureftp]#cd/var/www/html/pureadmin/

66.[root@localhostpureadmin]#vimconfig.php

67.图8

201556713.png

68.[root@localhostpureadmin]#mkdirftproot

69.[root@localhostpureadmin]#chmod-R777/ftproot/

70.[root@localhostpureadmin]#vim/etc/httpd/conf/httpd.conf

71.DirectoryIndexindex.phpindex.htmlindex.html.var

72.[root@localhostpureadmin]#servicehttpdrestart

73.图9

201626638.png

74.图10

201648212.png

75.图11

201710155.png

76.虚拟账号于本地账号的映射

77.[root@localhostpureftp]#cppureftpd-mysql.conf/usr/local/pureftpd/etc/接口文件

78.图12

201742650.png

79.[root@localhostetc]#vimpure-ftpd.conf

80.图13

201815970.png

81.[root@localhostftproot]#useraddvirtualftp-d/ftproot-s/sbin/nologin�CM虚拟账号映射成为一个本地账号

82.[root@localhostftproot]#chownvirtualftp:virtualftp/ftproot/更改本地账号的所有者和所属组

83.[root@localhostftproot]#/usr/local/pureftpd/bin/pure-pwuseradduser1-uvirtualftp-gvirtualftp-d/ftproot/user1�Cm添加一个user1的本地站好映射为一个虚拟账号

84.建立用户的数据库

85.[[email protected]]#cd/usr/local/pureftpd/etc/

86.[root@localhostftproot]#mkdir-pv/var/ftp创建匿名账号的根目录

87.[root@localhostetc]#vimpure-ftpd.conf

88.图14

201854447.png

89.图15

201922157.png

90.[root@localhostftproot]#/usr/local/pureftpd/bin/pure-pwmkdbpureftpd.pdb

91.测试:

92.图16

202125583.png

93.图17

202400634.png

202323695.png

你可能感兴趣的:(图形界面,lanmp,Pure-FTPd,pureadmin,pureftpd-mysql)