Install IGENUS in RedHat9.0
Bluelotus 2003.06.16
RedHat9.0 Qmail SMTP-Auth VPopmail MySQL IGENUS, Example: http://0874.cn/mail
First, install the environment and preparation work
Install RedHat9.0, select the installation of Apache, PHP, MySQL, can save the trouble of self-compiled installation, mysql should pay attention to select the mysql-site development kit, MySQL's header file and library files are in / usr / include / mysql And / usr / lib / mysql.
After installing RedHat9.0, modify /tc/httpd/conf/httpd.conf so that the web service is enabled, add the root user password to MySQL. If a firewall is set, open the server's SMTP 25 and POP3 110 ports.
Second, install UCSPI-TCP-0.88
1. Download the appropriate software and patches, due to the version of the Glibc of RedHat9.0, the patch must be made normally.
Wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
Wget http://qmail.te8.com/rpms/glibc-2.3.1/ucspi-tcp-0.88.a_record.patch
Wget http://qmail.te8.com/rpms/glibc-2.3.1/ucspi-tcp-0.88.Rrno.patch
Wget http://qmail.te8.com/rpms/glibc-2.3.1/ucspi-tcp-0.88.nobase.patch
2. Install UCSPI-TCP-0.88
#TAR ZXVF UCSPI-TCP-0.88.tar.gz
#CD UCSPI-TCP-0.88
#patch -p1 <../ucspi-tcp-0.88.a_record.patch
#patch -p1 <../ucspi-tcp-0.88.rrno.patch
#patch -p1 <../ucspi-tcp-0.88.nobase.patch
#make
#make setup check
Third, install qmail
1. Download software and patches:
Wget http://cr.yp.to/software/qmail-1.03.tar.gz
Wget http://www.ckdhr.com/ckd/qmail-103.patch
Wget http://www.qmail.org/qmailqueue-patch
Wget http://www.shupp.org/patches/qmail-maildir .patch
Wget http://qmail.te8.com/rpms/glibc-2.3.1/qmail-1.03.rrno.patch
Wget http://qmail.te8.com/rpms/glibc-2.3.1/qmail-1.03.qmail_local.patch
Wget http://members.elysium.pl/brush/qmail-smtp-auth/dist/qmail-smtpd-auth-0.31.tar.gz
2. Establish a directory:
# MKDIR / VAR / Qmail
# MKDIR / VAR / QMAIL / ALIAS
3. Construction groups and users:
# GroupAdd Nofiles
# GroupAdd qmail
# UserAdd alias -g nofiles -d / var / qmail / alias -s / nonexistent
# ueradd qmails -g nofiles -d / var / qmail -s / nonexistent
# UserAdd qmaill -g nofiles -d / var / qmail -s / nonexistent
# ueradd qmailp -g nofiles -d / var / qmail -s / nonexistent
# UserAdd qmailq -g qmail -d / var / qmail -s / nonexistent
# UserAdd qmailr -g qmail -d / var / qmail -s / nonexistent
# UserAdd qmails -g qmail -d / var / qmail -s / nonexistent
4. Patching dies and finishing QMAIL
#tar zxvf qmail-1.03.tar.gz
#tar zxvf qmail-smtpd-auth-0.31.tar.gz
#CP qmail-smtpd-auth-0.31 / base64. * Qmail-1.03 // Install SMTP-Auth patch, support SMTP authentication
#PATCH -D qmail-1.03 #CD qmail-1.03 #patch -p1 <../qmail-103.patch #patch -p1 <../qmailqueue-patch #patch -p1 <..qmail-maildir . patch #patch -p1 <..qmail-1.03.rrno.patch #patch -p1 <..qmail-1.03.qmail_local.patch #vi qmail-smtpd.c // Change the 451 in the function streynewline to 553 # Make setup check # ./config-fast test.mydomain.com 5. Add alias users: # Touch /Var/qmail/Alias/.qmail-root # Touch /var/qmail/Alias/.qmail-postmaster # Touch /Var/qmail/Alias/.qmail-mailer-daemon 6. If there is postefix and sendmail, deactivate the current Mail service # / etc / rc.d / init.d / sendmail stop #CP / VAR / QMAIL / BIN / Sendmail /usr/sbin/qmail.sendmail #RM-F / ETC / Alternative / MTA #LN -S /USR/SBIN/Qmail.sendmail / etc / alternative / MTA RedHat9.0 has taken into account the use of other mail servers instead of Sendmail, because they provide both Postfix and Sendmail options. Fourth, install VPOPMAIL 1. Download the stable version of VPopmail Wget http://www.inter7.com/vpopmail/vpopmail-5.2.1.tar.gz 2. Establish a directory: #mkdir / home / vpopmail #mkdir / home / vpopmail / etc 3. Add users and groups: #groupadd vchkpw # useradd -g vchkpw vpopmail 4. Add mysql's vpopmail user to operate the VPOPMAIL database #mysql -u root -p // Enter the mysql command line Mysql> Create Database vpopmail; Mysql> grant all on vpopmail. * to vpopmail @ localhost identified by "password"; 5. Compilation and installation VPOPMAIL #tar zxvf vpopmail-5.2.1.tar.gz #CD VPOPMAIL-5.2.1 # vi vmysql.h / * =========================== vmysql.h ================================================================================================================================================================================================================ ============ * / #define mySQL_UPDATE_SERVER "localhost" (MySQL server name) #define mysql_update_user "vpopmail" (username) #define mySQL_UPDATE_PASSWD "12345678" (changed to your password you set) #define mysql_read_server "localhost" (MySQL server name) #define mysql_read_user "vpopmail" (username) #define mysql_read_passwd "12345678" (changed to your password you set) / * ================================================================================================================================================================ ================== * / 6. Create a TCP.SMTP file (or use /etc/tcp.smtp) # vi /Home/vpopMail/etc/tcp.smtp / * ==================== tc ========================= ======= * / 127.0.0.1: ALLOW ,RELAYCLIENT = "" : Allow / * ================================================================================================================================================================ =========== * / #CD / HOME / VPOPMAIL / ETC #tcprules tcp.smtp.cdb tcp.smtp.tmp #./configure // below is the parameters I use --Prefix = / home / vpopmail // Specify the installation path --enable-mysql = y // Whether to apply a mysql database --enable-incdir = / usr / include / mysql // mysql database Include file location --enable-libdir = / usr / lib / mysql // mysql database lib file location --enable-default-domain = mydomain.com // Define the virtual domain name --enable-passwd = n // Do you use a system password verification method? --enable-defaultquota = 52428800s // Define the default mailbox size, 10485760 is 10MB, 20971520 is 20MB, 52428800s is 50MB --enable-tcprules-prop = / usr / local / bin / tcprules // Specify TCPRules directory --enable-tcpserver-file = / home / vpopmail / etc / tcp.smtp // Specify TCPRules application rule file --enable-vpopuser = VPOPMAIL // VPopmail user --enable-vpopgroup = vchkpw // vpopmail group --enable-ip-alias-domains = n // Allows to find virtual domain names through reverse IP address in the virtual domain # Make # make install-strip 8. Create a virtual domain # cd / home / vpopmail / bin # ./vadddomain domain (password) (automatically generate a vpopmail form in MySQL Database Vpopmail) (If you use the same virtual domain name as the machine name, you should be a different virtual domain name, otherwise there will be problems, you can't automatically generate vpopmail databases) # ./vadduser username password (will automatically add user data to watch VPOPMail, username to bring domain name, such as demo@demo.com) If you are not successful, you must first remove the created domain,. / Vdeldomain domain name Five, SMTP-AUTH settings 1. Modify the properties of vchkpw #CHMOD 4755 vchkpw #Chown root.root vchkpw If you use a validated SMTP, the SMTP process is to call the password verification program, you must use SetUID and SetgID. Improve the permissions of VCHKPW to complete the setgid operation. 2. Download installation CMD5Checkpw Wget http://members.elysium.pl/brush/cmd5checkpw/dist/cmd5checkpw-0.22.tar.gz #TAR ZXVF CMD5Checkpw-0.22.tar.gz #CD cmd5checkpw-0.22 #make #make install Note that because of the use of VPOPMAIL, checkpassword is not installed. 6. Generate qmail's startup script #CP / VAR / QMAIL / BOOT / HOME / VAR / QMAIL / RC # vi / var / qmail / rc // modified the RC file to determine the way of delivery: / * ================= r ========================= * / #! / Bin / sh # Using splogger to send the log through syslog. # Using dot-forward to support sendmail-style ~ / .forward files. # Using qmail-local to deliver messages to ~ / mailbox by default. Exec env - path = "/ var / qmail / bin: $ path" / qmail-start ./mail/ splogger qmail & / * ============================================ * / #vi / var / qmail / SMTP // Edit SMTP service startup script / * ===================== =========================== === * / #! / bin / sh Qmailduid = qmails Nofilesgid = NOFILES / usr / local / bin / tcpserver -h -r -l 0 -t 1 -v -p -x /home/vpopmail/tc/tcp.smtp.cdb -u $ qmailduid -g $ nofilesgid 0 SMTP / VAR / QMAIL / bin / qmail-smtpd hostname / home / vpopmail / bin / vchkpw / bin / true / bin / cmd5checkpw / bin / true 2> & 1 | / var / qmail / bin / splogger SMTPD 3 & / * ================================================================================================================================================================ ====== * / #vi / var / qmail / pop3 // Edit the startup script for POP3 service / * ====================== POP3 =============================================================================================================================================================== == * / #! / bin / sh / usr / local / bin / tcpserver -h -r 0 POP3 / / VAR / QMAIL / BIN / QMAIL-POPUP HOSTNAME / / home / vpopmail / bin / vchkpw / var / qmail / bin / qmail-pop3d maildir & / * ================================================================================================================================================================ ===== * / #CHMOD 755 / VAR / QMAIL / RC #CHMOD 755 / VAR / QMAIL / SMTP #CHMOD 755 / VAR / QMAIL / POP3 7. Run qmail and test # / var / qmail / rc # / var / qmail / smtp # / var / qmail / pop3 #ps aux | grep "qmail" // View whether the QMAIL service process is completely started If Qmail is started normally, use Outlook to test whether the SMTP and POP3 are normal. Note that due to the VPopmail supports the virtual domain name, the user name is added to add a domain name, such as Demo@demo.com. SMTP is certified, and it is also necessary in Outlook. It is recommended to install the qmail after the QMAIL will be installed. After QMAIL is working properly, IGENUS is installed for only 10 minutes, very smooth. If Qmail occurs, you can view the vpopmail database under MySQL, MySQLD and Mailog logging under / var / log, so it is easy to find out the problem. Eight, install and run IGENUS 1. To http://www.igenus.org Download the latest installation package, I use IGENUS_2_20030516_Snap.tgz #TAR ZXVF IGENUS_2_20030516_SNAP.TGZ -C / VAR / WWW / HTML // Redhat under Apache default Document Root 2. Jian TEMP folder CD / VAR / WWW / HTML / IGENUS Mkdir Temp CHMOD -R 0755 TEMP Chown -r vpopmail: vchkpw Temp 3. Modify httpd.conf #vi /etc/httpd/conf/httpd.conf GROUP Apache User apache change into: GROUP VCHKPW User vpopmail # / etc / rc.d / init.d / httpd restart // Restart Apache 4. Modify config_inc.php file # cd / usr / local / apache / htdocs / iGenus / config # vi config_inc.php / * =================================================== * / $ Cfg_basepath = "/ usr / local / apache / htdocs / icnus"; $ Cfg_mysql_host = 'localhost'; $ Cfg_mysql_user = 'vpopmail'; $ Cfg_mysql_pass = '12345678'; // change into your password $ Cfg_mysql_db = 'vpopmail'; $ Cfg_temp = $ cfg_basepath. "/ Temp"; / * ===================================================== * / 5. Re-establish MySQL Database Table #mysql -u root -p Mysql> Use vpopmail; Mysql> ALTER TABLE VPOPMAIL DROP Primary Key; Mysql> ALTER TABLE VPOPMAIL Add Column PW_ID INT (5) Not Null Primary Key Auto_Increment MySQL> CREATE TABLE ADDRESS ( ID INT (11) Unsigned Not Null Auto_Increment, PW_ID INT (5) unsigned 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; mysql> quit; 6. If you need, add a new domain name and new user with Vadddomain and Vadduser. Finally open the browser, enter http: // Your website / IGENUS, say good luck !.