DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.0.255
HWADDR=XX:XX:XX:XX:XX:XX
IPADDR=192.168.0.60
NETWORK=192.168.0.0
ONBOOT=yes
TYPE=Ethernet
GATEWAY=192.168.0.1
2. vi /etc/sysconfig/network
改为hostname=mail.example.com
3.vi /etc/hosts
[root@mail ~]# vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.0.60 mail.example.com mail
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
======================================================================
5.reboot ------重启
[root@mail ~]# mkdir -p /usr/src/qtms-install
[root@mail ~]# cd /usr/src/qtms-install/
[root@mail qtms-install]# ls
current-download-script.sh fedora12-perl.sh mysql-setup.sh
fedora12-deps.sh fedora12-svcs.sh
fedora_12-install-script.sh firewall.sh
[root@mail qtms-install]# sh current-download-script.sh ----------下载包
autorespond-toaster-2.0.4-1.3.6.src.rpm
clamav-toaster-0.95.3-1.3.31.src.rpm
control-panel-toaster-0.5-1.3.7.src.rpm
courier-authlib-toaster-0.59.2-1.3.10.src.rpm
courier-imap-toaster-4.1.2-1.3.10.src.rpm
current-download-script.sh
daemontools-toaster-0.76-1.3.6.src.rpm
djbdns-1.05-1.0.6.src.rpm
ezmlm-toaster-0.53.324-1.3.6.src.rpm
fedora12-deps.sh
fedora_12-install-script.sh
fedora12-perl.sh
fedora12-svcs.sh
firewall.sh
isoqlog-toaster-2.1-1.3.7.src.rpm
libdomainkeys-toaster-0.68-1.3.6.src.rpm
libsrs2-toaster-1.0.18-1.3.6.src.rpm
maildrop-toaster-2.0.3-1.3.8.src.rpm
mysql-setup.sh
qmailadmin-toaster-1.2.12-1.3.8.src.rpm
qmailmrtg-toaster-4.2-1.3.6.src.rpm
qmail-toaster-1.03-1.3.20.src.rpm
ripmime-toaster-1.4.0.6-1.3.6.src.rpm
simscan-toaster-1.4.0-1.3.8.src.rpm
spamassassin-toaster-3.2.5-1.3.17.src.rpm
squirrelmail-toaster-1.4.19-1.3.15.src.rpm
ucspi-tcp-toaster-0.88-1.3.9.src.rpm
vpopmail-toaster-5.4.17-1.3.7.src.rpm
vqadmin-toaster-2.3.4-1.3.6.src.rpm
zlib-1.2.3-1.0.3.src.rpm
6.
[root@mail ~]# chmod +x fedora12-deps.sh
[root@mail qtms-install]# sh fedora12-deps.sh
7.
[root@mail qtms-install]# chmod +x *.sh
vi fedora12-svcs.sh ---------修改MYSQLPW密码为example221 建议脚本内容单独拿出来刷比较保险
[root@mail qtms-install]# chkconfig atd off
[root@mail qtms-install]# service atd stop
Stopping atd: [ OK ]
[root@mail qtms-install]#
[root@mail qtms-install]# chkconfig cups off
[root@mail qtms-install]# service cups stop
Stopping cups: [ OK ]
[root@mail qtms-install]#
[root@mail qtms-install]# chkconfig gpm off
error reading information on service gpm: No such file or directory
[root@mail qtms-install]# service gpm stop
gpm: unrecognized service
[root@mail qtms-install]# chkconfig mdmonitor off
[root@mail qtms-install]# service mdmonitor stop
[root@mail qtms-install]#
[root@mail qtms-install]# chkconfig netfs off
[root@mail qtms-install]# service netfs stop
[root@mail qtms-install]#
[root@mail qtms-install]# chkconfig nfslock off
[root@mail qtms-install]# service nfslock stop
Stopping NFS statd: [ OK ]
[root@mail qtms-install]# chkconfig httpd on
[root@mail qtms-install]# service httpd start
Starting httpd:
[root@mail qtms-install]# chkconfig mysqld on
[root@mail qtms-install]# service mysqld start
Starting MySQL: [ OK ]
[root@mail qtms-install]# sleep 3
[root@mail qtms-install]# mysqladmin -uroot password $MYSQLPW
[root@mail qtms-install]# mysqladmin -uroot -p$MYSQLPW reload
[root@mail qtms-install]# mysqladmin -uroot -p$MYSQLPW refresh
[root@mail qtms-install]# mysqladmin create vpopmail -uroot -p$MYSQLPW[root@mail qtms-install]# mysqladmin -uroot -p$MYSQLPW reload
[root@mail qtms-install]# mysqladmin -uroot -p$MYSQLPW refresh
[root@mail qtms-install]# mysqladmin -uroot -p$MYSQLPW reload
[root@mail qtms-install]# mysqladmin -uroot -p$MYSQLPW refresh
[root@mail qtms-install]# cp -u /etc/inittab /etc/inittab.bak
[root@mail qtms-install]# cat /etc/inittab | sed -e 's/^id:5:initdefault:/id:3:initdefault:/' > /etc/inittab.new
[root@mail qtms-install]# mv -f /etc/inittab.new /etc/inittab
[root@mail qtms-install]# ln -s /usr/include/et/com_err.h /usr/include/com_err.h
## Set your IP address
MYIP="192.168.0.60"
[root@mail ~]# sh fedora12-svcs.sh
10.我把安装包都下好放在 /usr/src/qtms-install下了所以可以直接执行下面的脚本
[root@mail qtms-install]# sh fedora_12-install-script.sh -----修改脚本中ARCH=i386为 ARCH=i686因为fedora12是i686, 如果是fedora11的话改为i586
Installing daemontools-toaster . . .
Shall we continue? (yes, skip, quit) [y]/s/q: ----------按回车
接下来都是按回车一直到最后
Do you want to clean /root/rpmbuild/RPMS/* ?
Shall we continue? (yes, skip, quit) [y]/s/q: s
完成
=================================================================
[root@mail qtms-install]# rpmbuild --rebuild --with fedora_11 daemontools-toaster-0.76-1.3.6.src.rpm ----编译
[root@mail qtms-install]# cd /root/rpmbuild/RPMS/i686
[root@mail i686]# rpm -Uvh daemontools-toaster-0.76-1.3.6.i686.rpm
Preparing... ########################################### [100%]
1:daemontools-toaster ########################################### [100%]
[root@mail qtms-install]# rpmbuild --rebuild --with fedora_11 ucspi-tcp-toaster-0.88-1.3.9.src.rpm
[root@mail qtms-install]# cd /root/rpmbuild/RPMS/i686
[root@mail i686]# rpm -Uvh ucspi-tcp-toaster-0.88-1.3.9.i686.rpm
Preparing... ########################################### [100%]
1:ucspi-tcp-toaster ########################################### [100%]
[root@mail qtms-install]# rpmbuild --rebuild --with fedora_11 vpopmail-toaster-5.4.17-1.3.7.src.rpm
[root@mail qtms-install]# cd /root/rpmbuild/RPMS/i686
[root@mail i686]# rpm -Uvh vpopmail-toaster-5.4.17-1.3.7.i686.rpm
Preparing... ########################################### [100%]
groupadd: group 'vchkpw' already exists
1:vpopmail-toaster ########################################### [100%]
13.
[root@mail qtms-install]# rpmbuild --rebuild --with fedora_11 libdomainkeys-toaster-0.68-1.3.6.src.rpm
[root@mail qtms-install]# cd /root/rpmbuild/RPMS/i686
[root@mail i686]# rpm -Uvh libdomainkeys-toaster-0.68-1.3.6.i686.rpm
Preparing... ########################################### [100%]
1:libdomainkeys-toaster ########################################### [100%]
14.
[root@mail qtms-install]# rpmbuild --rebuild --with fedora_11 libsrs2-toaster-1.0.18-1.3.6.src.rpm
[root@mail qtms-install]# cd /root/rpmbuild/RPMS/i686
[root@mail i686]# rpm -Uvh libsrs2-toaster-1.0.18-1.3.6.i686.rpm
Preparing... ########################################### [100%]
1:libsrs2-toaster ########################################### [100%]
[root@mail i686]# rpm -Uvh qmail-toaster-1.03-1.3.20.i686.rpm
Preparing... ########################################### [100%]
1:qmail-pop3d-toaster ########################################### [100%]
[root@mail qtms-install]# useradd shubes ---添加账户 默认没有
rpmbuild --rebuild --with fedora_11 courier-authlib-toaster
[root@mail i686]# rpm -Uvh courier-authlib-toaster-0.59.2-1.3.10.i686.rpm
Preparing... ########################################### [100%]
1:courier-authlib-toaster ########################################### [100%]
Preparing... ########################################### [100%]
1:courier-authlib-toaster ########################################### [100%]
[root@mail qtms-install]# rpmbuild --rebuild --with fedora_11 courier-imap-toaster-4.1.2-1.3.10.src.rpm
1:courier-imap-toaster ########################################### [100%]
18.
cd /usr/src/qtms-install/
nd-toaster-2.0.4-1.3.6.src.rpm
[root@mail qtms-install]# cd /root/rpmbuild/RPMS/i686
[root@mail i686]# rpm -Uvh autorespond-toaster-2.0.4-1.3.6.i686.rpm
Preparing... ########################################### [100%]
1:autorespond-toaster ########################################### [100%]
....................很多部看脚本就知道反正都是一样的命令
Do you want to clean /root/rpmbuild/RPMS/* ?
Shall we continue? (yes, skip, quit) [y]/s/q: s
完成
[root@mail qtms-install]# qmailctl stat--------------------------------启动
authlib: unable to open supervise/ok: file does not exist
clamd: unable to open supervise/ok: file does not exist
imap4: unable to open supervise/ok: file does not exist
imap4-ssl: unable to open supervise/ok: file does not exist
pop3: unable to open supervise/ok: file does not exist
pop3-ssl: unable to open supervise/ok: file does not exist
send: unable to open supervise/ok: file does not exist
smtp: unable to open supervise/ok: file does not exist
spamd: unable to open supervise/ok: file does not exist
submission: unable to open supervise/ok: file does not exist
authlib/log: unable to open supervise/ok: file does not exist
clamd/log: unable to open supervise/ok: file does not exist
imap4/log: unable to open supervise/ok: file does not exist
imap4-ssl/log: unable to open supervise/ok: file does not exist
pop3/log: unable to open supervise/ok: file does not exist
pop3-ssl/log: unable to open supervise/ok: file does not exist
send/log: unable to open supervise/ok: file does not exist
smtp/log: unable to open supervise/ok: file does not exist
spamd/log: unable to open supervise/ok: file does not exist
submission/log: unable to open supervise/ok: file does not exist
Starting qmail-toaster: svscan.
[root@mail qtms-install]# qmailctl stat
authlib: up (pid 32435) 21 seconds
clamd: up (pid 32393) 21 seconds
imap4: up (pid 32429) 21 seconds
imap4-ssl: up (pid 32387) 21 seconds
pop3: up (pid 32440) 21 seconds
pop3-ssl: up (pid 32396) 21 seconds
send: up (pid 32404) 21 seconds
smtp: up (pid 32424) 21 seconds
spamd: up (pid 32432) 21 seconds
submission: up (pid 32433) 21 seconds
authlib/log: up (pid 32426) 21 seconds
clamd/log: up (pid 32399) 21 seconds
imap4/log: up (pid 32441) 21 seconds
imap4-ssl/log: up (pid 32389) 21 seconds
pop3/log: up (pid 32446) 21 seconds
pop3-ssl/log: up (pid 32401) 21 seconds
send/log: up (pid 32408) 21 seconds
smtp/log: up (pid 32428) 21 seconds
spamd/log: up (pid 32425) 21 seconds
submission/log: up (pid 32434) 21 seconds
[root@mail qtms-install]# qmailctl queue
messages in queue: 4
messages in queue but not yet preprocessed: 0
5 Jan 2010 00:30:47 GMT #40094 1659 <anonymous@foxitsoftware.com>
remote root@foxitsoftware.com
5 Jan 2010 00:30:47 GMT #41983 1124 <anonymous@foxitsoftware.com>
remote root@foxitsoftware.com
5 Jan 2010 00:30:47 GMT #39871 1659 <anonymous@foxitsoftware.com>
remote root@foxitsoftware.com
5 Jan 2010 00:30:47 GMT #41439 1657 <anonymous@foxitsoftware.com>
remote root@foxitsoftware.com
[root@mail control]# cat smtpgreeting
mail.foxitsoftware.com - Welcome to Qmail Toaster Ver. 1.3 SMTP Server
添加一个自己邮件的域名Add a domain
/home/vpopmail/bin/vadddomain your-domain.com <postmaster-password>
Add a user: /home/vpopmail/bin/vadduser you@your-domain.com <your-password>
Edit /etc/php.ini and set register_globals = On service httpd restart Bring up your browser and go to: http://www.your-domain.com/admin-toaster/ Username: admin Password: toaster Change your password . . .
Edit /etc/php.ini and set register_globals = Off service httpd restart Check your mail server: http://www.your-domain.com/webmail login with your full email address and your password Send yourself an email - should show right away Send an email to yourself if you have another address Go to your other email account and reply to the message you sent
If Isoqlog doesn't show right away, do this: sh /usr/share/toaster/isoqlog/bin/cron.sh