PureFTP安装配置
PureFTP+Mysql验证
FTP的原理
21端口开放,用于连接。20端口用于传输数据!
匿名用户
anonymous
主动模式和被动模式
主动模式是客户端主动,例如用1030端口连接21,再开放1031和20端口传输数据,但是如果有防火墙的话,无法主动传输,服务器会打开大于1024端口并且通过客户端进行连接
tar -xjvf pure-ftpd-1.0.22.tar.bz2
./configure –prefix=/usr/local/pureftpd –with-mysql=/usr/local/mysql –with-paranoidmsg –with-shadow –with-welcomemsg –with-uploadscript –with-quotas –with-cookie –with-virtualhosts –with-virtualroot –with-diraliases –with-sysquotas –with-ratios –with-ftpwho –with-throttling –with-language=simplified-chinese
–with-mysql=/usr/local/mysql \ 此处的 /usr/local/mysql 请改为你的mysql实际安装路径.如果出现类似configure: error: Your MySQL client libraries aren’t properly installed 的错误,请将mysql目录下的 include/mysql下的mysql.h文件以及lib/mysql下的全部文件,连接(直接复制过去或许也可)到 /usr/lib 目录下(参考)
cp /usr/local/mysql/lib/libmysqlclent* /usr/lib(真正解决办法)
##运行 ldconfig,加载所有共享链接库
cp -a ftp /var/www/html/pureftp
make && make install
cp configuration-file/pure-config.pl /usr/local/pureftpd/sbin/
chmod +x /usr/local/pureftpd/sbin/pure-config.pl
cp configuration-file/pure-ftpd.conf /etc
make /ftproot
生成pure-Ftp服务管理脚本
编辑contrib子目录里面的redhat.int文件
fullpath=/usr/local/sbin/$prog
改为
fullpath=/usr/local/pureftpd/sbin/$prog
pureftpwho=/usr/local/sbin/pure-ftpwho
改为
pureftpwho=/usr/local/pureftpd/sbin/pure-ftpwho
cp contrib/redhat.init /etc/init.d/pure-ftpd
chmod +x /etc/init.d/pure-ftpd
chkconfig –add pure-ftpd
安装user mamager for pure-ftpd进行Web管理pure-ftp
tar -xzvf ftp_v2.1.tar.gz
cp -a ftp /var/www/html/pureftp
在浏览器输入。IP/pureftp/install.php
一步一步的创建!!
Touch /etc/pureftp-mysql.conf
把下面复制到那个文件
############################################################################
# #
# PureFTPd MySQL configuration file. #
# Generated by the installation wizard for the 'User manager for PureFTPd' #
# See http://machiel.generaal.net for more info #
# or read the README.MySQL for explanations of the syntax. #
# #
############################################################################
# Optional : MySQL server name or IP. Don't define this for unix sockets.
MYSQLServer 127.0.0.1
# Optional : MySQL port. Don't define this if a local unix socket is used.
# MYSQLPort 3306
# Optional : define the location of mysql.sock if the server runs on this host.
MYSQLSocket /tmp/mysql.sock
# Mandatory : user to bind the server as.
MYSQLUser ftp
# Mandatory : user password. You must have a password.
MYSQLPassword tmppasswd
# Mandatory : database to open.
MYSQLDatabase ftpusers
# Mandatory : how passwords are stored
# Valid values are : "cleartext", "crypt", "md5" and "password"
# ("password" = MySQL password() function)
# You can also use "any" to try "crypt", "md5" *and* "password"
MYSQLCrypt md5
# In the following directives, parts of the strings are replaced at
# run-time before performing queries :
#
# \L is replaced by the login of the user trying to authenticate.
# \I is replaced by the IP address the user connected to.
# \P is replaced by the port number the user connected to.
# \R is replaced by the IP address the user connected from.
# \D is replaced by the remote IP address, as a long decimal number.
#
# Very complex queries can be performed using these substitution strings,
# especially for virtual hosting.
# Query to execute in order to fetch the password
MYSQLGetPW SELECT Password FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
# Query to execute in order to fetch the system user name or uid
MYSQLGetUID SELECT Uid FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
# Optional : default UID - if set this overrides MYSQLGetUID
#MYSQLDefaultUID 1000
# Query to execute in order to fetch the system user group or gid
MYSQLGetGID SELECT Gid FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
# Optional : default GID - if set this overrides MYSQLGetGID
#MYSQLDefaultGID 1000
# Query to execute in order to fetch the home directory
MYSQLGetDir SELECT Dir FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
# Optional : query to get the maximal number of files
# Pure-FTPd must have been compiled with virtual quotas support.
MySQLGetQTAFS SELECT QuotaFiles FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
# Optional : query to get the maximal disk usage (virtual quotas)
# The number should be in Megabytes.
# Pure-FTPd must have been compiled with virtual quotas support.
MySQLGetQTASZ SELECT QuotaSize FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
# Optional : ratios. The server has to be compiled with ratio support.
MySQLGetRatioUL SELECT ULRatio FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
MySQLGetRatioDL SELECT DLRatio FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
# Optional : bandwidth throttling.
# The server has to be compiled with throttling support.
# Values are in KB/s .
MySQLGetBandwidthUL SELECT ULBandwidth FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
# Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS :
# 1) You know what you are doing.
# 2) Real and virtual users match.
# MySQLForceTildeExpansion 1
# If you upgraded your tables to transactionnal tables (Gemini,
# BerkeleyDB, Innobase...), you can enable SQL transactions to
# avoid races. Leave this commented if you are using the
# traditionnal MyIsam databases or old (< 3.23.x) MySQL versions.
# MySQLTransactions On
在/etc/pure-ftp.conf
加一句
MySQLConfigFile /etc/pureftpd-mysql.conf
Service pure-ftpd start
转载于:https://www.cnblogs.com/Jerry-blog/p/5044753.html
PureFTP安装配置相关推荐
- Debian Linux下安装配置 Pure-ftpd
PureFTPd 是一款专注于程序健壮和软件安全的免费FTP服务器软件(基于BSD License).其可以在多种类Unix操作系统中编译运行,包括Linux.OpenBSD.FreeBSD.Sola ...
- linux pureftpd 教程,Linux环境PureFTPd安装配置(上篇)
Linux环境PureFTPd安装配置如下: 1.下载pure-ftpd源码包,解压 2.编译.安装.准备 进入解压好的源码目录 #配置编译参数,偷懒--everything ./configure ...
- pureftpd 配置 mysql_pureftpd+mysql验证的安装配置文档
pureftpd+mysql验证的安装配置文档 一.mysql编译安装: 1,准备工作 a,下载安装程序mysql-5.1.41.tar.gz b,为mysql建立用户和组 groupadd -g 2 ...
- 文件服务器安装配置说明手册,FreeBSD全能服务器安装手册之文件服务器篇之A安装配置篇...
FreeBSD全能服务器安装手册FTP篇之A安装配置篇 cd /usr/ports/ftp/pure-ftpd make WITH_WELCOMESG=yes WITH_UPLOADSCRIPT=ye ...
- mysql64如何配置_win7 64位下如何安装配置mysql-winx64(安装记录)
win7 64位下如何安装配置mysql winx64 1.mysql下载 官方网站下载地址:http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5. ...
- ActiveMQ—安装配置及使用
安装配置及使用 转自:http://blog.csdn.net/qq_21033663/article/details/52461543 (一)ActiveMQ介绍 ActiveMQ 是Apache出 ...
- Linux下Tomcat的安装配置
Linux下Tomcat的安装配置 一.下载安装对应的jdk,并配置Java环境. 官网下载地址: http://www.oracle.com/technetwork/java/javase/down ...
- wamp的mysql单独使用_Windows 7+8.1+10 单独安装配置 PHP+Apache+MySQL(不使用 WAMP)
Windows 8.1 单独安装配置 PHP+Apache+MySQL(不使用 WAMP) 本文同样适用于Windows7和10 0x00 PHP [下载]http://www.doczj.com/d ...
- mysql数据库解压安装教程_MySQL数据库之windows 10下解压版MySql安装配置方法教程...
本文主要向大家介绍了MySQL数据库之windows 10下解压版MySql安装配置方法教程 ,通过具体的内容向大家展现,希望对大家学习MySQL数据库有所帮助. windows 10 下安装解压版的 ...
最新文章
- 【微服务架构】SpringCloud之Feign
- websocket连接mqtt实现发布及订阅主题
- python下载教程1001python下载教程-1001种玩法 | Python 学习指南资源
- linux系统从开机到登录之前的启动流程
- 多线程面试题之原子性、可见性、有序性
- Nexus协议,闲鱼一体化开发的幕后玩家
- Jupyter notebook切换python版本
- PGSQL触发器实例
- 华硕笔记本电池0%充不进电_华硕笔记本电池不充电怎么办
- sigar 监控服务器硬件信息
- 什么是外汇EA呢?工作的原理又是什么呢?送给不懂外汇EA
- crossed the “t‘s“, dotted the “i‘s“, grouted the tiles是什么意思?
- nltk中文分句_如何使用nltk进行中文分词?
- java限流器简单实现
- 如何在安卓手机上编辑Excel表格?
- 【墨菲安全实验室】“Dirty Pipe”的故事-Linux 内核提权漏洞 (CVE-2022-0847)
- 【沐风老师】3DMAX实线转虚线插件DashedShape使用教程
- 互联网dns架构实现智能dns实现
- 百万军师v1.0——直播答题答案快速搜索
- 基于数据思维的科学减肥_能量与营养
热门文章
- ios 数组中的字典排序_题解 | 26.删除排序数组中的重复项
- 我对python的理解_python之我对装饰器的理解
- pythonfor循环遍历字典的属性_python-嵌套和for循环中的字典和列表中的项...
- js 判断 ““,null,undefined
- linux拷贝带子文件夹命令,简单带子目录的makefile练习
- 任正非谈鸿蒙系统问题不大,任正非谈鸿蒙系统:两三年重建生态,有信心打造全球生态...
- 中兴如何远程服务器时间同步,中兴通讯时间同步解决方案
- 计算机绘图图库的创建,工程制图与计算机绘图.doc
- linux下编译webkit,Linux下编译WebKit和JSC
- 设置cookie存活时间_Cookie的存活时间