Installing webmin on Centos 5.x
For CentOS 5.1 -- First we install some dependencies. (This is already present on CentOS 5.2 and CentOS 5.3.)
yum -y install perl-Net-SSLeay
step 1: webmin
Install the system, using the link at http://www.webmin.com/download.html
cd /usr/src
wget <a href="http://superb-east.dl.sourceforge.net/sourceforge/webadmin/webmin-1.450-1.noarch.rpm">http://superb-east.dl.sourceforge.net/sourceforge/webadmin/webmin-1.450-1.noarch.rpm</a>
rpm -i webmin-1.450-1.noarch.rpm
Then you can start in your browser (note: https: ) at:
https://localhost:10000
Webmin permits login from the root user as well as anyone who has sudo privilege. To permit logging into webmin with your username and password, give yourself permission to execute the sudo command by using the visudo command (do not edit the file /etc/sudoers directly) and un-comment the line:
%wheel ALL=(ALL) ALL
step 2: usermin
You might also want usermin... for the latest version, check:
<a href="http://www.webmin.com/udownload.html">http://www.webmin.com/udownload.html</a>
For example, to install:
cd /usr/src
wget http://prdownloads.sourceforge.net/webadmin/usermin-1.360-1.noarch.rpm
rpm -Uvh usermin-1.360-1.noarch.rpm
Then point your browser to
https://localhost:20000
step 3: virtualmin
For managing virtual domains, there are both GPL and commercial version of Virtualmin. For many sites, the key difference will be that the paid version includes the ability to manage spam and email antivirus settings on a per-domain, per-user level, whereas the GPL doesn't.
<a href="http://www.virtualmin.com/">http://www.virtualmin.com/</a>
Download the install script and run it. Note, the installer for Centos 5 misses one permission setting. Users attempting to retrieve POP3 email can't login. If you manually connect to port 110 and login, you will see the error as follows:
$ telnet mailserver 110
Trying 192.168.1.20...
Connected to mailserver.domain.
Escape character is '^]'.
+OK Dovecot ready.
user user.domain
+OK
pass password
+OK Logged in.
-ERR [IN-USE] Couldn't open INBOX: Internal error occurred.
Refer to server log for more information.
In the file /var/log/maillog you will see:
Feb 23 05:01:02 host dovecot: POP3(user.domain): mkdir(/var/lib/dovecot/index/user.domain/.INBOX) failed: Permission denied
Feb 23 05:01:02 host dovecot: POP3(user.domain): mkdir(/var/lib/dovecot/control/user.domain/.INBOX) failed: Permission denied
Feb 23 05:01:02 host dovecot: POP3(user.domain): mkdir(/var/lib/dovecot/index/user.domain/.INBOX) failed: Permission denied
Feb 23 05:01:02 host dovecot: POP3(user.domain): mkdir(/var/lib/dovecot/control/user.domain/.INBOX) failed: Permission denied
Feb 23 05:01:02 host dovecot: POP3(user.domain): Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2009-02-23 05:01:02]
Feb 23 05:01:02 host dovecot: POP3(user.domain): Couldn't open INBOX top=0/0, retr=0/0, del=0/0, size=0
To solve this, as root:
chmod 755 /var/lib/dovecot
chmod 777 /var/lib/dovecot/index /var/lib/dovecot/control
step 4: configuring spamassassin
Once Webmin is installed, spamassassin is very easy to turn on -- there
is a button that will automatically create the correct entries in /etc/procmailrc
... the one missing link is that, by default, Postfix doesn't use that
file. You can either manually add this line in /etc/postfix/main.cf:
mailbox_command = /usr/bin/procmail
or in Webmin, on the Local Delivery page of Postfix, set the parameter:
External command to use instead of mailbox delivery
to be:
/usr/bin/procmail
And that's all there is to getting SpamAssassin running.
step 5: change runlevel to avoid loading X
In your /etc/inittab, change the default runlevel from 5 to 3, so X won't load. That means no graphical login -- and a bunch of saved memory, if you're running a server instead of workstation.