Feed on
Subscription

Be based on FreeBSD5.4 all-round server to install V1.01



Correcting states:This correcting basically increased corresponding demonstrative character to be in especially Ftp server respect

Copyright states:The thought that acts on a source,Everybody also hopes with reprinting everybody does not want forestall technology

Intense proposal:Install Src of the installation when the system and Ports

Reason:Course experiment can promote synchronism the rate of Src and Ports

Install basically

The software of server download binary system that variable of environment of setting of Setenv PACKAGEROOT "ftp://ftp.jp.freebsd.org" makes alternative of means of installation of source code of Pkg_add -r sharper installs Pkg_add -r Cvsup-without-gui to download and Cvsup-without-gui of program of code of installation binary system (Cvsup-without-gui supports the software that works below text means without the graph,Use synchronous code and Ports.)

Editor / Etc/rc.conf

Ee /etc/rc.conf

Increase the following (with will stop Sendmail)

Sendmail_enable="NONE "Sendmail_submit_enable="NO "Sendmail_outbound_enable="NO "Sendmail_msp_queue_enable="NO"

Mkdir /usr/home/chb/pkg_infoRebootPkg_info | Col -b%26gt;/ Usr/home/chb/pkg_info/pkg_info_cvsup-without-gui.txt


(The software that basically is record installation,The correlation sex that software package analyses after be being used)

Synchronous system code

Cvsup -g -L 2 -h Cvsup.jp.FreeBSD.org /usr/share/examples/cvsup/standard-supfile notices:Standard-supfile must be examined before this file is synchronous inside content is correct!Namely:[May go to code synchronism below the circumstance with acquiescent *default Release=cvs Tag= ] current newest version,Of course this newest version may be Current edition!Must appoint so!My writing a law is:*The code of current and stable edition to FreeBSD5.4 still has synchronism of means of Default Release=cvs Tag=RELENG_5_4 even if notable is:At present synchronous code can choose two file

It is:Stable-supfile
Two be:Standard-supfile

The version that Stable-supfile had assigned synchronous code commonly,Also do not need set commonly!But because FreeBSD5.2.1 is met,the friends that use FreeBSD5.2.1 noticed with respect to need a code is synchronous to the latest edition of 4 departments,I did not understand FreeBSD develops a group why to be met all the time so do!Once did not modify synchronous sentence,Light cause partial software to cannot be used cause kernel mistake to cannot enter a system at all again!I can have been experienced personally

Standard-supfile I think to had better check before synchronism inside the part about synchronous code version.

As to why choose Standard-supfile and do not choose Stable-supfile but I pass N second redo just uses Standard-supfile certainly

Uname -v moving to examine what you can discover systematic version date to show with the system of Standard-supfile synchronism after landing a system is FreeBSD 5.4-RELEASE-p4 #0: Sat Jul 16 09:29:22 CST 2005 Chb@ns1.tjhaina.net:/usr/obj/usr/src/sys/GENERIC

Noticing the 5.4-RELEASE-p4 here to use Stable-supfile is to won't appear of P4!

Of course this practice that is my individual!

Compile systematic kernel

Command above Cd /usr/src Make -j4 Buildworld - J4 states support of use multi-line Cheng is accelerated compile speed (attention:Of Cpu take up rate will be elevatory)

Editor kernel

Cd /usr/src/sys/i386/confCp GENERIC /root/GENERIC.OLDEe NS1

Build a kernel

Cd /usr/srcMake Buildkernel

Install a kernel

Make Installkernel

Start afresh

Shutdown -r Now

Newer system configures a file

Mergemaster -p

The choice is made after many clew problem can following to suggest to be read carefully after this command,If be code of synchronism of the first time after installing a system,It is below the circumstance that did not install any software,Can consider to carry out Mergemaster -ai to had jumped to enquire information chooses to follow entirely new

Cd /usr/srcMake InstallworldMergemaster

Start afresh

Shutdown -r Now

Delete / Usr/obj (affect in case compile a kernel the next time)


/ Usr/objCd /usr/objChflags -R Noschg *Rm -rf *

Synchronous Ports software is wrapped

Cvsup -g -L 2 -h Cvsup.jp.FreeBSD.org /usr/share/examples/cvsup/ports-supfile


DNS server

Install Bind9.3.1

%%%%%%%%%%%%%%%%% builds stand at attention %%%%%%%%%%%%%% of retrorse and analytic catalog

Mkdir /etc/namedb/revMkdir /etc/namedb/hosts

%%%%%%%%%%%%%%% changes positive and negative to %%%%%%%%%%%%%% of analytic catalog attribute

Chown Bind:bInd /etc/namedb/revChown Bind:bInd /etc/namedb/hostsChmod 750 /etc/namedb/revChmod 750 /etc/namedb/hosts

%%%%%%%%%%%%% generates positive and negative the example file %%%%%%%%%%%% to analytic file

Cd /etc/namedbSh Make-localhost

%%%%%%%%%%%%%%%% generates this positive and negative to analytic file %%%%%%%%%%%%%%

Cp /etc/namedb/master/localhost.rev /etc/namedb/rev/192.168.0.revCp /etc/namedb/master/localhost.rev /etc/namedb/hosts/tjhaina.net.hosts


Of server of %%%%%%%%%%%%%%%% setting DNS advocate region %%%%%%%%%%%%%%%Ee /etc/namedb/named.conf

Zone "0.168.192.IN-ADDR.ARPA" {Type Master;File "/etc/namedb/rev/192.168.0.rev";
};Zone "tjhaina.net" {Type Master;File "/etc/namedb/hosts/tjhaina.net.hosts";
};


Server of %%%%%%%%%%%%% setting DNS is retrorse and analytic file %%%%%%%

Ee /etc/namedb/rev/192.168.0.rev

$TTL 3600

@ IN SOA Ns1.tjhaina.net. Root.ns1.tjhaina.net. Root.ns1.tjhaina.net..
20050430; Serial
3600; Refresh
900; Retry
3600000; Expire
3600) ; Minimum
IN NS Ns1.tjhaina.net.
205IN PTR Ns1.tjhaina.net.
205IN PTR Www.tjhaina.net.
The 205 IP addresses that are you
(increase retrorse and analytic PTR to record an attention:Do not suggest full domain name and two grade domain name increase PTR to record)

Of server of %%%%%%%%%%%%% setting DNS to analytic file %%%%%%%

Ee /etc/namedb/hosts/tjhaina.net.hosts


$TTL 3600

@ IN SOA Ns1.tjhaina.net. Root.ns1.tjhaina.net. Root.ns1.tjhaina.net..
20050621; Serial
3600; Refresh
900; Retry
3600000; Expire
3600) ; Minimum
IN NS Ns1.tjhaina.net. Ns1 IN A 192.168.0.205Www IN A 192.168.0.205Mail IN A 192.168.0.205Tjhaina.net. IN MX 10 Mail.tjhaina.net

(Notice:The MX of A record redo that the accretion that MX records wants to do a Mail first is recorded.The two grade domain name that the principle that MX record adds is the Mail that points to you with your domain name.Still have nevertheless add a method otherly him everybody can seek relevant data)


%%%%%%%%%%%%% generates the Key file %%%%%%%%%%%%%%% of DNS server
/ Usr/sbin/rndc-confgen%26gt;/ Etc/namedb/rndc.conf


%%%%%%%%%%%%% guides Key file Named.conf file %%%%%%%%%%%%%Cd /etc/namedbTail -n10 Rndc.conf | Head -n9 | Sed -e S/#\ //g %26gt;%26gt;Named.conf
(this commands I also do not know why so write!Hope everybody talks together)

%%%%%%%%%%%%% starts DNS server %%%%%%%%%%%%%%%%%%%%%
/ Usr/sbin/named -gc /etc/namedb/named.conf %26amp;
(%26amp;State tiring-room moves)
/ Usr/sbin/rndc Status
(the starting case that examines DNS)


%%%%%%%%%%%%% installs %%%% %%%%%%%%%%%% of this address of machine DNS serverEe /etc/resolv.conf

Add

Nameserver 127.0.0.1Nameserver 211.98.2.4Nameserver 202.99.104.68Nameserver 202.99.96.68Nameserver 202.102.128.68Nameserver 202.103.0.117Nameserver 202.103.44.5

(Choosing so much DNS so was to consider redundant design prevents in case make mistake)
%%%%%%%%%%%% is deleted or annotate drops the listening address %%%%%% of DNS serverEe /etc/namedb/named.conf

Delete
20 Listen-on {127.0.0.1; };
Annotate is dropped
/ / Listen-on {127.0.0.1; };Rndc Reload
(because Bind9 is below acquiescent circumstance,just give oneself,Want purify to monitor address Listen-on {127.0.0.1; }; so)
%%%%%%%%%%%% makes DNS server and system start %%%%%%%% togetherEe /etc/rc.conf
AddNamed_enable="YES "


Install Perl5.8.X

Cd /usr/ports/lang/perl5.8

Make WITH_DEBUGGING=yes \
WITH_GDBM=yes \
WITHOUT_PERL_MALLOC=yes \
WITHOUT_PERL_64BITINT=yes \
WITH_THREADS=yes \
ENABLE_SUIDPERL=yes
(notice:Above command and parameter are to press an input)Make TestMake InstallMake CleanMake RmconfigShutdown -r NowPerl -vPs Auwx | Grep PerlPkg_infoPkg_info | Col -b%26gt;/ Usr/home/chb/pkg_info/pkg_info_perl5.8.txt


The acquiesce that ############### changes Ports software to wrap downloads method (because installed the ability after Perl to be able to have only / Etc/make.conf) #######Ee /etc/make.conf

Add

MASTER_SITE_OVERRIDE=ftp://ftp3.jp.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}


(the download way that changes Ports acquiesce,Can undertake installing according to oneself actual condition)

################################ installs Openssl####################################Cd /usr/ports/security/opensslMakeMake InstallMake CleanMake RmconfigPkg_infoPkg_info | Col -b%26gt;/ Usr/home/chb/pkg_info/pkg_info_openssl.txt

################################# installs ############################## of Web management systemCd /usr/ports/sysutils/webminMakeMake InstallMake CleanMake Rmconfig
/ Usr/local/lib/webmin/setup.shEe /etc/rc.conf
AddWebmin_enable="YES "

Pkg_infoPkg_info | Col -b%26gt;/ Usr/home/chb/pkg_info/pkg_info_webmin.txt

################################# installs database Mysql4.0############################Cd /usr/ports/databases/mysql40-serverMake WITH_CHARSET=gbk \
WITH_XCHARSET=all \
SKIP_DNS_CHECK=yes \
BUILD_OPTIMIZED=yes \
BUILD_STATIC=yesMake InstallMake CleanMake Rmconfig

Pkg_infoPkg_info | Col -b%26gt;/ Usr/home/chb/pkg_info/pkg_info_mysql40-server.txt

%%%%%%%%%%%% installs Mysql40 component %%%%%%%%%%%%%%Cd /usr/ports/databases/p5-DBD-mysql40MakeMake InstallMake CleanMake Rmconfig

%%%%%%%%%%% makes Mysql40 and system start %%%%%%%%%%% togetherEe /etc/rc.confMysql_enable="YES "


%%%%%%%%%%% installs the password %%%%%%%%%%%%%% of Mysql40
/ Usr/local/bin/mysqladmin -u Root Password 'password'Mysql -u Root -ppassword


%%%%%%%%%% starts Mysql40%%%%%%%%%%%%%%%%%%%Start Mysql
#/usr/local/share/mysql/mysql.server Start
/ Usr/local/etc/rc.d/mysql-server.sh Start

If above commands twice,cannot start Mysql
So ask Reboot system to start Mysql

Pkg_infoPkg_info | Col -b%26gt;/ Usr/home/chb/pkg_info/pkg_info_mysql40.txt


############################### installs Expat2#####################################Cd /usr/ports/textproc/expat2MakeMake InstallMake CleanMake RmconfigPkg_infoPkg_info | Col -b%26gt;/ Usr/home/chb/pkg_info/pkg_info_expat2.txt


############################### installs Web server Apache1.33######################Cd /usr/ports/www/apache13MakeMake InstallMake CleanMake Rmconfig

%%%%%%%%%%% makes Apache and system start %%%%%%%%%%% togetherEe /etc/rc.conf
AddApache_enable="YES "

%%%%%%%%%%%% changes the corresponding setting %%%%%%%%%%% of ApacheEe /usr/local/etc/apache/httpd.confChange 330
ServerAdmin You@your.address==%26gt; ServerAdmin B.s.d@163.comChange 348
#ServerName Www.example.com==%26gt; ServerName Www.tjhaina.net
Add 794
Add Language Zh-cn.zh-cn
Add 822
Add Charset GB2312.gb2312
Add 977
NameVirtualHost 192.168.0.205 (your Hosts Ip)

%%%%%%%%%%%% starts Apache%%%%%%%%%%%%%%%%%Start Apache
/ Usr/local/sbin/apachectl StartPkg_infoPkg_info | Col -b%26gt;/ Usr/home/chb/pkg_info/pkg_info_apache.txt

#################################### installs Php###################################Cd /usr/ports/lang/php4MakeMake InstallMake CleanMake RmconfigPkg_infoPkg_info | Col -b%26gt;/ Usr/home/chb/pkg_info/pkg_info_php4.txt
################################### installs Php patulous ################################Cd /usr/ports/lang/php4-extensionsMake (+ Bz2)Make InstallMake CleanMake RmconfigCd /usr/local/etcCp Php.ini-recommended Php.iniPkg_infoPkg_info | Col -b%26gt;/ Usr/home/chb/pkg_info/pkg_info_php4-extensions.txt

######################## installs PhpSysInfo to be based on the system of Php to monitor #######################Cd /usr/ports/www/phpSysInfo/MakeMake InstallMake CleanMake RmconfigCd /usr/local/www/data/phpSysInfo/Cp Config.php.new Config.phpChown Www:wWw Config.php
(The place that changes Config.php belongs to group and user)Pkg_infoPkg_info | Col -b%26gt;/ Usr/home/chb/pkg_info/pkg_info_phpSysInfo.txt

#################### installs Phpmyadmin to be based on the database Web of Php to manage systematic ################Cd /usr/ports/databases/phpmyadmin/MakeMake InstallMake CleanMake Rmconfig

%%%%%%%%%%%%% changes the configuration %%%%%%%%%%%% of PhpMyAdminCd /usr/local/www/phpMyAdminChmod 755 Config.inc.phpEe /usr/local/www/phpMyAdmin/config.inc.php
Will 84
$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication Method (config, http Or Cookie Based) ?
Change
$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication Method (config, http Or Cookie Based) ?
[# general 39
#$cfg['PmaAbsoluteUri'] = ' ';
# changes
#$cfg['PmaAbsoluteUri'] = 'http://192.168.0.205/phpMyAdmin/';Pkg_infoPkg_info | Col -b%26gt;/ Usr/home/chb/pkg_info/pkg_info_phpmyadmin.txt]

(I do not suggest to although PhpMyAdmin clew is changed,change 39 content now!But did not discover 39 are opposite of PhpMyAdmin move influential!Change bad to make PhpMyAdmin cannot show normally instead)

Install FTP server

############################# installs Ftp server Pure-ftpd#############################Cd /usr/ports/ftp/pure-ftpdEe /usr/ports/ftp/pure-ftpd/Makefile
Add

- - With-everything \
- - With-paranoidmsg \
- - With-virtualchroot \
- - With-tls \
- - With-largefile \
- - With-welcomemsg \
- - With-uploadscript \
- - With-cookie \
- - With-virtualhosts \
- - With-virtualroot \
- - With-diraliases \
- - With-quotas \
- - With-sysquotas \
- - With-ratios \
- - With-ftpwho \
- - With-throttling \
- - Sysconfdir=${PREFIX}/etc

Make WITH_MYSQL=1 \
WITH_LANG=simplified-chineseMake InstallMake CleanMake Rmconfig

Cd /usr/local/etcCp Pureftpd-mysql.conf.sample Pureftpd-mysql.confCp Pure-ftpd.conf.sample Pure-ftpd.confEe /usr/local/etc/pure-ftpd.conf

Install parameter detailed solution

- - With-everything: Compile an almost all character of open " big " server.


- - With-paranoidmsg: By open when this parameter,Why to plant no matter reason entry failure will show same information gives an user.Not open this parameter is,Password problem will show " test and verify fails " ,User be prohibitinged will show " I am sorry,My distrust you " .


- - With-virtualchroot: ??R post catfish does not have ? of ? A Chinese-style unlined garment Hrooted(is used - A and - A parameter) the command won't turn the Home list that gives him.Open will make its become a possibility after this function:Symbolic join always acts well,Even the catalog that they point to is not inside the Home catalog of the user.This to sharing route be one special had function (for example,There is a symbol to join below each Home catalog / Var/incoming) .This function is acquiescent not open.


- - With-tls \


- - With-largefile: The file that support is more than 2 Gigabytes in the download below 32 frameworks.Passing FTP to transmit a such big document is a relatively bizarre definite view.And your file system,Your systematic kernel, your FTP client end also needs to support ability to go.And by open hind when this function,Download will be compared not open slows (or need expends more CPU) .Say simply,Should not be amused and open this function,Unless you plan to download the file that is more than Gigabytes really.


- - With-welcomemsg: (for compatible) Pure-ftp of other FTP server can read 'welcome.msg' .The blemish that this is a safety (faceless user is OK on carry 'welcome.msg' file to arrive to show randomly) .Pure-ftpd acquiesce uses '.banner' document.


- - With-uploadscript: Since 0.98 edition begin,Pure-FTPd begins attention to upload.After uploading a success to finish when,Any additional orders or script can be started automatically.This function need is called " Pure-uploadscript " program installation is inside Pure-FTPd bag.


- - With-cookie: Random or custom-built information shows when the user logins.


- - With-virtualhosts: Support fictitious leader.This means every IP address to be able to have different faceless FPT area.If the server has an IP address only,Do not need this function.But if have many IP address,And need end of a client receive IP Xxx to obtain repeatedly / Etc/pure-ftpd/xxx/ is not ~ftp/ ,OK open this function.


- - support of fictitious Root of With-virtualroot \ //


- - With-diraliases: The alias that supports way.


- - With-quotas: Open is fictitious limitation,It is OK to can restrict an user the largest number that stores below his account,Also can limit total volume.

- - With-sysquotas: Supportive system limitation (the fictitious limitation that is not Pure-ftpd) .Enable when the plan uses systematic quota only.


- - With-ratios: Support uploads / download is compared.


- - With-ftpwho: Supportive 'pure-ftpwho' commands.This function needs open extra memory.Better when Pure-ftp moves in Standalone mode,Enable below Inetd mode slower.

- - With-throttling: Supportive bandwidth is restricted.


Other parameter


- - With-altlog: Besides systematic output,Still support a few special file forms,Already came true at present:CLF, stats, w3C and Xferlog format
Format of CLF (current daily record) it is Apache, webFS, roxen and other are the most commonly used the basic format of Web server;This log file records a file to transmit merely,Can by software of Web discharge statistic (Analog, webalizer, etc. ) be analysed.Stats format is a kind of special output pattern that analyses software design technically for log file.W3C format is software of analysis of journal of a kind of trade (all analyzer that bear IIS daily record) standard format.Xferlog is one kind results from the format of Wu-ftpd.


- - With-brokenrealpath: The Realpath() in version of a few Solaris moves fluky.If Altlog is mixed (or) Pure-uploadscript did not move very well,Compile afresh with this parameter please.


- - With-certfile=: This File is used do SSL attestation,Acquiesce is / Etc/ssl/private/pure-ftpd.pem.


- - With-extauth: The desired result module with additional support.Most user does not need this parameter..


What support a language
- - With-language=english
- - With-language=german
- - With-language=romanian
- - With-language=french
- - With-language=polish
- - With-language=spanish
- - With-language=danish
- - With-language=italian
- - With-language=brazilian-portuguese
- - With-language=slovak
- - With-language=dutch
- - With-language=korean
- - With-language=swedish
- - With-language=norwegian
- - With-language=russian
- - With-language=traditional-chinese
- - With-language=simplified-chinese
- - With-language=hungarian
- - With-language=catalan
- - With-language=czech: Change The Language Of Server Messages.
Acquiesce is English.


- - With-ldap: The LDAP method with primitive support.By open when this function,Systematic account will by oversight.You need to use OpenLDAP at the same time.If OpenLDAP is installed in a specific place,You can be used- - With-ldap= parameter.

- - With-minimal: To handle the function that contemporary FTP client carries effectively,Pure-FTPd uses basic FTP agreement to add patulous (SITE IDLE, SITE CHMOD, MLSD, . . . ) means.Use- - With-minimal parameter,These are patulous won't be compiled.Same,Also won't have Standalone Server, won't have Lookup For User/group Names, the support that won't Humor also won't have ASCII.But executive file will be installed than acquiesce smaller.You need this parameter at least GCC 3.3 is compiled with coming up.If you still want to decrease (carry out) file size,Can use- - Without-globbing is associated- - With-minimal parameter.If you build a built-in system,Can use so;In other circumstance,To prevent a client complain (the client that uses Windows client end especially) ,Forget it please


- - With-mysql: Use MySQL will offer user database.When open this parameter,Systematic account by oversight.The library document that uses end of client of this function MySQL will be installed.If MySQL is installed in special place,Can use- - With-mysql= Syntactic.


- - With-nonroot: Setting service is started with be not Root prerogative user.Any average users can run a service.This is restricted to sufferring only on the server the circumstance of the account is very useful.But a few character will cannot use,And the password can pass LDAP only,SQL or PureDB have desired result.By open when fictitious Chroot,The catalog that the user starts service be been in by limitation.This is a kind of insecure mode,Use at commonly common (blame Root) the server that the user builds provisionality.Below Standalone mode,2121 port will by monitor.If want to use Nonroot pattern,Need is compiled and install this software (. / Configure- - Prefix= . . . %26amp;%26amp;Make Install-strip) . / Sbin, / need of catalog of Bin And /man is written into Prefix,Still need to increase moving Pure-ftpd user to be in at the same time / of Etc catalog read write attributive.


- - With-pam: Use pattern of close desired result.Don't Use This Option If Your Login/passwd Pairs Are Always Refused (but The Real Fix Would Be ToFix Your PAM Configuration) . Need founds / Etc/pam.d/pure-ftpd file will apply PAM desired result.A sample book that this file includes in 'pam' method.


- - With-peruserlimits: Open every user at the same time online limitation,This parameter avoids on busy server.


- - With-pgsql: Use Postgres offers user database.When open this parameter,Systematic account by oversight,Library of Postgres client end will be installed.If Postgres is installed with special place,Can use- - With-pgsql= Syntactic.


- - With-probe-random-dev: Pure-FTPd is used / Dev/arandom, / Dev/urandom or / Dev/random facilities will provide firm random number.These equipment are explored when compile normally.If want to compile a binary system to wrap,move on other lead plane,This parameter will be explored when move.This parameter is invalid on Linux and BSD system,But can use go up in Solaris and QNX.


- - With-puredb: Support fictitious user,The user database of a this locality,Need not at systematic account.

- - With-boring: Information of indication "professionnal-looking" .


- - With-privsep: Open attributive is detached.


- - Withrendez-vous: Allow to support Rendezvous on MacOS X.


- - Without-ascii: Do not support 7-bits to transmit (ASCII) .If the client uses Windows client to carry a program to send script and HTML document,Do not use this parameter or let them cry to you.


- - Without-banner: Do not use initiative slogan,This is a kind of foolish security that achieves through concealing.


- - Without-capabilities: If function library (Libcap) is found,Pure-FTPd will use his to provide security.This parameter accident tries this library to whether exist.If function library does not have regular job,Can arrive Ftp: / / Ftp.kernel.org/pub/linux/libs/security/linux-privs/ downloads.


- - Without-globbing: Do not include global code.Can reduce memory to use up but often cannot work.Most user does not need to use- - Without-globbing.Globbing is a good function.


- - Without-humor: If you are done not have,use this parameter,Be forced to wish you are lucky.


- - Without-inetd: If Pure-FTPd always moves below Standalone mode,This parameter is OK and a few more managing code words section.Do not want to be used at the same time- - Without-inetd and


- - Without-standalone parameter,May bring about a service to cannot move.These parameter distribute a bag to go up to was not used in the binary system of Pure-FTPd,So Inetd and Standalone are supported.


- - Without-iplogging: To keep a secret do not record any IP addresses,Unless be the server with sensitive politics.


- - Without-nonalnum: Illegal file name is checked.Support main character only.Do not want blind to use this parameter,Perhaps receive those who get an user to complain.


- - Without-unicode: Do not accept blame Latin character.If server file name does not contain special character to be recommended,use.


- - Without-sendfile: In Linux, solaris, HPUX and FreeBSD kernel, pure-FTPd uses special system to call (Sendfile) the use that tries to reduce CPU and memory.In most file system this kind moves good,But should be optimized and cannot work normally in all file system.The user once had reported SMBFS(Samba) is in in FreeBSD and TmpFS and NTFS Linux (server report mistake is " Broken Pipe " or " Error During Write To Data Connection " ) go up to download a file to fail through Pure-FTPd.If plan to move in afore-mentioned file systems,serve,Must use


- - Without-sendfile parameter will define area of a work.The system that comes from PA-Risc Linux likewise also needs this parameter.


- - Without-shadow: Oversight Shadow password,Although they are explored automatically.This is a bad idea normally,Unless use, is PAM, LDAP or SQL.Period of efficacy of password of Shadow of Pure-FTPd support (include account and code) ..


- - Without-standalone: FTP server can move normally with Standalone mode (without any super services) .If do not need this function and if wanting to save byte of a few code,OK open this parameter.One is similar to G2s, the super service of Xinetd or Tcpserver will run this service compulsively,But recommend use Standalone mode.


- - Without-usernames: Never be in user and team name are outputted in method list,And acting with UIDs and GIDs.This will improve safety and performance,But can the user feels not quite friendly.


- - Without-capabilities: If function library (Libcap) is found,Pure-FTPd will use his to provide security.This parameter accident tries this library to whether exist.If function library does not have regular job,Can arrive Ftp: / / Ftp.kernel.org/pub/linux/libs/security/linux-privs/ downloads.

- - Without-usernames: Never be in user and team name are outputted in method list,And acting with UIDs and GIDs.This will improve safety and performance,But can the user feels not quite friendly.


But can the user feels not quite friendly.- - Prefix=" change installs method,Acquiesce is "/usr/local/" .


Configure file detailed solution

Pure-ftpd.conf


ChrootEveryone YesChroot each user, be equal the DefaultRoot~ in Proftpd, can restrict an user in activity of a certain place,The security that enhances a server.Make the user cannot enter list of on one class through Cd command.
TrustedGID 50
# above is both should use together


BrokenClientsCompatibility No


MaxClientsNumber 50
The biggest link counts #


Daemonize Yes
#Fork In Background moves with guarding process means backstage


MaxClientsPerIP 5
Every Ip most link counts # ,Had better set bit.


VerboseLog No
The instruction that whether should # carry all Client Log comes down


DisplayDotFiles No
# shows the file of begin


AnonymousOnly No
Whether does # let only faceless login

NoAnonymous No
# is not open and faceless ascend


SyslogFacility Ftp
# should be right the log is done filter (Auth, authpriv, daemon, ftp, security, user, local*) can let a log record wanted information only


DontResolve Yes
# does not explain the Ip that the client carries reversely


MaxIdleTime 5
# is the biggest unused ? ?


#LDAPConfigFile /usr/local/pureftpd/etc/pureftpd-ldap.conf
# uses LDAP attestation,


MySQLConfigFile /usr/local/pureftpd/etc/pureftpd-mysql.conf
# uses MySQL attestation


#PGSQLConfigFile /usr/local/pureftpd/etc/pureftpd-pgsql.conf
# uses PGSQL attestation


#PureDB /ftp/etc/pureftpd.pdb
The DB of data of the person that # is used deposits a place [because I am,build DB with the ? of PureFTPD. Inherent this option]


#ExtAuth /var/run/ftpd.sock
Method of #pure-authd Socket (see README.Authentication-Modules please in detail)


#PAMAuthentication Yes
Attestation of # open PAM


#UnixAuthentication Yes
# if the ? of the attestation that you want to have simple Unix(/etc/passwd)

FortunesFile /usr/local/pureftpd/etc/.welcome
The greeting information file that # shows,You can found this file,Input a few characters,Next you restart your FTP serves,The discovery that can have an accident.


LimitRecursion 2000 8
#ls lists at most 3000 files. The deepest 8


AnonymousCanCreateDirs No
# faceless user can found catalog


MaxLoad 4
# exceeds 4 ? when System Load. The person that use will cannot download again


PassivePortRange 30000 50000
# passivity answers even reinforce limits


ForcePassiveIP 192.168.0.1
#


AnonymousRatio 1 10
#Anonymous join uploads / download rate


UserRatio 1 10
# user uploads / download rate (note:If use Ldap, mysql, pgsql, pam does not enable this function,Otherwise you are not had in the Ratio that in waiting, Ldap installs school)


AntiWarez No
The file that # uploads cannot be downloaded (Owner Is Ftp) . When Local Admin affirms


Bind 127.0.0.1, 8021
# should be bound calm with Ip/port,There are two FTP Server in your system such you among them a FTP is about to use other port.
# format -%26gt;127.0.0.1, if 21 writes Port to express All Ip only, port

AnonymousBandwidth 8
#Anonymous bandwidth,Unit KB/s


UserBandwidth 8
# user bandwidth,Unit KB/s


Umask 133:022
# uploads the Umask of the file. # uploads the Umask of the file.. : ::


MinUID 1000
More or less can # UID just login at least


AllowUserFXP Yes
# is raised do not support FXP


AllowAnonymousFXP No
#Anonymous is raised do not support FXP


ProhibitDotFilesWrite No
ProhibitDotFilesRead No
#(" . " ) the file of begin can be read / write, UNIX Like falls is in order to order the document of begin to conceal ability of A of - of file Ls to list
Generation is made below #Pureftpd Quota mode " .ftpquota " file.


AutoRename No
If have same document name,# uploads a file automatic and incognito (File.1, file.2. . . ..


AnonymousCantUpload No
# faceless user uploads a file


TrustedIP 10.1.1.1
# locks up IP.


LogPID
#Log file adds PID
AltLog Stats:/ftp/etc/log/pureftpd.log
#log deposits a place,Note a log to have a few kinds of commonly used patterns
Format of #clf similar Apache,Format of Stats UNIX Log,Format of W3C of W3c standard,The likelihood is HTML format


NoChmod Yes
# does not give Chmod the limits of authority of the instruction


KeepAllFiles No
The person that # is used but add is passed. But cannot ? divides a file


CreateHomeDir Yes
# if the Home of User is nonexistent build automatically (I set this for YES)


Quota 1000:10
#Quota %26lt; file is counted %26gt; : %26amp;Lt; capacity Megabytes %26gt; ,FTP limits 10M space,Can upload 1000 files (note:If use Ldap, mysql, pgsql, pam does not enable this function,Otherwise you are not had in the Quota that in waiting, Ldap installs school)


PIDFile /ftp/etc/log/pure-ftpd.pid
# records the PID file of Pure-ftpd


CallUploadScript Yes
# call UploadScript


MaxDiskUsage 99
# will stop to upload to how many ? when hard disk utilization rate


NoRename Yes
# user cannot name a file the name again

CustomerProof Yes
PerUserLimits 3:20
Every Zhang date can ascend #%26lt; at most: ANonymous can ascend %26gt; with ? at most

Pureftpd-mysql.conf

MYSQLServer 127.0.0.1
The IP of #MYSQL server


MYSQLPort 3306
#MYSQL carries catchword


MYSQLSocket /var/lib/mysql/mysql.sock
# uses connection of UNIX.sock this locality
Note:MYSQLServer and MYSQLSocket choose a kind can


MYSQLUser Ftp
Name of user of #MYSQLUser data


MYSQLPassword 123456
The password of #MYSQL database user


MYSQLDatabase Ftpusers
#FTP data database


MYSQLCrypt Md5
# password adds close means "cleartext" , "Crypt" , "Md5" And "password "


Proclaimed in writing of # Cleartext,Crypt,Md5, password is Backend Password(' Your-passwd ' ) function (the Password that MYSQL database uses () function)


MYSQLGetPW SELECT Password FROM Users WHERE User="\L "
Field of # password,The Password in watch of my use Users as password field


MYSQLGetUID SELECT Uid FROM Users WHERE User="\L "
Field of #UID user ID


MYSQLDefaultUID 1000
The UID with acquiescent # (note:How open this option,MYSQLGetUID will lose action)


MYSQLGetGID SELECT Gid FROM Users WHERE User="\L "
Field of #GID group ID


MYSQLDefaultGID 1000
The GID with acquiescent # (note:How open this option,MYSQLGetGID will lose action)


MYSQLGetDir SELECT Dir FROM Users WHERE User="\L "
#FTP user catalog if / Home/web/www-9812-net


MySQLGetQTAFS SELECT QuotaFiles FROM Users WHERE User="\L "
# disk limitation,The file counts limitation.Be like 1000,Allow an user to upload thousand 1 file


MySQLGetQTASZ SELECT QuotaSize FROM Users WHERE User="\L "
# disk limitation,FTP user space is restricted (the unit is M) ,Be like:100M

MySQLGetRatioUL SELECT ULRatio FROM Users WHERE User="\L "
MySQLGetRatioDL SELECT DLRatio FROM Users WHERE User="\L "
# uploads / download rate.MySQLGetRatioUL is compared to upload,MySQLGetRatioDL download is compared.Be like:1:5


MySQLGetBandwidthUL SELECT ULBandwidth FROM Users WHERE User="\L "
MySQLGetBandwidthDL SELECT DLBandwidth FROM Users WHERE User="\L "
Pass below # / download bandwidth (unit KB/s) .MySQLGetBandwidthUL uploads bandwidth,MySQLGetBandwidthDL downloads bandwidth.If upload 500KB/s, download 50KB/s


MySQLForceTildeExpansion 1
MySQLTransactions On

Configure file example

Pure-ftpd.conf configures a file

###############################################################################

# #

# Configuration File For Pure-ftpd Wrappers #

# #

###############################################################################

# If You Want To Run Pure-FTPd With This Configuration

# Instead Of Command-line Options, please Run The

# Following Command:

#

# /usr/local/pureftpd/sbin/pure-config.pl /usr/local/pureftpd/etc/pure-ftpd.conf

#

# RPM Binary Files Use Another Configuration File By Default:

# /etc/sysconfig/pure-ftpd

#

# Please Don't Forget To Have A Look At Documentation At

# Http://www.pureftpd.org/documentation.html For A Complete List Of

# Options.

# Cage In Every User In His Home Directory

ChrootEveryone Yes

# If The Previous Option Is Set To "no" , members Of The Following Group

# Won't Be Caged. Others Will Be. If You Don't Want Chroot()ing Anyone,

# Just Comment Out ChrootEveryone And TrustedGID.

# TrustedGID 100

# Turn On Compatibility Hacks For Broken Clients

BrokenClientsCompatibility No

# Maximum Number Of Simultaneous Users

MaxClientsNumber 50

# Fork In Background

Daemonize Yes

# Maximum Number Of Sim Clients With The Same IP Address

MaxClientsPerIP 8

# If You Want To Log All Client Commands, set This To "yes" .

# This Directive Can Be Duplicated To Also Log Server Responses.

VerboseLog No

# List Dot-files Even When The Client Doesn't Send "-a" .

DisplayDotFiles Yes

# Don't Allow Authenticated Users - Have A Public Anonymous FTP Only.

AnonymousOnly No

# Disallow Anonymous Connections. Only Allow Authenticated Users.

NoAnonymous No

# Syslog Facility (auth, authpriv, daemon, ftp, security, user, local* )

# The Default Facility Is "ftp" . "None" Disables Logging.

SyslogFacility Ftp

# Display Fortune Cookies

# FortunesFile /usr/share/fortune/zippy

# Don't Resolve Host Names In Log Files. Logs Are Less Verbose, but

# It Uses Less Bandwidth. Set This To "yes" On Very Busy Servers Or

# If You Don't Have A Working DNS.

DontResolve Yes

# Maximum Idle Time In Minutes (default = 15 Minutes)

MaxIdleTime 15

# LDAP Configuration File (see README.LDAP)

# LDAPConfigFile /etc/pureftpd-ldap.conf

LDAPConfigFile /usr/local/pureftpd/etc/pureftpd-ldap.conf

# MySQL Configuration File (see README.MySQL)

# MySQLConfigFile /etc/pureftpd-mysql.conf

MySQLConfigFile /usr/local/pureftpd/etc/pureftpd-mysql.conf

# Postgres Configuration File (see README.PGSQL)

# PGSQLConfigFile /etc/pureftpd-pgsql.conf

PGSQLConfigFile /usr/local/pureftpd/etc/pureftpd-pgsql.conf

# PureDB User Database (see README.Virtual-Users)

# PureDB /etc/pureftpd.pdb

PureDB /usr/local/pureftpd/etc/pureftpd.pdb

# Path To Pure-authd Socket (see README.Authentication-Modules)

# ExtAuth /var/run/ftpd.sock

# If You Want To Enable PAM Authentication, uncomment The Following Line

# PAMAuthentication Yes

# If You Want Simple Unix (/etc/passwd) Authentication, uncomment This

# UnixAuthentication Yes

# Please Note That LDAPConfigFile, mySQLConfigFile, PAMAuthentication And

# UnixAuthentication Can Be Used Only Once, but They Can Be Combined

# Together. For Instance, if You Use MySQLConfigFile, then UnixAuthentication,

# The SQL Server Will Be Asked. If The SQL Authentication Fails Because The

# User Wasn't Found, another Try # Will Be Done With /etc/passwd And

# /etc/shadow. If The SQL Authentication Fails Because The Password Was Wrong,

# The Authentication Chain Stops Here. Authentication Methods Are Chained In

# The Order They Are Given.

# 'ls' Recursion Limits. The First Argument Is The Maximum Number Of

# Files To Be Displayed. The Second One Is The Max Subdirectories Depth

LimitRecursion 2000 8

# Are Anonymous Users Allowed To Create New Directories?

AnonymousCanCreateDirs No

# If The System Is More Loaded Than The Following Value,

# Anonymous Users Aren't Allowed To Download.

MaxLoad 4

# Port Range For Passive Connections Replies. - For Firewalling.

# PassivePortRange 30000 50000

# Force An IP Address In PASV/EPSV/SPSV Replies. - For NAT.

# Symbolic Host Names Are Also Accepted For Gateways With Dynamic IP

# Addresses.

# ForcePassiveIP 192.168.0.1

# Upload/download Ratio For Anonymous Users.

# AnonymousRatio 1 10

# Upload/download Ratio For All Users.

# This Directive Superscedes The Previous One.

# UserRatio 1 10

# Disallow Downloading Of Files Owned By "ftp" , ie.

# Files That Were Uploaded But Not Validated By A Local Admin.

AntiWarez Yes

# IP Address/port To Listen To (default=all IP And Port 21) .

# Bind 127.0.0.1, 21

Bind 127.0.0.1, 8021

# Maximum Bandwidth For Anonymous Users In KB/s

# AnonymousBandwidth 8

# Maximum Bandwidth For *all* Users (including Anonymous) In KB/s

# Use AnonymousBandwidth *or* UserBandwidth, both Makes No Sense.

# UserBandwidth 8

# File Creation Mask. : .

# 177:077 If You Feel Paranoid.

Umask 133:022

# Minimum UID For An Authenticated User To Log In.

MinUID 100

# Allow FXP Transfers For Authenticated Users Only.

AllowUserFXP Yes

# Allow Anonymous FXP For Anonymous And Non-anonymous Users.

AllowAnonymousFXP No

# Users Can't Delete/write Files Beginning With A Dot (' . ' )

# Even If They Own Them. If TrustedGID Is Enabled, this Group

# Will Have Access To Dot-files, though.

ProhibitDotFilesWrite No

# Prohibit *reading* Of Files Beginning With A Dot (.history, .ssh. . . ..

ProhibitDotFilesRead No

# Never Overwrite Files. When A File Whoose Name Already Exist Is Uploaded,

# It Get Automatically Renamed To File.1, file.2, file.3, . . .

AutoRename No

# Disallow Anonymous Users To Upload New Files (no = Upload Is Allowed)

AnonymousCantUpload No

# Only Connections To This Specific IP Address Are Allowed To Be

# Non-anonymous. You Can Use This Directive To Open Several Public IPs For

# Anonymous FTP, and Keep A Private Firewalled IP For Remote Administration.

# You Can Also Only Allow A Non-routable Local IP (like 10.x.x.x) To

# Authenticate, and Keep A Public Anon-only FTP Server On Another IP.

#TrustedIP 10.1.1.1

# If You Want To Add The PID To Every Logged Line, uncomment The Following

# Line.

#LogPID Yes

# Create An Additional Log File With Transfers Logged In A Apache-like Format:

# Fw.c9x.org - Jedi [13/Dec/1975:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338

# This Log File Can Then Be Processed By Www Traffic Analyzers.

# AltLog Clf:/var/log/pureftpd.log

# Create An Additional Log File With Transfers Logged In A Format Optimized

# For Statistic Reports.

# AltLog Stats:/var/log/pureftpd.log

#AltLog Stats:/var/log/pureftpd.log

# Create An Additional Log File With Transfers Logged In The Standard W3C

# Format (compatible With Most Commercial Log Analyzers)

# AltLog W3c:/var/log/pureftpd.log

# Disallow The CHMOD Command. Users Can't Change Perms Of Their Files.

#NoChmod Yes

# Allow Users To Resume And Upload Files, but *NOT* To Delete Them.

#KeepAllFiles Yes

# Automatically Create Home Directories If They Are Missing

#CreateHomeDir Yes

# Enable Virtual Quotas. The First Number Is The Max Number Of Files.

# The Second Number Is The Max Size Of Megabytes.

# So 1000:10 Limits Every User To 1000 Files And 10 Mb.

#Quota 1000:10

# If Your Pure-ftpd Has Been Compiled With Standalone Support, you Can Change

# The Location Of The Pid File. The Default Is /var/run/pure-ftpd.pid

#PIDFile /var/run/pure-ftpd.pid

# If Your Pure-ftpd Has Been Compiled With Pure-uploadscript Support,

# This Will Make Pure-ftpd Write Info About New Uploads To

# /var/run/pure-ftpd.upload.pipe So Pure-uploadscript Can Read It And

# Spawn A Script To Handle The Upload.

#CallUploadScript Yes

# This Option Is Useful With Servers Where Anonymous Upload Is

# Allowed. As /var/ftp Is In /var, it Save Some Space And Protect

# The Log Files. When The Partition Is More That X Percent Full,

# New Uploads Are Disallowed.

MaxDiskUsage 99

# Set To 'yes' If You Don't Want Your Users To Rename Files.

#NoRename Yes

# Be 'customer Proof' : Workaround Against Common Customer Mistakes Like

# 'chmod 0 Public_html' , that Are Valid, but That Could Cause Ignorant

# Customers To Lock Their Files, and Then Keep Your Technical Support Busy

# With Silly Issues. If You're Sure All Your Users Have Some Basic Unix

# Knowledge, this Feature Is Useless. If You're A Hosting Service, enable It.

CustomerProof Yes

# Per-user Concurrency Limits. It Will Only Work If The FTP Server Has

# Been Compiled With- - With-peruserlimits (and This Is The Case On

# Most Binary Distributions) .

# The Format Is: :

# For Instance, 3:20 Means That The Same Authenticated User Can Have 3 Active

# Sessions Max. And There Are 20 Anonymous Sessions Max.

# PerUserLimits 3:20

Pureftpd-mysql.conf configures a file


###############################################################################

# #

# Sample Pure-FTPd Mysql Configuration File. #

# See README.MySQL For Explanations. #

# #

###############################################################################

# 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 /var/lib/mysql/mysql.sock

# Mandatory: User To Bind The Server As.

MYSQLUser Pureftpd

# Mandatory: User Password. You Must Have A Password.

MYSQLPassword QKiscCbwbXAkWp.

# Mandatory: Database To Open.

MYSQLDatabase Pureftpd

# 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 Leartext

MYSQLCrypt Crypt

# 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 "

# Query To Execute In Order To Fetch The System User Name Or Uid

MYSQLGetUID SELECT Uid FROM Users WHERE User="\L "

# 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 "

# 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 "

# 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 "

# 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 "

# Optional: Ratios. The Server Has To Be Compiled With Ratio Support.

# MySQLGetRatioUL SELECT ULRatio FROM Users WHERE User="\L "

# MySQLGetRatioDL SELECT DLRatio FROM Users WHERE User="\L "

# 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 "

MySQLGetBandwidthDL SELECT DLBandwidth FROM Users WHERE User="\L "

# 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 (%26lt;3.23.x) MySQL Versions.

# MySQLTransactions On

#################################### builds ############################## of Ftp user group

Pw Groupadd Ftpusers -g 2000Pw Useradd Ftp -u 2000 -g Ftpusers -s /sbin/nologin


################# saves the following code text file and name Script.mysql####################
INSERT INTO Mysql.user (Host, user, password, select_priv, insert_priv,
Update_priv, delete_priv, create_priv, drop_priv, reload_priv,
Shutdown_priv, process_priv, file_priv, grant_priv, references_priv,
Index_priv, alter_priv) VALUES
('localhost' , 'ftp' , PASSWORD('password') , 'Y' , 'Y' , 'Y' , 'Y' , 'N' , 'N' , 'N' , 'N' ,
'N' , 'N' , 'N' , 'N' , 'N' , 'N');

FLUSH PRIVILEGES;

CREATE DATABASE Ftpusers;

USE Ftpusers;

CREATE TABLE Admin (
Username Varchar(35) NOT NULL Default '' ,
Password Char(32) Binary NOT NULL Default '' ,
PRIMARY KEY (Username)
) TYPE=MyISAM;

INSERT INTO Admin VALUES ('Administrator' , MD5('password'));

CREATE TABLE Users (
User Char(16) NOT NULL Default '' ,
Password Char(32) Binary NOT NULL Default '' ,
Uid Int(11) NOT NULL Default '2000' ,
Gid Int(11) NOT NULL Default '2000' ,
Dir Char(128) NOT NULL Default '' ,
QuotaFiles Int(10) NOT NULL Default '500' ,
QuotaSize Int(10) NOT NULL Default '30' ,
ULBandwidth Int(10) NOT NULL Default '80' ,
DLBandwidth Int(10) NOT NULL Default '80' , Status Enum('0' , '1') NOT NULL Default '1' , Ipaccess Varchar(15) NOT NULL Default '*' , Comment Tinytext NOT NULL,
PRIMARY KEY (User) ,
UNIQUE KEY User (User)
) TYPE=MyISAM;

INSERT INTO `users` VALUES ('test1' , MD5('123456') , 2001, 2000, '/home/test1' , 500, 30, 80, 5, 1, '*' , '*');
##############################################################################################################################################################


################################# adds ############################# of Ftp user databaseUploadScript.mysqlMysql -u Root -ppassword%26lt;Script.mysql


################################# starts Pure-ftpd##################################
/ Usr/local/sbin/pure-config.pl /usr/local/etc/pure-ftpd.conf
Also can pass
/ Usr/local/etc/rc.d/pure-ftpd.sh Start

Hint information proves Pure-ftpd has worked
Running: / Usr/local/sbin/pure-ftpd -A -c50 -B -C8 -D -E -fftp -H -I15
- Lmysql:/usr/local/etc/pureftpd-mysql.conf -L2000:8- M4 -Q1:10 -s -U133:022
- U100 -Ow3c:/var/log/pureftpd.log -j -k99 -Z


################################# checks Pureftp####################################Ftp 192.168.0.205
Connected To 192.168.0.205.
220---------- welcomes to Pure-FTPd [TLS]----------
220- you are 1 the person that use,Can amount to 50 at most join
220- this locality time is 13:1 now7.Server port:21.
220- this is private system - not open and faceless login
This lead plane also welcomes 220- the join of IPv6
220 is in 15 does not have an activity inside minute,You are met line.
Name (192.168.0.205:cHb) :
Input user name, password

################################## installs ############################## of Ftp management interfaceUploadChinaPHP_ManagerEe Config.php

Require 'language.php';

$LANG = $ZH_CN; //Language (Options Are $DUTCH, $ENGLISH, $PT_BR, $RUSSIAN
/ / $SPANISH, $COREAN, $FRENCH, $HUNGARIAN, $GERMAN
/ / $TURKISH, $DANISH, $NORWEGIAN Or $ZH_CN)

$LocationImages = "images"; // Location Of Images

$DBHost = "localhost"; // Ip-adres Of MySQL Server
/ / (Dont Change This If You Are Using The Default Database)

$DBLogin = "ftp"; // Username Of MySQL User

$DBPassword = "password"; // Password Of MySQL User

$DBDatabase = "ftpusers"; // Name Of Database

$FTPaddress = "192.168.0.205:21"; // Domain Name Or Ip-address Of Your Ftp Server

$DEFUserID = "2000"; // Nobody // Default User Id Of Virtual Ftp User.

$DEFGroupID = "2000"; // Guest // Default Group Is Of Virtual Ftp User.

############################## installs the ############################ of fictitious lead plane of Ftp managementEe /usr/local/etc/apache/httpd.conf

Add


DocumentRoot "/home/chb/ftp "
ServerName Www.chb.com
Allow From All
Options +Indexes


################################### increases Ftp to start a ###############################Ee /etc/rc.conf
AddPureftpd_enable="YES "

Qmail server is installed

################################### downloads software to wrap ##################################
Part 1 - Download The Software(http://www.qmailrocks.org/downloads/qmailrocks.tar.gz)

Mkdir /downloadsCd /downloadsTar Zxvf Qmailrocks.tar.gz


################################## installs ############################## of Qmail main program
Part 2 - Installing Qmail Itself


/ Downloads/qmailrocks/scripts/install/qmr_install_freebsd-s1.script

############qmr_install_freebsd-s1.script content ##############
# ! / Bin/sh

#An Automation Script To Start The Installation Of Qmail, ucspi-tcp And Daemontools
#Specially Formulated For Redhat, fedora, RHEL And Whitebox Linux. :)

Echo "Creating Initial Qmail Directories. . . .. EchoSleep 2

Cd /downloads/qmailrocks

Mkdir -p /var/qmail

Mkdir /usr/src/qmail

Echo "Done! Echo "Done!! EchoSleep 2Echo "Creating All Needed Users And Groups. . . .. EchoSleep 2

#######
#Script To Add Users And Groups For FreeBSD

#Add All Need Qmail Users And GroupsPw Groupadd NofilesPw Useradd Alias -g Nofiles -d /var/qmail/alias -s /sbin/nologinPw Useradd Qmaild -g Nofiles -d /var/qmail -s /sbin/nologinPw Useradd Qmaill -g Nofiles -d /var/qmail -s /sbin/nologinPw Useradd Qmailp -g Nofiles -d /var/qmail -s /sbin/nologinPw Groupadd QmailPw Useradd Qmailq -g Qmail -d /var/qmail -s /sbin/nologinPw Useradd Qmailr -g Qmail -d /var/qmail -s /sbin/nologinPw Useradd Qmails -g Qmail -d /var/qmail -s /sbin/nologin
#Add Vpopmail Users/groupsPw Groupadd VchkpwPw Useradd Vpopmail -g Vchkpw -m -d /usr/home/vpopmail -s /sbin/nologin

#######

Echo "Done! Echo "Done!! EchoSleep 2Echo "Unpacking Qmail, ucspi-tcp And Daemontools. . . .. EchoSleep 2

Cd /usr/src/qmail

Tar Zxvf /downloads/qmailrocks/qmail-1.03.tar.gz

Tar Zxvf /downloads/qmailrocks/ucspi-tcp-0.88.tar.gz

Mkdir -p /package

Chmod 1755 /package

Cd /package

Tar Zxvf /downloads/qmailrocks/daemontools-0.76.tar.gz

Echo "Done! Echo "Done!! EchoSleep 2Echo "Next, we Setup Special Logging Directories. . . .. EchoSleep 2

Mkdir /var/log/qmail

Cd /var/log/qmail

Mkdir Qmail-send Qmail-smtpd Qmail-pop3d

Chown -R Qmaill:wHeel /var/log/qmail

Chmod -R 750 /var/log/qmail

Echo "Done! Echo "Done!! EchoSleep 2Echo "And Set Up The Supervise Script Directories. . . .. EchoSleep 2

Mkdir /var/qmail/supervise

Cd /var/qmail/supervise

Mkdir -p Qmail-smtpd/log Qmail-send/log Qmail-pop3d/log

Chmod +t Qmail-smtpd Qmail-send Qmail-pop3d

Echo "Setting Conf-split And Conf-spawn "EchoSleep 2

Echo 211%26gt;/ Usr/src/qmail/qmail-1.03/conf-split

Echo 255%26gt;/ Usr/src/qmail/qmail-1.03/conf-spawn

Echo "All Steps Completed! Echo "All Steps Completed!! EchoSleep 2


######################### of ######################### Qmr_install_freebsd-s1.script content
###############################################################################

/ Downloads/qmailrocks/scripts/util/qmail_patches.script


############## of ############### Qmail_patches.script content
# ! / Bin/sh

#An Automation Script To Start The Installation Of Qmail, ucspi-tcp And Daemontools
#Specially Formulated For Redhat, fedora, RHEL And Whitebox Linux. :)

Echo "Creating Initial Qmail Directories. . . .. EchoSleep 2

Cd /downloads/qmailrocks

Mkdir -p /var/qmail

Mkdir /usr/src/qmail

Echo "Done! Echo "Done!! EchoSleep 2Echo "Creating All Needed Users And Groups. . . .. EchoSleep 2

#######
#Script To Add Users And Groups For FreeBSD

#Add All Need Qmail Users And GroupsPw Groupadd NofilesPw Useradd Alias -g Nofiles -d /var/qmail/alias -s /sbin/nologinPw Useradd Qmaild -g Nofiles -d /var/qmail -s /sbin/nologinPw Useradd Qmaill -g Nofiles -d /var/qmail -s /sbin/nologinPw Useradd Qmailp -g Nofiles -d /var/qmail -s /sbin/nologinPw Groupadd QmailPw Useradd Qmailq -g Qmail -d /var/qmail -s /sbin/nologinPw Useradd Qmailr -g Qmail -d /var/qmail -s /sbin/nologinPw Useradd Qmails -g Qmail -d /var/qmail -s /sbin/nologin
#Add Vpopmail Users/groupsPw Groupadd VchkpwPw Useradd Vpopmail -g Vchkpw -m -d /usr/home/vpopmail -s /sbin/nologin

#######

Echo "Done! Echo "Done!! EchoSleep 2Echo "Unpacking Qmail, ucspi-tcp And Daemontools. . . .. EchoSleep 2

Cd /usr/src/qmail

Tar Zxvf /downloads/qmailrocks/qmail-1.03.tar.gz

Tar Zxvf /downloads/qmailrocks/ucspi-tcp-0.88.tar.gz

Mkdir -p /package

Chmod 1755 /package

Cd /package

Tar Zxvf /downloads/qmailrocks/daemontools-0.76.tar.gz

Echo "Done! Echo "Done!! EchoSleep 2Echo "Next, we Setup Special Logging Directories. . . .. EchoSleep 2

Mkdir /var/log/qmail

Cd /var/log/qmail

Mkdir Qmail-send Qmail-smtpd Qmail-pop3d

Chown -R Qmaill:wHeel /var/log/qmail

Chmod -R 750 /var/log/qmail

Echo "Done! Echo "Done!! EchoSleep 2Echo "And Set Up The Supervise Script Directories. . . .. EchoSleep 2

Mkdir /var/qmail/supervise

Cd /var/qmail/supervise

Mkdir -p Qmail-smtpd/log Qmail-send/log Qmail-pop3d/log

Chmod +t Qmail-smtpd Qmail-send Qmail-pop3d

Echo "Setting Conf-split And Conf-spawn "EchoSleep 2

Echo 211%26gt;/ Usr/src/qmail/qmail-1.03/conf-split

Echo 255%26gt;/ Usr/src/qmail/qmail-1.03/conf-spawn

Echo "All Steps Completed! Echo "All Steps Completed!! EchoSleep 2


########################### of ############################## Qmail_patches.script content
###############################################################################

Cd /usr/src/qmail/qmail-1.03

Make ManMake Setup Check
. / Config-fast Mail.tjhaina.net

/ Usr/ports/mail/qmail
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Cd /usr/src/qmail/ucspi-tcp-0.88/MakeMake Setup Check

/ Usr/ports/sysutils/ucspi-tcp
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Cd /package/admin/daemontools-0.76Package/installReboot

/ Usr/ports/sysutils/daemontools
################################Part 3 - EZmlm##################################
Part 3 - EZmlmCd /downloads/qmailrocks/Tar Zxvf Ezmlm-0.53-idx-0.41.tar.gzCd Ezmlm-0.53-idx-0.41MakeMake Setup


/ Usr/ports/mail/ezmlm
############################Part 4 - Qmail-Autoresponder ##########################
Part 4 - Qmail-Autoresponder
#pkg_add -r Qmail-autoresponderCd /downloads/qmailrocksPkg_add Qmail-autoresponder-0.96.1.tbz


/ Usr/ports/mail/qmail-autoresponder
################################art 5 - Vpopmail#################################
Part 5 - Vpopmail(I Would Like To Install Vpopmail With MySQL Integration)Mkdir -p ~vpopmail/etcMysql -u Root -p
CREATE DATABASE Vpopmail;
GRANT Select, insert, update, delete, create, drop ON Vpopmail. * TO Vpopmailuser@localhost IDENTIFIED BY 'password';QuitMysql -u Vpopmailuser -pQuitUploadIGENUS.mysqlMysql -u Root -p%26lt;/ Home/chb/iGENUS.mysql
%%%%%%%%%%%%%%%%%%iGENUS.mysql%%%%%%%%%%%%%%%%%%%%%
DROP DATABASE Vpopmail;
CREATE DATABASE Vpopmail;
USE Vpopmail;

CREATE TABLE `address` (
`id` Int(11) Unsigned NOT NULL Auto_increment,
`pw_id` Int(5) NOT NULL Default '0' ,
`name` Varchar(64) NOT NULL Default '' ,
`email` Varchar(128) NOT NULL Default '' ,
UNIQUE KEY `id` (`id`) ,
KEY `pw_id` (`pw_id` )
) TYPE=MyISAM PACK_KEYS=1;

CREATE TABLE `admin` (
`id` Int(10) Unsigned NOT NULL Auto_increment,
`site_id` Int(10) Unsigned NOT NULL Default '0' ,
`domain` Varchar(128) NOT NULL Default '' ,
`quota` Smallint(5) Unsigned NOT NULL Default '0' ,
`total` Smallint(5) Unsigned NOT NULL Default '0' ,
`createtime` Timestamp(14) NOT NULL,
`login` Char(1) NOT NULL Default '' ,
`cur_total` Smallint(5) NOT NULL Default '0' ,
`cur_quota` Smallint(5) NOT NULL Default '0' ,
`gid` Varchar(11) NOT NULL Default '' ,
`expiration_time` Timestamp(14) NOT NULL,
`flag` Int(10) Unsigned NOT NULL Default '0' ,
`maxmsg` Int(10) Unsigned NOT NULL Default '0' ,
PRIMARY KEY (`id`) ,
UNIQUE KEY `domain` (`domain` )
) TYPE=MyISAM PACK_KEYS=1;

CREATE TABLE `card` (
`id` Int(5) Unsigned NOT NULL Auto_increment,
`pw_id` Int(5) Unsigned NOT NULL Default '0' ,
`LinkMan` Varchar(64) NOT NULL Default '' ,
`CompanyName` Varchar(100) NOT NULL Default '' ,
`address` Varchar(255) NOT NULL Default '' ,
`Position` Varchar(32) NOT NULL Default '' ,
`PhoneNumber` Varchar(16) NOT NULL Default '' ,
`Mobile` Varchar(12) NOT NULL Default '' ,
`Email` Varchar(128) NOT NULL Default '' ,
`Partaker` Varchar(32) NOT NULL Default '' ,
`Memo` Varchar(255) NOT NULL Default '' ,
PRIMARY KEY (`id` )
) TYPE=MyISAM;

CREATE TABLE `lastauth` (
`user` Char(32) NOT NULL Default '' ,
`domain` Char(64) NOT NULL Default '' ,
`remote_ip` Char(18) NOT NULL Default '' ,
`timestamp` Bigint(20) NOT NULL Default '0' ,
PRIMARY KEY (`user` , `domain` )
) TYPE=MyISAM;

CREATE TABLE `logs` (
`pw_id` Int(5) Default '0' ,
`ip` Varchar(15) NOT NULL Default '' ,
`action` Varchar(15) NOT NULL Default '' ,
`time` Datetime Default NULL,
`content` Varchar(64) NOT NULL Default '' ,
`email` Varchar(128) NOT NULL Default ''
) TYPE=MyISAM;

CREATE TABLE `message` (
`id` Int(5) Unsigned NOT NULL Auto_increment,
`title` Varchar(255) NOT NULL Default '' ,
`body` Text NOT NULL,
`createtime` Datetime NOT NULL Default '0000-00-00 00:00:00' ,
`updatetime` Datetime NOT NULL Default '0000-00-00 00:00:00' ,
`pw_domain` Varchar(64) NOT NULL Default '' ,
UNIQUE KEY `id` (`id` )
) TYPE=MyISAM;

CREATE TABLE `personal` (
`id` Int(11) Unsigned NOT NULL Auto_increment,
`pw_id` Int(5) NOT NULL Default '0' ,
`truename` Varchar(10) NOT NULL Default '' ,
`fax` Varchar(20) NOT NULL Default '' ,
`telephone` Varchar(15) NOT NULL Default '' ,
`sex` Int(1) NOT NULL Default '0' ,
`year` Int(4) NOT NULL Default '0' ,
`MONTH` Int(2) NOT NULL Default '0' ,
`DAY` Int(2) NOT NULL Default '0' ,
`education` Varchar(4) NOT NULL Default '' ,
`marital` Int(1) NOT NULL Default '0' ,
`occupation` Varchar(15) NOT NULL Default '' ,
`companyname` Varchar(30) NOT NULL Default '' ,
`province` Varchar(6) NOT NULL Default '' ,
PRIMARY KEY (`id` )
) TYPE=MyISAM PACK_KEYS=1;

CREATE TABLE `scheduler` (
`id` Int(11) Unsigned NOT NULL Auto_increment,
`begin_time` Int(11) Unsigned Default NULL,
`end_time` Int(11) Unsigned Default NULL,
`title` Varchar(255) NOT NULL Default '' ,
`body` Varchar(255) NOT NULL Default '' ,
`pw_id` Int(11) Unsigned NOT NULL Default '0' ,
PRIMARY KEY (`id` )
) TYPE=MyISAM;

CREATE TABLE `stow` (
`id` Int(5) Unsigned NOT NULL Auto_increment,
`pw_id` Int(5) Unsigned NOT NULL Default '0' ,
`Name` Varchar(128) NOT NULL Default '' ,
`http` Varchar(255) NOT NULL Default 'http://' ,
`memo` Varchar(255) NOT NULL Default '' ,
PRIMARY KEY (`id` )
) TYPE=MyISAM;

Create Table Vpopmail (Pw_id Int(5) Unsigned NOT NULL Auto_increment, Pw_name Varchar(32) NOT NULL Default '' , Pw_domain Varchar(64) NOT NULL Default '' , Pw_passwd Varchar(40) NOT NULL Default '' , Pw_uid Int(11) Default NULL, Pw_gid Int(11) Default NULL, Pw_gecos Varchar(64) Default NULL, Pw_dir Varchar(160) Default NULL, Pw_shell Varchar(20) Default NULL, Pw_clear_passwd Varchar(16) Default NULL, Createtime Timestamp(14) NOT NULL,
PRIMARY KEY (pw_id) ,
KEY Pw_name (pw_name, pw_domain) )
TYPE=MyISAM PACK_KEYS=1

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Cd /downloads/qmailrocksTar Zxvf Vpopmail-5.4.9.tar.gzCd Vpopmail-5.4.9
. / Configure \
- - Disable-roaming-users \
- - Enable-logging=p \
- - Disable-ip-alias-domains \
- - Disable-passwd \
- - Enable-clear-passwd \
- - Disable-domain-quotas \
- - Enable-auth-module=mysql \
- - Enable-many-domains \
- - Enable-auth-logging \
- - Enable-sql-logging \
- - Enable-valias \
- - Disable-mysql-limitsMakeMake Install-strip

Chown Vpopmail:vChkpw ~vpopmail/etc

Echo "localhost | 0 | Vpopmailuser | Password | Vpopmail "%26gt;~vpopmail/etc/vpopmail.mysql

Chown Vpopmail:vChkpw ~vpopmail/etc/vpopmail.mysql

Chmod 640 ~vpopmail/etc/vpopmail.mysql

/ Home/vpopmail/bin/vadddomain your domain name
Clew is answered to input the password of region manager later
/ @ of user of Home/vpopmail/bin/vadduser mail your domain name
Clew is answered to input the password of mail user later


/ Usr/ports/mail/vpopmail
#############################Part 6 - Vqadmin###################################
Part 6 - VqadminCd /downloads/qmailrocksTar Zxvf Vqadmin-2.3.6.tar.gzCd Vqadmin-2.3.6
. / Configure \
- - Enable-cgibindir=/usr/local/www/cgi-bin \
- - Enable-htmldir=/usr/local/www/html

MakeMake Install-strip


Now You Will Need To Add The Following To Your Server's Apache Configuration File (usually Called Httpd.conf)

Ee /usr/local/etc/apache/httpd.conf
Add in fine

Deny From All
Options ExecCGI
AllowOverride AuthConfig
Order Deny, allow

Cd /usr/local/www/cgi-bin/vqadminEe.htaccess
AuthType Basic
AuthUserFile /usr/local/etc/apache/conf/vqadmin.passwd
AuthName VQadminRequire Valid-userSatisfy Any

Mkdir /usr/local/etc/apache/conf

Chown Www.htaccessChmod 644.htaccessHtpasswd -bc /usr/local/etc/apache/conf/vqadmin.passwd Admin PasswordChmod 644 /usr/local/etc/apache/conf/vqadmin.passwdApachectl StopApachectl StartHttp://192.168.0.205/cgi-bin/vqadmin/vqadmin.cgi


/ Usr/ports/mail/vqadmin
##############################Part 7 - Maildrop###################################
Part 7 - MaildropCd /downloads/qmailrocksTar Zxvf Maildrop-1.6.3.tar.gzCd Maildrop-1.6.3
. / Configure \
- - Prefix=/usr/local \
- - Exec-prefix=/usr/local \
- - Enable-maildrop-uid=root \
- - Enable-maildrop-gid=vchkpw \
- - Enable-maildirquotaMakeMake Install-stripMake Install-man

/ Usr/ports/mail/maildrop
##############################Part 8 - Qmailadmin#############################
Part 8 - QmailadminCd /downloads/qmailrocksTar Zxvf Qmailadmin-1.2.3.tar.gzCd Qmailadmin-1.2.3
. / Configure \
- - Enable-cgibindir=/usr/local/www/cgi-bin \
- - Enable-htmldir=/usr/local/www/html/directory \
- - Enable-autoresponder-path=/usr/local/bin/qmail-autoresponder

MakeMake Install-strip

/ Usr/ports/mail/qmailadmin
####################################Part 9 - Finalizing Qmail#######################
Part 9 - Finalizing Qmail
/ Downloads/qmailrocks/scripts/finalize/freebsd/finalize_freebsd.script

################# Finalize_freebsd.script##############
# ! / Bin/sh

Echo "This Scripts Will Perform 3 Functions:\N

1.Copy All Supervise Scripts To Their Proper Locations. \n

2.Copy The Qmail Rc And Qmailctl Scripts To Their Proper Locations And Create Needed Symlinks. \n

3.Set All Needed Permisions On All Supervise Scripts. \n "

EchoEcho "Press ENTER To Proceeed "Read

EchoSleep 2

Echo "Copying Supervise Scripts To Their Correct Locations. . . .. EchoSleep 2

Cp /downloads/qmailrocks/scripts/finalize/freebsd/pop3d_run /var/qmail/supervise/qmail-pop3d/run

Cp /downloads/qmailrocks/scripts/finalize/freebsd/pop3d_log /var/qmail/supervise/qmail-pop3d/log/run

Cp /downloads/qmailrocks/scripts/finalize/freebsd/smtpd_run /var/qmail/supervise/qmail-smtpd/run

Cp /downloads/qmailrocks/scripts/finalize/freebsd/smtpd_log /var/qmail/supervise/qmail-smtpd/log/run

Cp /downloads/qmailrocks/scripts/finalize/freebsd/send_run /var/qmail/supervise/qmail-send/run

Cp /downloads/qmailrocks/scripts/finalize/freebsd/send_log /var/qmail/supervise/qmail-send/log/run

Echo Done! EchoSleep 2

Echo "Copying Rc And Qmailctl Scripts To Proper Locations. . . .. EchoSleep 2

Cp /downloads/qmailrocks/scripts/finalize/rc /var/qmail/

Cp /downloads/qmailrocks/scripts/finalize/qmailctl /var/qmail/bin/

Echo Done! EchoSleep 2

Echo "Setting Needed Permisions. . . .. EchoSleep 2

Chmod 755 /var/qmail/rc /var/qmail/bin/qmailctl

Chmod 751 /var/qmail/supervise/qmail-pop3d/runChmod 751 /var/qmail/supervise/qmail-pop3d/log/run

Chmod 751 /var/qmail/supervise/qmail-smtpd/runChmod 751 /var/qmail/supervise/qmail-smtpd/log/run

Chmod 751 /var/qmail/supervise/qmail-send/runChmod 751 /var/qmail/supervise/qmail-send/log/run

Echo. / Maildir%26gt;/ Var/qmail/control/defaultdelivery

Echo 255%26gt;/ Var/qmail/control/concurrencyremote

Chmod 644 /var/qmail/control/concurrencyremote

Echo 30%26gt;/ Var/qmail/control/concurrencyincoming

Chmod 644 /var/qmail/control/concurrencyincoming

Ln -s /var/qmail/bin/qmailctl /usr/bin

Ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /var/qmail/supervise/qmail-pop3d /service

Echo "Done! Echo "Done!! EchoSleep 2

Echo "Script Complete! Echo "Script Complete!! Echo

################# Finalize_freebsd.script##############
#######################################################Ee /var/qmail/supervise/qmail-pop3d/run
Find "mail.example.com" And Change It To Your Server's Hostname. For Example: Mail.mydomain.com.

Ee /var/qmail/supervise/qmail-smtpd/run
Find "mail.example.com" And Change It To Your Server's Hostname. For Example: Mail.mydomain.com

Qmailctl StopEcho '127. : ALlow, RELAYCLIENT=%26quot;%26quot;' %26gt;%26gt;/ Etc/tcp.smtp

Qmailctl Cdb

Echo B.s.d@163.com%26gt;/ Var/qmail/alias/.qmail-rootWhere "some_address" Is The System User Or Email Address You Want These Addresses Aliased To.

Echo B.s.d@163.com%26gt;/ Var/qmail/alias/.qmail-postmasterWhere "some_address" Is The System User Or Email Address You Want These Addresses Aliased To.

Echo B.s.d@163.com%26gt;/ Var/qmail/alias/.qmail-mailer-daemonWhere "some_address" Is The System User Or Email Address You Want These Addresses Aliased To.

Ln -s /var/qmail/alias/.qmail-root /var/qmail/alias/.qmail-anonymousChmod 644 /var/qmail/alias/.qmail*


##########################Part 10 - Uninstalling Sendmail###########################
Part 10 - Uninstalling SendmailKillall SendmailMv /usr/sbin/sendmail /usr/sbin/sendmail.oldMv /usr/lib/sendmail /usr/lib/sendmail.old(this May Not Apply If There Is No Sendmail Link Or Binary In This Location)Chmod 0 /usr/lib/sendmail.old /usr/sbin/sendmail.old

Now We Will Need To Instruct FreeBSD Not To Attempt To Start Sendmail Upon Startup. This Is Done By Make The Following

Modification To The /etc/rc.conf File:

Change Sendmail_enable="YES" To Sendmail_enable="NONE "Ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
#ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

########################Part 11 - Starting Up Qmail#################################


Part 11 - Starting Up Qmail
/ Downloads/qmailrocks/scripts/util/qmr_inst_check
################### of ################# Qmr_inst_check content
# ! / Bin/sh

# Qmailrocks, 2003-12-05
# I've Modified Dave Sill's Script Slightly To Accomodate
# The Variations Between His Qmail Installation And The
# Qmailrocks.org Installation. The Qmailrocks Version
# Of This Script Takes Into Account The Slightly Different
# Loggind Directory Setup And A Few Permissions Differences.
# Http://www.qmailrocks.org/downloads/scripts/qmr_inst_check

# Dave Sill, 2003-11-10
# Http://lifewithqmail.org/inst_check

# Set To N If You're Not Running A Pop3 Server, y If You Are
CHECKPOP=y
CHECKSEND=y
QMHOME=/var/qmail
LBIN=/usr/local/bin

OK=1

If [$# -eq 1]; ThenIf ["$1" = "-v" ]; Then
VERB=yElse
VERB=nFiFi

If [! - D $QMHOME]; ThenEcho " ! Couldn't Find Qmail's Home Directory, $QMHOME! $QMHOME!! ElseIf ["$VERB" = Y]; ThenEcho "$QMHOME Exists "FiFor I In Alias Bin Boot Control Doc Man Queue Supervise Users; DoIf [! - D $QMHOME/$i]; ThenEcho " ! Couldn't Find $QMHOME/$i! Couldn't Find $QMHOME/$i!!
OK=0Elif ["$VERB" = Y]; ThenEcho "$QMHOME/$i Exists "FiDone

If [! - F $QMHOME/rc]; ThenEcho " ! $QMHOME/rc Is Missing "
OK=0Elif [! - X $QMHOME/rc]; ThenEcho " ! $QMHOME/rc Is Not Executable "Echo " . . .try: Chmod 755 $QMHOME/rc "
OK=0Elif [`head -1 $QMHOME/rc | Cat -vet` ! = '# ! / Bin/sh$' ]; ThenEcho " ! $QMHOME/rc Has Bad Magic Cookie "Echo " . . .try: Dos2unix $QMHOME/rc "
OK=0Elif ["$VERB" = Y]; ThenEcho "$QMHOME/rc Is Executable And Has A Valid Magic Cookie "FiFi

For I In Alias Qmaild Qmaill Qmailp Qmailq Qmailr Qmails; DoGrep "^$i:" / Etc/passwd %26gt;/dev/nullIf [$ ? - Ne 0]; ThenEcho " ! Couldn't Find $i User In /etc/passwd "
OK=0Elif ["$VERB" = Y]; ThenEcho "$i User Exists "FiDone

For I In Qmail Nofiles; DoGrep "^$i:" / Etc/group %26gt;/dev/nullIf [$ ? - Ne 0]; ThenEcho " ! Couldn't Find $i Group In /etc/group "
OK=0Elif ["$VERB" = Y]; ThenEcho "$i Group Exists "FiDone

For I In Tcprules Tcpserver; DoIf [! - X $LBIN/$i]; ThenEcho " ! Couldn't Find $LBIN/$i From Ucspi-tcp "
OK=0Elif ["$VERB" = Y]; ThenEcho "$i From Ucspi-tcp Is Installed "FiDone

For I In Multilog Softlimit Setuidgid Supervise Svok Svscan Tai64nlocal; DoIf [! - X $LBIN/$i]; ThenEcho " ! Couldn't Find $LBIN/$i From Daemontools "
OK=0Elif ["$VERB" = Y]; ThenEcho "$i From Daemontools Is Installed "FiDone

If [! - D /service]; ThenEcho " ! / Service Directory Is Missing "
OK=0Elif ["$VERB" = Y]; ThenEcho "/service Directory Exists "Fi

If [-f /etc/inittab]; ThenGrep %26quot;^SV%26quot; /etc/inittab %26gt;/dev/nullIf [$ ? - Ne 0]; ThenEcho " ! Couldn't Find SV Entry In Inittab "
OK=0Elif ["$VERB" = Y]; ThenEcho "svscan /service Is Configured To Run Via /etc/inittab "Fi
PS="ps -ef "ElseGrep %26quot;svscanboot%26quot; /etc/rc.local %26gt;/dev/nullIf [$ ? - Ne 0]; ThenEcho " ! Couldn't Find 'csh -cf '/command/svscanboot %26amp;' In /etc/rc.local %26quot;
OK=0Elif ["$VERB" = Y]; ThenEcho "/command/svscanboot Is Configured To Run Via /etc/rc.local "Fi
PS="ps -waux "Fi

SVRUN=`$PS | Grep "svscan /service" | Grep -v Grep`If [-z "$SVRUN" ]; ThenEcho "' ! Svscan /service' Doesn't Seem To Be Running "
OK=0Elif ["$VERB" = Y]; ThenEcho "svscan /service Is Running "Fi

If [! - F $QMHOME/control/defaultdelivery]; ThenEcho " ! Couldn't Find $QMHOME/control/defaultdelivery "
OK=0Elif [! - S $QMHOME/control/defaultdelivery]; ThenEcho " ! $QMHOME/control/defaultdelivery Is Empty "
OK=0Elif ["$VERB" = Y]; ThenEcho "$QMHOME/control/defaultdelivery Looks OK "Fi

If [! - F $QMHOME/bin/qmailctl]; ThenEcho " ! $QMHOME/bin/qmailctl Is Missing "
OK=0Elif [! - S $QMHOME/bin/qmailctl]; ThenEcho " ! $QMHOME/bin/qmailctl Is Empty "
OK=0Elif [`head -1 $QMHOME/bin/qmailctl | Cat -vet` ! = '# ! / Bin/sh$' ]; ThenEcho " ! $QMHOME/bin/qmailctl Has Bad Magic Cookie "Echo " . . .try: Dos2unix $QMHOME/bin/qmailctl "
OK=0Elif [! - X $QMHOME/bin/qmailctl]; ThenEcho " ! $QMHOME/bin/qmailctl Is Not Executable "Echo " . . .try: Chmod 755 $QMHOME/bin/qmailctl "
OK=0Elif ["$VERB" = Y]; ThenEcho "$QMHOME/bin/qmailctl Looks OK "FiIf [! - L /usr/bin/qmailctl]; ThenEcho " ! / Usr/bin/qmailctl Is Missing "Echo " . . .try: Ln -s $QMHOME/bin/qmailctl /usr/bin "
OK=0Elif ["$VERB" = Y]; ThenEcho "/usr/bin/qmailctl Exists "Fi

SVCDIRS="qmail-send Qmail-send/log Qmail-smtpd Qmail-smtpd/log "If ["$CHECKPOP" = "y" ]; Then
SVCDIRS="$SVCDIRS Qmail-pop3d Qmail-pop3d/log "FiFor I In $SVCDIRS; DoIf [! - F $QMHOME/supervise/$i/run]; ThenEcho " ! $QMHOME/supervise/$i/run File Is Missing "
OK=0Elif [`head -1 $QMHOME/supervise/$i/run | Cat -vet` ! = '# ! / Bin/sh$' ]; ThenEcho " ! $QMHOME/supervise/$i/run Has Bad Magic Cookie "Echo " . . .try: Dos2unix $QMHOME/supervise/$i/run "
OK=0Elif [! - X $QMHOME/supervise/$i/run]; ThenEcho " ! $QMHOME/supervise/$i/run File Is Not Executable "
OK=0Elif ["$VERB" = Y]; ThenEcho "$QMHOME/supervise/$i/run Looks OK "FiDone

If [! - F $QMHOME/control/concurrencyincoming]; ThenEcho " ! $QMHOME/control/concurrencyincoming Is Missing "Echo " . . .try: Echo 30 %26gt;$QMHOME/control/concurrencyincoming %26quot;
OK=0Elif ["$VERB" = Y]; ThenEcho "$QMHOME/control/concurrencyincoming Looks OK "Fi

LOGDIRS="/var/log/qmail /var/log/qmail/qmail-smtpd "If ["$CHECKPOP" = "y" ]; Then
LOGDIRS="$LOGDIRS /var/log/qmail/qmail-pop3d "FiIf ["$CHECKSEND" = "y" ]; Then
LOGDIRS="$LOGDIRS /var/log/qmail/qmail-send "FiFor I In $LOGDIRS; DoIf [! - D $i]; ThenEcho " ! $i Is Missing "Echo " . . .try: Mkdir -p $i "
OK=0Elif ["`ls -ld $i | Awk '{print $3}'`" ! = "qmaill" ]; ThenEcho " ! $i Has Wrong Owner, should Be Qmaill "Echo " . . .try: Chown Qmaill $i "
OK=0Elif ["`ls -ld $i | Awk '{print $1}'`" ! = "drwxr-x---"] ; ThenEcho " ! $i Has Wrong Mode, should Be 750 "Echo " . . .try: Chmod 750 $i "
OK=0Elif ["$VERB" = Y]; ThenEcho "$i Looks OK "FiDone

SVCLINKS="/service/qmail-send /service/qmail-smtpd "If ["$CHECKPOP" = "y" ]; Then
SVCLINKS="$SVCLINKS /service/qmail-pop3d "FiFor I In $SVCLINKS; DoIf [! - L $i]; ThenEcho " ! $i Is Missing "Echo " . . .try: Ln -s $QMHOME$i $i "
OK=0Elif ["$VERB" = Y]; ThenEcho "$i Exists "FiDone

If [! - F /etc/tcp.smtp]; ThenEcho " ! / Etc/tcp.smtp Is Missing "Echo " . . .try: Echo '127. : ALlow, RELAYCLIENT=\%26quot;\%26quot;' %26gt;%26gt;/etc/tcp.smtp %26quot;
OK=0Elif ["$VERB" = Y]; ThenEcho "/etc/tcp.smtp Exists "Fi

If [! - F /etc/tcp.smtp.cdb]; ThenEcho " ! / Etc/tcp.smtp.cdb Is Missing "Echo " . . .try: $QMHOME/bin/qmailctl Cdb "
OK=0Elif ["$VERB" = Y]; ThenEcho "/etc/tcp.smtp.cdb Exists "Fi

AHOME=`grep "^alias:" / Etc/passwd | Awk -F: '{print $6}'`If [-z "$AHOME" ]; ThenEcho " ! Couldn't Find User Alias's Home Directory "
OK=0ElseFor I In Root Postmaster Mailer-daemon; DoIf [! - F $AHOME/.qmail-$i]; ThenEcho " ! Alias For $i Is Missing "Echo " . . .try: Echo Me %26gt;$AHOME/.qmail-$i %26quot;
OK=0Elif ["$VERB" = Y]; ThenEcho "$i Alias Exists "FiDoneFi

If Netstat -a | Grep Smtp | Grep -i Listen %26gt;/dev/null; ThenIf $PS | Grep Sendmail | Grep -v Grep %26gt;/dev/null; ThenEcho " ! Sendmail Is Still Running "Echo " . . .try: $RCDIR/init.d/sendmail Stop "
OK=0Elif $LBIN/svok /service/qmail-smtpd; ThenIf ["$VERB" = Y]; ThenEcho "/service/qmail-smtpd Is Running "FiElseEcho " ! Something Is Listening On Port 25 (not Tcpserver/qmail-smtpd) "Echo " . . .try: Disabling Current MTA "
OK=0FiFi

If ["$CHECKPOP" = "y" ]; ThenIf Netstat -a | Grep Pop | Grep -i Listen %26gt;/dev/null; ThenIf $LBIN/svok /service/qmail-pop3d; ThenIf ["$VERB" = Y]; ThenEcho "/service/qmail-pop3d Is Running "FiElseEcho " ! Something Is Listening On Port 110 (not Tcpserver/qmail-pop3d) "Echo " . . .try: Disabling Other POP Server "
OK=0FiFiFi

For I In /usr/lib/sendmail /usr/sbin/sendmail; DoIf [-f $i -a! - L $i]; ThenEcho " ! $i Is A File, should Be A Link "Echo " . . .try: Uninstalling Current MTA Or: Mv $i $i.old; Ln -s $QMHOME/bin/sendmail $i "
OK=0Elif [! - F $i];thenEcho " ! $i Is Missing "Echo " . . .try: Ln -s $QMHOME/bin/sendmail $i "
OK=0Elif ["$VERB" = Y]; ThenEcho "$i Exists "FiDone

If [$OK -eq 1]; ThenEcho "Congratulations, your Qmailrocks.org Qmail Installation Looks Good! Your Qmailrocks.org Qmail Installation Looks Good!! Elif ["$VERB" = Y]; ThenEcho " ! Potential Problems Were Found With Your LWQ Installation "Fi


################### of ################# Qmr_inst_check content
#######################################################Qmailctl StopQmailctl StartTelnet Localhost 110

You Should See Something Like This:

Trying 192.168.1.10. . .
Connected To 192.168.1.10.
Escape Character Is '^]' .
+ OK %26lt;16658.1054485137@yourserver.com%26gt;User Postmaster@mydomain.com (enter Your Username Here. Remember To Use The Full E-mail Address)
+ OKPass Your_password
+ OKQuit
+ OK
Connection Closed By Foreign Host.

This Is The Sign Of A Successfull POP Connection To The Server!

Now Try Sending Mail To That Same User From Another Location. Telnet To 110 Again And Run The "list" Command And You Should

See The Message That Your Send. . . Telnet Localhost 110

Trying 192.168.1.10. . .
Connected To 192.168.1.10.
Escape Character Is '^]' .
+ OK %26lt;16658.1054485137@yourserver.comt%26gt;User Postmaster@mydomain.com (again, remember To Log In With The Full Email Address Of The User)
+ OKPass Your_password
+ OKList
+ OK
1 323 (there's Your Message! 1 323 (there's Your Message!!
. Quit
+ OK
Connection Closed By Foreign Host.

########################Part 12 - Installing Courier IMAP%26amp;IMAP SSL################
Part 12 - Installing Courier IMAP%26amp;IMAP SSLCd /downloads/qmailrocks/
/ Usr/bin/bunzip2 Courier-imap-3.0.8.tar.bz2 (Note: Some Systems May Use Bunzip2 Instead Of Bunzip)
#bunzip Courier-imap-3.0.8.tar.bz2Tar Xvf Courier-imap-3.0.8.tarCd Courier-imap-3.0.8
. / Configure \
- - Prefix=/usr/local \
- - Exec-prefix=/usr/local \
- - Without-authdaemon \
- - With-authvchkpw \
- - Without-authldap \
- - Disable-root-check \
- - With-sslMakeMake Install-stripCd /usr/local/etcCp Imapd.dist ImapdCp Imapd-ssl.dist Imapd-ssl
/ Usr/local/sbin/mkimapdcertEe Imapd-ssl
#make Sure IMAPDSSLSTART=YES

Cp /usr/local/libexec/imapd.rc /usr/local/etc/rc.d/imap.shCp /usr/local/libexec/imapd-ssl.rc /usr/local/etc/rc.d/imaps.sh
/ Usr/local/etc/rc.d/imap.sh Start
/ Usr/local/etc/rc.d/imaps.sh Start

Telnet Localhost 143

Trying 192.168.1.10. . .
Connected To 192.168.1.10.
Escape Character Is '^]' .
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE STARTTLS]

Courier-IMAP Ready. Copyright 1998-2003 Double Precision, inc. See COPYING For Distribution Information. A Login Postmaster@mydomain.com My_passwordA OK LOGIN Ok. (Successful Login! (Successful Login!! A Logout (logs You Out)
* BYE Courier-IMAP Server Shutting DownA OK LOGOUT Completed
Connection Closed By Foreign Host.

tar zxvf courierpassd-1.1.0-RC1.tar.gz

cd courierpassd-1.1.0-RC1

./configure MakeMake Install- -%26gt;

#########################Part 14 - Clam Antivirus%26amp;Spamassassin####################
Part 14 - Clam Antivirus%26amp;Spamassassin

Install Clamav

Cd /usr/ports/security/clamavMakeMake InstallMake Clean
Note:Pitch on CURLReboot
Test
/ Usr/local/bin/clamscan -r -i /usr/local/www/data
-----------SCAN SUMMARY-----------
Known Viruses: 32358
Scanned Directories: 47
Scanned Files: 866
Infected Files: 0
Data Scanned: 10.32 MB
I/O Buffer Size: 131072 Bytes
Time: 41.750 Sec (0 M 41 S)

Upgrade virus library
/ Usr/local/bin/freshclam -l /var/log/clamav/clam-update.log

ClamAV Update Process Started At Fri May 6 00:12:24 2005
WARNING: Your ClamAV Installation Is OUTDATED - Please Update Immediately!
WARNING: Local Version: 0.83 Recommended Version: 0.84
Downloading Main.cvd [* ]Main.cvd Updated (version: 31, sigs: 33079, f-level: 4, builder: Tkojm)
Downloading Daily.cvd [* ]Daily.cvd Updated (version: 871, sigs: 1178, f-level: 4, builder: Ccordes)
Database Updated (34257 Signatures) From Database.clamav.net (IP: 61.8.0.16)
Clamd Successfully Notified About The Update.


Textual link:Http://cnfug.org/journal/systems/2005/000098.html


Related:

    Submit: