FreeBSD上Proftpd带匿名登陆和使用MySQL用户验证的Quota磁盘限额安装手记

Show All   1 2 3 4

自从在Yahoo工作后,对FreeBSD的喜欢是越来越强烈,这两年多几乎再也不用RedHat之类的Linux了,最近尝试了在FreeBSD上配置了一个基于Proftpd的FTP服务器,要求使用MySQL数据库存放ftp用户信息,并在数据库内存放用户Quota磁盘限额信息,同时还支持anonymous匿名用户登陆。

之前网上搜索到一些文章,好像都出自同一个朋友的手,到处都是转载或者稍微的修改。下面是Michael根据大家的经验和proftpd的MAN文档进行的实际安装手记。

本次Michael的FTP服务器使用的是FreeBSD 4.10 Release版本,Michael决定使用FreeBSD非常优秀的Ports系统进行所有软件的安装。以下的所有操作均是在Root用户或者sudo root的情况下完成。

一、安装MySQL
#cd /usr/ports/databases/mysql41-server
#make install
系统会自动下载mysql的安装包mysql-4.1.14.tar.gz,并完成编译和安装过程

注1:对于mysql的安装,需要说明几点要注意的地方,FreeBSD的Ports自动完成mysql安装后,还需要自己完成下面几件事情后才能正常使用
1、创建mysql用户和mysql用户组,并修改目录权限
#pw groupadd mysql -g 88
#pw adduser mysql -u 88 -g 88 -d /nonexistent -s /sbin/nologin
#chown -R mysql:mysql /var/db/mysql
#chown -R mysql:mysql /usr/local/share/mysql
2、创建mysql系统数据库
#/usr/local/bin/mysql_install_db
#/usr/lcoal/bin/mysql_create_system_tables
3、创建mysql自启动脚本
#cp /usr/local/share/mysql/mysql.server /usr/local/etc/rc.d/mysql-server.sh
4、创建mysql配置文件 my.cnf
#cp /usr/local/share/mysql/my-medium.cnf /etc/my.cnf (有my-medium、small、large、huge等可选)

现在,你可以通过 /usr/local/etc/rc.d/mysql-server.sh start 或者重启系统来启动mysql了

二、安装proftpd
和mysql的安装很相似,使用ports安装
#cd /usr/ports/ftp/proftpd-mysql
#make install
安装的时候会要求选择proftpd要安装的模块,选择好mysql和quota,其他的根据情况选择
然后系统自动下载proftpd-1.3.0rc2.tar.bz2并完成编译和安装。

Show All   1 2 3 4
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
4 Responses
  1. DRILL says:

    2、创建匿名登陆用户映射的系统用户和用户组
    #pw groupadd ftpusers -g 2002
    #pw adduser ftp -u 2002 -g 2001 -d /var/ftp/incoming -s /sbin/nologin

    pwadduser ftp -u 2002 -g 2001 (这个地方是2001还是2002?把ftp 到FTPGRP 组?)

  2. Michael says:

    谢谢这位朋友提示,的确应该是2002,笔误:)

  3. dyfire says:

    很实用 ,想转载过去·

  4. thank you for your efforts.

  5. Hello there! This is my first visit to your blog!
    We are a collection of volunteers and starting a new
    initiative in a community in the same niche.
    Your blog provided us useful information to work on. You have done a marvellous job!

  6. g says:

    I am really happy to read this webpage posts which contains tons
    of valuable information, thanks for providing these kinds of data.

  7. I really like it whenever people come together and share opinions.
    Great website, stick with it!

  8. For hottest information you have to pay a visit world-wide-web and on web I found this web site as a
    most excellent web page for newest updates.

  9. Spot on with this write-up, I absolutely believe this web site needs
    a great deal more attention. I’ll probably be returning to see more, thanks for
    the information!

  10. Hmm is anyone else encountering problems with
    the images on this blog loading? I’m trying
    to find out if its a problem on my end or if it’s the blog.
    Any responses would be greatly appreciated.

  11. Howdy! I’m at work browsing your blog from my new apple iphone!

    Just wanted to say I love reading through your blog and look forward to
    all your posts! Carry on the great work!

  12. Hello, just wanted to tell you, I enjoyed this article. It was inspiring.
    Keep on posting!

  13. Wonderful blog! I found it while surfing around on Yahoo News.
    Do you have any tips on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!
    Appreciate it

  14. This design is incredible! You most certainly know how to keep a reader amused.
    Between your wit and your videos, I was almost moved to start my
    own blog (well, almost…HaHa!) Fantastic job. I really enjoyed what you had to
    say, and more than that, how you presented it. Too cool!

  15. Good post. I learn something totally new and challenging on websites I stumbleupon everyday.
    It’s always helpful to read through articles from other
    writers and practice a little something from other web sites.

  16. Hi, all the time i used to check webpage posts here early in the break of day,
    because i enjoy to learn more and more.

  17. I really like reading a post that will make men and women think.
    Also, thanks for permitting me to comment!

  18. Heya i’m for the first time here. I found this board and I find It truly useful & it helped me out a lot.
    I hope to give something back and aid others like you aided me.

  19. 김해출장 says:

    Please let me know if you’re looking for a article author for your weblog.
    You have some really good articles and I believe I would be a good asset.
    If you ever want to take some of the load off, I’d absolutely love to write some articles for your blog
    in exchange for a link back to mine. Please send me an e-mail
    if interested. Kudos!

  20. Howdy! I know this is somewhat off topic but I was wondering if you knew where I could locate a captcha plugin for
    my comment form? I’m using the same blog platform as yours and
    I’m having difficulty finding one? Thanks a lot!

  21. natalielise says:

    I’d like to thank you for the efforts you have put in writing
    this blog. I’m hoping to check out the same high-grade
    blog posts from you in the future as well. In truth, your creative
    writing abilities has encouraged me to get my own,
    personal website now 😉 pof natalielise

  22. Appreciate the recommendation. Will try it out.

  23. dating site says:

    Excellent weblog right here! Additionally your site quite a
    bit up fast! What host are you the use of? Can I get your affiliate link in your
    host? I want my website loaded up as fast as yours lol

  24. 레깅스바 says:

    Pretty nice post. I just stumbled upon your weblog and wanted
    to say that I’ve really enjoyed browsing your blog posts.
    After all I’ll be subscribing to your rss feed and I hope you write again very soon!

  25. Pingback: 정자동룸
  26. I visited several websites however the audio feature for audio
    songs present at this web site is really excellent.

  27. Thank you, I’ve just been looking for information approximately this subject for ages and yours is the best
    I’ve found out so far. However, what about the bottom line?

    Are you certain about the supply?

  28. Good day! I could have sworn I’ve visited your blog before but after browsing through a few of the articles I realized it’s new to me.

    Nonetheless, I’m certainly pleased I came across it and I’ll be book-marking
    it and checking back frequently!

  29. I like the valuable info you provide in your articles. I will bookmark
    your weblog and check again here frequently. I am quite sure
    I will learn many new stuff right here! Good luck for the next!

  30. Having read this I thought it was very informative. I appreciate you spending some time and energy to put this article together.
    I once again find myself personally spending a significant amount of time both reading and
    posting comments. But so what, it was still worthwhile!

  31. I think this is one of the most important info for me. And i’m glad reading your article.
    But want to remark on some general things, The site style is wonderful, the articles is really great :
    D. Good job, cheers

  32. whoah this blog is fantastic i love studying your articles.
    Stay up the good work! You already know, a lot of persons are hunting round for
    this info, you could aid them greatly.

  33. DennisHor says:

    You actually expressed that exceptionally well!

    viagra on medicaid
    viagra blindness lawsuit news
    can viagra lower your bp
    viagra and cialis expiry notice spam

  34. Stevefrulk says:

    Kudos! A lot of information.

    achat cialis gГ©nГ©rique
    cialis online shop
    cialis prodaja bih
    http://ciaonlinebuyntx.com/

  35. Hi there! This is my first visit to your blog! We
    are a group of volunteers and starting a new initiative
    in a community in the same niche. Your blog provided us useful information to work on. You have done a outstanding job!

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image