FreeBSD Qmail MySQL VPOPMAIL full ports installation time: 2004-10-26 16:34:40
Source: chinake.com Author: chaohunw@sohu.com Votes: 4 Rating: Views: 60
First, the basic system is prepared 1, install freebsd4.10 Select all installation, set up NIC address: 192.168.0.0.1, gateway: 192.168.0.1, DNS: 202.102.192.68, this name: Mail, domain name: Chinake.com, open FTP, Add a user: chaohu, password: 123456 User Group: Wheel, Directory Selection Catalog /, after the installation is complete, add CVSUP and Portupgrade, restart. Note: Increase the user because the ports installation download is too slow, will need the software to use the download tool in Windows Next, you can use SSH to log in to the host, so I like WINDOWS users can also use EE and other editing. 2. Use SecureCRT or PUTTY.EXE to log in, and Su root users. #CHMOD 777 / USR / PORTS / DISTFILES is now assume that you have downloaded the software you need, open the FTP tool (such as LeAftp), login 192.168.0.88, user name Chaohu and 123456, upload files. 3, update ports # cd / usr / share / example / cvsup / # / usr / local / bin / cvsup -g -l2 -h ftp.freebsdchina.org ports-support can also update Stable-Suppirl and Standard-Supfile to this Basic system installation ends.
Second, Web Server Preparation 1, Install Apache-Modssl # CD / USR / Ports / WWW / Apache13-Modssl / # make install Add: #ee /etc/rc.conf Add: Apache_enable = YES If you want yourself to develop SSL certificates Don't make Make Clean Add PHP support #CD / usr / ports / lang / php4 # make install Add: AddType Application / X-httpd-php .PhpaddType Application according to prompt #ee /usr/local/etc/apache/httpd.conf / x-httpd-php-source .phps # cp php.ini-dist pHP.ini increase zend support, only manually install, but it is very simple, to the Zend website to download it after #tar ZXVF ZENDOPTIMIZER-2.5.5- FreeBSD4.3-I386.TAR.GZ # cd Zendoptimizer-2.5.5- FreeBSD4.3-i386 # chmod 755 install.sh #. / install .sh Unix does not allow running in the current directory The program, so it is to add ./ 2, the installation mysql # cd / usr / ports / databases / mysql323-server # make WITH_OPENSSL = yes WITH_LINUXTHREADS = yes BUILD_OPTIMIZED = yesinstall clean3, with ports to install phpmyadmin # cd / usr / ports / databases / phpmyadmin # ee Makefile, the default Mounting path to WWW / DATA, SQWWWEBMAIL, QMAILADMIN, VQREGOSTER, etc., please check the default web CGI-BIN path #make install clean # cd / usr / local / www / data / phpMyadmin # chmod 755 config.inc .php # eE config.inc.php will be $ cfg ['servers'] [$ I] [' auth_type '] =' config '; // automation method (config, http or cookie based)? Changed to $ CFG [' Servers'] [$ I] ['Auth_Type'] = 'http'; // Authentication Method (config, http or cookie based)? 4, increase the support of Expect (SQWWebmail Change Password to use) #CD / USR / Ports / Lang / EXPECT # make install clean to this, the web system is built, if you want to optimize, refer to the relevant parameters in php.ini, etc. #reboot
Third, QMAIL installation 1, qmail # cd / usr / ports / mail / qmail # make with_big_todo_patch = yes # make disable-sendmail # make enable-qmail # cd /var/qmail/configure#./config-fast mail.chinake .com Please mail.chinake.com into your own checking #ee /etc/rc.conf increase sendmail_enable = "NONE" sendmail_submit_enable = "NO" sendmail_outbound_enable = "NO" sendmail_msp_queue_enable = "NO" 2, vpopmail # cd / usr / ports / mail / vpopmail # make WITH_MYSQL = yes WITH_MYSQL_SERVER = localhost WITH_MYSQL_USER = vpopmail WITH_MYSQL_PASSWD = vpopmail WITH_MYSQL_DB = vpopmail install clean yourself vpopmail modify them for your own through the http://192.168.0.88/phpmyadmin/ Permissions Modify the root user password, increase the VPopmail database, increase the VPopMail user and password, and give VPopmail all permissions for database VPOPMAIL. Its command mode is: #mysqlmysql> set password for root = password ('password'); (Modify root password) mysql> create database vpopmail; mysql> use mysql; mysql> grant usage on *. * To "vpopmail" @ "Localhost" Identified by "****"; mysql> grant all privileges on `vpopmail`. * to" vpopmail "@" localhost "with grant option; mysql> Bye3, ispell # CD / USR / ports / german / ispell -neu # make install clean4, sqwebmail # cd / usr / ports / mail / sqwebmail # make with_vchkpw = yes with_ispell = yes install According to the prompt: #make configure # make Clean # EE / etc / crontab Add: 40 * * * * root /usr/local/share/sqwebmail/cleancache.pl#cd / usr / local / share / sqwebmail / # cp authdaemonrc.dist authdaemonrc # / usr / local / libexec / sqwebmail / authlib / authdaemond start5, qmailadmin # cd / usr / ports / mail / qmailadmin # make install clean
Ok, qmail is ready, restart a server, see if Authdaemond SqwebmAild has normal boots, if not, please check the above steps, prepare the configuration below.
Fourth, configure qmail server 1, test vpopmail # cd/usr/vocal/vpopmail/bin#./vadddomain test.com #. / Vadduser test@test.com If there is no prompt, it is right. 2. Install daemontools # cd / usr / ports / sysutils / daemontools # make install clean3, configure daemontools3.1 establishment path and set permissions #MKDIR -P / VAR / log / qmail / qmail-smtpd # mkdir -p / var / log / qmail / qmail-pop3d # mkdir -p / var / log / qmail / qmail-send # chmod -r 755 / var / log / qmail # chown -r qmail: Wheel / Var / log / qmail 3.2 svscan startup
MKDIR / ServicechMod 755 / Servicemkdir / Var / QMail / SupervisechMod 755 / VAR / QMAIL / SuperVise
Mkdir / var / qmail / supervise / qmail-smtpdmkdir / var / qmail / supervise / qmail-smtpd / logchmod t / var / qmail / supervise / qmail-smtpd
Mkdir / var / qmail / supervise / qmail-sendmkdir / var / qmail / supervise / qmail-send / logchmod t / var / qmail / supervise / qmail-send
MKDIR / VAR / QMAIL / SuperVise / qmail-pop3dmkdir / var / qmail / supervise / qmail-pop3d / logchmod t / var / qmail / supervise / qmail-pop3d
ln -s / var / qmail / supervise / * / service /
Start file configuration QMAIL control-file:
#ee / var / qmail / rc env - path = "/ var / qmail / bin: / usr / local / bin" qmail-start ./maildir/
POP3D:
#ee / var / qmail / supervise / qmail-pop3d / run #! / bin / sh exec / usr / local / bin / tcpserver -h -r -V -C100 0 110 / var / qmail / bin / qmail-popup mail .chinake.com / usr / local / vpopmail / bin / vchkpw / var / qmail / bin / qmail-pop3d maildir 2> & 1
#CHMOD 755 / VAR / QMAIL / SuperVise / qmail-pop3d / run
#ee / var / qmail / supervise / qmail-pop3d / log / run #! / bin / shexec / usr / local / bin / setuidgid qmaill / usr / local / bin / multilog T S100000 N20 / var / log / qmail / qmail -POP3D 2> & 1
#CHMOD 755 / VAR / QMAIL / SuperVise / qmail-pop3d / log # chmod 755 / var / qmail / supervise / qmail-pop3d / log / run
Received #ee cd / var / qmail / supervise / qmail-smtpd / run #! / Bin / shexec / usr / local / bin / tcpserver -p -r -x /etc/tcp.smtp.cdb -u92 -g91 - V -C100 0 SMTP RBLSMTPD / VAR / QMAIL / BIN / QMAIL-SMTPD 2> & 1 # chmod 755 / var / qmail / supervise / qmail-smtpd / run
#ee / var / qmail / supervise / qmail-smtpd / log / run #! / bin / shexec / usr / local / bin / setuidgid qmaill / usr / local / bin / multilog T S100000 N20 / var / log / qmail / qmail -SMTPD 2> & 1
#CHMOD 755 / VAR / LOG / qmail / qmail-smtpd / log # chmod 755 / var / log / qmail / qmail-smtpd / log / Run
Send a letter #ee / var / qmail / supervise / qmail-send / run #! / Bin / shexec / var / qmail / rc
#CHMOD 755 / VAR / QMAIL / SuperVise / qmail-send / Run
#CD / VAR / QMAIL / SuperVise / qmail-send / log / run #! / bin / shexec / usr / local / bin / setuidgid qmaill / usr / local / bin / multilog T S100000 N20 / VAR / log / qmail / qmail -send 2> & 1
#CHMOD 755 / VAR / QMAIL / SuperVise / qmail-send / log / # chmod 755 / var / qmail / supervise / qmail-send / log / run
#RM /usR/local/etc/rc.d/qmail.sh#ee /usr/local/etc/rc.d/qmail.sh
#! / bin / shcase "$ 1" instart) echo -n "starting qmail: svscan" if cd / var / qmail / supervise; thenenv - path = "/ var / qmail / bin: / usr / local / bin: / usr / bin: / bin "SVSCAN & ECHO $!> /VAR/Run/svscan.pidfiecho". ";; stop) echo -n" stopping qmail: svscan "kill` Cat /var/run/svscan.pid`echo -n "qmail" svc -dx / var / qmail / supervise / * echo -n "logging" svc -dx / var / qmail / supervise / * / logcho "." ;; stat) cd / var / qmail / supervisesvstat * * / LOG ;; DOQUE | ALRM) Echo "Sending Alrm Signal to qmail-send." SVC -A / VAR / QMAIL / SuperVise / qmail-send ;; queue) qmail-qstatqmail-qread ;; reload | HUP) Echo "Sending Hup Signal to qmail-send. "SVC -H / VAR / QMAIL / SuperVise / qmail-sendecho" sending hup signal to qmail-pop3d. "SVC -H / VAR / QMAIL / SuperVise / qmail-pop3d ;; pause) echo" PAUSING qmail-send "svc -p / var / qmail / supervise / qmail-sendecho" pausing qmail-smtpd "svc -p / var / qmail / supervise / qmail-smtpdecho" PAUSING QMAIL-POP3D "SVC -P / VAR / QMAIL / Supervise / QMail-POP3D ;; Cont) Echo "Continuing qmail-send" svc -c / var / qmail / supervise / qmail-sendecho "Continuing Qmail-SMTPD "SVC-C / VAR / QMAIL / SuperVise / Qmail-SMTPDecho" Continuing Qmail-Pop3D "SVC-C / VAR / QMAIL / SuperVise / Qmail-Pop3D ;; Restart) Echo" RESTARTING QMAIL: "Echo" * Stopping Qmail-smtpd. "SVC -D / var / qmail / supervise / qmail-smtpdecho" * sending qmail-send sigterm and restarting. "SVC -T / VAR / QMAIL / SuperVise / qmail-sendecho" * restarting qmail-smtpd. " SVC -U / var / qmail / supervise / qmail-smtpdecho "* sending qmail-pop3d sigterm and restarting." SVC -T / VAR / QMAIL / SuperVISE / QMAIL-POP3D ;; CDB) TCPRules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp <
/etc/tcp.smtpchmod 644 /etc/tcp.smtp*echo "Reloaded /etc/tcp.smtp.";;) Echo" USAGE: $ 0 {start | stop | restart | doqueue | Reload | Stat | Pause | Cont | CDB | Queue} "EXIT 1ESACEXIT 0 # chmod 755 /usr/local/etc/rc.d/qmail.sh#ee /etc/tcp.smtp127.0.0.1 :198.168.1 .: Allow, relayclient = "" 200.200.200.:Allow ,ylayclient="": allow
# / usr / local / bin / tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp
# VQregister configuration file # ADMINEMAIL # AdminEmail mh@myfreebsd.org# REGISTERUSER # Syntax: RegisterUser
# PASSWORDLEN ## Syntax: PasswordLen