array(2) { ["docs"]=> array(10) { [0]=> array(10) { ["id"]=> string(3) "428" ["text"]=> string(77) "Visual Studio 2017 单独启动MSDN帮助(Microsoft Help Viewer)的方法" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(8) "DonetRen" ["tagsname"]=> string(55) "Visual Studio 2017|MSDN帮助|C#程序|.NET|Help Viewer" ["tagsid"]=> string(23) "[401,402,403,"300",404]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511400964" ["_id"]=> string(3) "428" } [1]=> array(10) { ["id"]=> string(3) "427" ["text"]=> string(42) "npm -v;报错 cannot find module "wrapp"" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(4) "zzty" ["tagsname"]=> string(50) "node.js|npm|cannot find module "wrapp“|node" ["tagsid"]=> string(19) "[398,"239",399,400]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511400760" ["_id"]=> string(3) "427" } [2]=> array(10) { ["id"]=> string(3) "426" ["text"]=> string(54) "说说css中pt、px、em、rem都扮演了什么角色" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(12) "zhengqiaoyin" ["tagsname"]=> string(0) "" ["tagsid"]=> string(2) "[]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511400640" ["_id"]=> string(3) "426" } [3]=> array(10) { ["id"]=> string(3) "425" ["text"]=> string(83) "深入学习JS执行--创建执行上下文(变量对象,作用域链,this)" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(7) "Ry-yuan" ["tagsname"]=> string(33) "Javascript|Javascript执行过程" ["tagsid"]=> string(13) "["169","191"]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511399901" ["_id"]=> string(3) "425" } [4]=> array(10) { ["id"]=> string(3) "424" ["text"]=> string(30) "C# 排序技术研究与对比" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(9) "vveiliang" ["tagsname"]=> string(0) "" ["tagsid"]=> string(2) "[]" ["catesname"]=> string(8) ".Net Dev" ["catesid"]=> string(5) "[199]" ["createtime"]=> string(10) "1511399150" ["_id"]=> string(3) "424" } [5]=> array(10) { ["id"]=> string(3) "423" ["text"]=> string(72) "【算法】小白的算法笔记:快速排序算法的编码和优化" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(9) "penghuwan" ["tagsname"]=> string(6) "算法" ["tagsid"]=> string(7) "["344"]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511398109" ["_id"]=> string(3) "423" } [6]=> array(10) { ["id"]=> string(3) "422" ["text"]=> string(64) "JavaScript数据可视化编程学习(二)Flotr2,雷达图" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(7) "chengxs" ["tagsname"]=> string(28) "数据可视化|前端学习" ["tagsid"]=> string(9) "[396,397]" ["catesname"]=> string(18) "前端基本知识" ["catesid"]=> string(5) "[198]" ["createtime"]=> string(10) "1511397800" ["_id"]=> string(3) "422" } [7]=> array(10) { ["id"]=> string(3) "421" ["text"]=> string(36) "C#表达式目录树(Expression)" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(4) "wwym" ["tagsname"]=> string(0) "" ["tagsid"]=> string(2) "[]" ["catesname"]=> string(4) ".NET" ["catesid"]=> string(7) "["119"]" ["createtime"]=> string(10) "1511397474" ["_id"]=> string(3) "421" } [8]=> array(10) { ["id"]=> string(3) "420" ["text"]=> string(47) "数据结构 队列_队列实例:事件处理" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(7) "idreamo" ["tagsname"]=> string(40) "C语言|数据结构|队列|事件处理" ["tagsid"]=> string(23) "["246","247","248",395]" ["catesname"]=> string(12) "数据结构" ["catesid"]=> string(7) "["133"]" ["createtime"]=> string(10) "1511397279" ["_id"]=> string(3) "420" } [9]=> array(10) { ["id"]=> string(3) "419" ["text"]=> string(47) "久等了,博客园官方Android客户端发布" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(3) "cmt" ["tagsname"]=> string(0) "" ["tagsid"]=> string(2) "[]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511396549" ["_id"]=> string(3) "419" } } ["count"]=> int(200) } 222 pure-ftp - 爱码网

---------------------------------------------------------

一、前言

二、环境

三、配置

四、测试

---------------------------------------------------------


一、前言

   pureftpd是一款专注于程序健壮和软件安全的免费FTP服务器软件(基于BSD License)。其可以在多种类Unix操作系统中编译运行,包括Linux、OpenBSD、NetBSD、FreeBSD、DragonFly BSD、Solaris、Tru64、Darwin、Irix and HP-UX。PureFTPd还有Android移植版本。pureftpd由Troll-FTPd发展而来,Troll-FTPd是Arnt Gulbrandsen于1995年到1999年在Trolltech工作时所作。Gulbrandsen停止维护Troll-FTPd项目后,Frank Denis于2001年开始维护并将其改名为pureftpd,目前的开发维护者是由Denis领导的团队。

二、环境

系统:CentOS6.4 32位系统

所需软件:

 PureAdmin-0.3.tar.gz

 pure-ftpd-1.0.36.tar.gz

 pureftpd-mysql.conf

 pureftp.sql

下载地址 http://pan.baidu.com/s/1pJpsCSb

三、配置

1.搭建LAMP环境

[[email protected] ~]# yum install httpd mysql-server mysql php php-gd php-mysql pam-devel mysql-devel
[[email protected] ~]# service mysqld start
[[email protected] ~]# service httpd start
[[email protected] ~]# chkconfig mysqld on     //加入开机启动
[[email protected] ~]# chkconfig httpd on

2.上传需要使用的文件

[[email protected] pureftp]# ll
-rw-r--r--. 1 root root    29148 Feb 15 20:54 PureAdmin-0.3.tar.gz
-rw-r--r--. 1 root root   578781 Feb 15 20:54 pure-ftpd-1.0.36.tar.gz
-rw-r--r--. 1 root root     4718 Feb 15 20:54 pureftpd-mysql.conf
-rw-r--r--. 1 root root     2105 Feb 15 20:54 pureftp.sql

3.导入pureftp.sql文件

[[email protected] pureftp]# mysqladmin -u root -p password '123'
Enter password:
[[email protected] pureftp]# mysql -u root -p <pureftp.sql
Enter password:
[[email protected] pureftp]# mysql -u root -p
Enter password:
mysql> show databases;
mysql> use ftpusers;
mysql> show tables;
mysql> select * from admin;
+----------+----------------------------------+
| Username | Password                         |
+----------+----------------------------------+
| admin    | 202cb962ac59075b964b07152d234b70 |
+----------+----------------------------------+
mysql> grant all privileges on ftpusers.* to [email protected] identified by 'tmppasswd';
mysql> flush privileges;

4.安装PureAdmin,并编辑配置文件

[[email protected] ~]# cd pureftp/
[[email protected] pureftp]# tar -zxvf PureAdmin-0.3.tar.gz -C /var/www/html/
[[email protected] pureftp]# cd /var/www/html/
[[email protected] html]# ll
drwxr-xr-x. 4 root 80 4096 Mar 22  2009 PureAdmin-0.3
[[email protected] html]# mv PureAdmin-0.3/ pureadmin
[[email protected] html]# cd pureadmin/
[[email protected] pureadmin]# ls
adduser.php  chkuser.php  config.php  p_w_picpaths  lib.php list.php ...
[[email protected] pureadmin]# vim config.php
   3 $cfg['dbname']='ftpusers';    //mysql db name
   4 $cfg['dbuser']='ftp';         //mysql user
   5 $cfg['dbpasswd']='tmppasswd'; //mysql password
   10 $cfg['passwdtype']='MD5';
   14 $cfg['dir']='/ftproot/';     //dir

5.创建一个本地账号

[[email protected] pureadmin]# useradd -d /ftproot ftpaccount
[[email protected] pureadmin]# ll -d /ftproot/
drwx------. 4 ftpaccount ftpaccount 4096 Feb 15 21:37 /ftproot/
[[email protected] pureadmin]# chmod -R o+rwx /ftproot/

6.通过浏览器访问apache服务器

pure-ftp

pureftpd的web方式后台管理

pure-ftp

添加test1用户

pure-ftp

7.通过mysql查看添加的用户信息

mysql> select * from users\G
*************************** 1. row ***************************
       User: test1
   Password: 202cb962ac59075b964b07152d234b70
        Uid: 1000
        Gid: 1000
        Dir: /ftproot/test1
 QuotaFiles: 0
  QuotaSize: 100
ULBandwidth: 0
DLBandwidth: 0
  Ipaddress: *
    Comment:
     Status: 1
    ULRatio: 0
    DLRatio: 0

8.安装pure-ftpd,并配置相关文件

[[email protected] pureadmin]# cd /root/pureftp/
[[email protected] pureftp]# tar -zxvf pure-ftpd-1.0.36.tar.gz -C /usr/local/src/
[[email protected] pureftp]# cd /usr/local/src/pure-ftpd-1.0.36/
[[email protected] pure-ftpd-1.0.36]# ./configure  
--prefix=/usr/local/pureftpd   
--with-mysql  
--with-shadow  
--with-pam 
--with-welcomemsg    
--with-uploadscript 
--with-cookie   
--with-virtualchroot   
--with-virtualhosts  
--with-diraliases
--with-quotas  
--with-puredb   
--with-sysquotas
--with-ratios   
--with-ftpwho 
--with-throttling  
--with-language=simplified-chinese
[[email protected] pure-ftpd-1.0.36]# make && make install
[[email protected] pure-ftpd-1.0.36]# cd /usr/local/pureftpd/
[[email protected] pureftpd]# ls
bin  sbin  share
[[email protected] pureftpd]# mkdir etc
[[email protected] pureftpd]# ls
bin  etc  sbin  share
[[email protected] pureftpd]# cd /usr/local/src/pure-ftpd-1.0.36/
[[email protected] pure-ftpd-1.0.36]# ls
aclocal.m4   contrib     depcomp      ........
[[email protected] pure-ftpd-1.0.36]# cd contrib/
[[email protected] contrib]# ls
Makefile   Makefile.am  pure-stat.pl  redhat.init   ....
[[email protected] contrib]# cp redhat.init /etc/init.d/pureftpd
[[email protected] contrib]# chmod a+x /etc/init.d/pureftpd
[[email protected] contrib]# cd ..
[[email protected] pure-ftpd-1.0.36]# cd configuration-file/
[[email protected] configuration-file]# ls
 .....   pure-config.pl  pure-config.py   pure-ftpd.conf
[[email protected] configuration-file]# cp pure-ftpd.conf /usr/local/pureftpd/etc/
[[email protected] configuration-file]# cp pure-config.pl /usr/local/pureftpd/sbin/
[[email protected] configuration-file]# chmod a+x /usr/local/pureftpd/sbin/pure-config.pl
[[email protected] configuration-file]# vim /etc/init.d/pureftpd
   18 fullpath=/usr/local/pureftpd/sbin/$prog
   19 pureftpwho=/usr/local/pureftpd/sbin/pure-ftpwho
   24 $fullpath /usr/local/pureftpd/etc/pure-ftpd.conf --daemonize
[[email protected] configuration-file]# service pureftpd start
[[email protected] configuration-file]# netstat -tupln |grep 21
tcp   0   0 0.0.0.0:21   0.0.0.0:*  LISTEN   9856/pure-ftpd (SER
tcp   0   0 :::21        :::*       LISTEN   9856/pure-ftpd (SER
[[email protected] configuration-file]# chkconfig pureftpd on
[[email protected] configuration-file]# cd /usr/local/pureftpd/etc/
[[email protected] etc]# ll
-rw-r--r--. 1 root root 11211 Feb 15 21:58 pure-ftpd.conf
[[email protected] etc]# vim pure-ftpd.conf
    116  MySQLConfigFile    /usr/local/pureftpd/etc/pureftpd-mysql.conf
    126  PureDB             /usr/local/pureftpd/etc/pureftpd.pdb
    336  CreateHomeDir      yes
[[email protected] etc]# cp /root/pureftp/pureftpd-mysql.conf ./
[[email protected] etc]# ll
-rw-r--r--. 1 root root 11245 Feb 15 22:14 pure-ftpd.conf
-rw-r--r--. 1 root root  4718 Feb 15 22:16 pureftpd-mysql.conf
[[email protected] etc]# vim pureftpd-mysql.conf
   32 MYSQLPassword   tmppasswd
   45 MYSQLCrypt      md5
[[email protected] etc]# cd ../bin
[[email protected] bin]# ./pure-pw useradd test1 -u ftpaccount -g ftpaccount -d /ftproot/test1 -m
Password:
Enter it again:
[[email protected] bin]# service pureftpd restart

四、测试

1.在wi7的dos命令行下测试:

C:\Users\nuo>ftp 192.168.2.102
连接到 192.168.2.102。
220---------- 欢迎来到 Pure-FTPd [privsep] ----------
220-您是第 1 个使用者,最多可达 50 个连接
220-现在本地时间是 22:46。服务器端口: 21。
220-这部主机也欢迎IPv6的连接
220 在 15 分钟内没有活动,您被会断线。
用户(192.168.2.102:(none)): test1
331 使用者 test1 OK. 需要密码.
密码:
230-OK. 目前限制的目录是 /
230 0 Kbytes使用 (0%) - 授权可用: 102400 Kb
ftp> dir
200 PORT命令OK
150 连接到port 52307
drwxr-xr-x    2 1000       1000       4096 Feb 15 22:46 .
drwxr-xr-x    2 1000       1000       4096 Feb 15 22:46 ..
-rw-------    1 1000       1000       0 Feb 15 22:46 .ftpquota
226-Options: -a -l
226 总共 3 符合
ftp: 收到 204 字节,用时 0.00秒 204.00千字节/秒。

2.资源管理器测试更为直观。(略)

3.通过test1账号访问后,服务器会自动添加test1相应的文件夹。

[[email protected] ~]# cd /ftproot/
[[email protected] ftproot]# ll
drwxr-xr-x. 2 1000 1000 4096 Feb 15 23:06 test1


转载于:https://blog.51cto.com/hatech/1359576

相关文章: