The Perfect Server - OpenSUSE 11.3 x86_64 [ISPConfig 3] - Page 4

8 Install Postfix, Dovecot, MySQL


yast2 -i postfix postfix-mysql mysql mysql-community-server mysql-client python libmysqlclient-devel dovecot12 dovecot12-backend-mysql pwgen cron

Open /etc/postfix/

vi /etc/postfix/

... and uncomment the following line:

tlsmgr    unix  -       -       n       1000?   1       tlsmgr

Create the following symlink:

ln -s /usr/lib64/dovecot/modules /usr/lib/dovecot  

Start MySQL, Postfix, and Dovecot and enable the services to be started at boot time.

chkconfig --add mysql
/etc/init.d/mysql start

chkconfig --add postfix
/etc/init.d/postfix start

chkconfig --add dovecot
/etc/init.d/dovecot start

You might see the following Dovecot warning which you can safely ignore:

Starting dovecot Warning: There is no way to login to this server: disable_plaintext_auth=yes, ssl=no, no non-plaintext auth mechanisms.
If you have trouble with authentication failures,
enable auth_debug setting. See
This message goes away after the first successful login.

Now I install the getmail rpm package which is not available from the OpenSUSE main repositories.

rpm -ivh

Warnings like warning: /var/tmp/rpm-tmp.OW27Dr: Header V3 DSA signature: NOKEY, key ID 367fe7fc can be ignored.

To secure the MySQL installation, run:


Now you will be asked several questions:

server1:~ # mysql_secure_installation


In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n]
 <-- Y
New password: <-- yourrootsqlpassword
Re-enter new password: <-- yourrootsqlpassword
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n]
 <-- Y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]
 <-- Y
 ... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]
 <-- Y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n]
 <-- Y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

server1:~ #

Now your MySQL setup should be secured.


9 Amavisd-new, Spamassassin And Clamav

Install Amavisd-new, Spamassassin and Clamav antivirus. Run

yast2 -i amavisd-new clamav clamav-db zoo unzip unrar bzip2 unarj perl-DBD-mysql

Open /etc/amavisd.conf...

vi /etc/amavisd.conf

... and add the $myhostname line with your correct hostname below the $mydomain line:

$mydomain = '';   # a convenient default for other settings
$myhostname = "server1.$mydomain";

Then create a symlink from /var/run/clamav/clamd to /var/lib/clamav/clamd-socket:

mkdir -p /var/run/clamav
ln -s /var/lib/clamav/clamd-socket /var/run/clamav/clamd

To enable the services, run:

chkconfig --add amavis
chkconfig --add clamd
/etc/init.d/amavis start
/etc/init.d/clamd start


10 Install The Apache 2 Webserver And PHP5

Install Apache2 and suphp. Run:

yast2 -i apache2 apache2-mod_fcgid

Install PHP5:

yast2 -i php5-bcmath php5-bz2 php5-calendar php5-ctype php5-curl php5-dom php5-ftp php5-gd php5-gettext php5-gmp php5-iconv php5-imap php5-ldap php5-mbstring php5-mcrypt php5-mysql php5-odbc php5-openssl php5-pcntl php5-pgsql php5-posix php5-shmop php5-snmp php5-soap php5-sockets php5-sqlite php5-sysvsem php5-tokenizer php5-wddx php5-xmlrpc php5-xsl php5-zlib php5-exif php5-fastcgi php5-pear php5-sysvmsg php5-sysvshm ImageMagick curl apache2-mod_php5
rpm -ivh

Then run these commands to enable the Apache modules:

a2enmod suexec
a2enmod rewrite
a2enmod ssl
a2enmod actions
a2enmod suphp
a2enmod fcgid
chown root:www /usr/sbin/suexec2
chmod 4755 /usr/sbin/suexec2

And start Apache:

chkconfig --add apache2
/etc/init.d/apache2 start

Install phpMyAdmin:

rpm -ivh

Warnings like warning: /var/tmp/rpm-tmp.kRRPEK: Header V3 DSA signature: NOKEY, key ID ddcd7f1a can be ignored.


11 Install PureFTPd

Install the pure-ftpd FTP daemon. Run:

yast2 -i pure-ftpd quota

chkconfig --add pure-ftpd
/etc/init.d/pure-ftpd start

Share this page:

Suggested articles

5 Comment(s)

Add comment


By: krystian


 in one of the steps package name[version] has changed, so when installing myphpadmin try this:

  rpm -ivh

 apart from that everything seems fine till now :)

By: gswallow

You know a step-by-step to find the installs and what to do with each would be beneficial. Having to install through steps or a script that is dated is more trouble than it's worth: 

rpm -ivh

By: Jaca

rpm -ivh

By: Steve

The link to suphp should now be

rpm -ivh

By: Anonymous

rpm -ivh


as of 1/20/2010