The Perfect Server - OpenSUSE 12.3 x86_64 (Apache2, Dovecot, ISPConfig 3) - Page 4
15 Install Jailkit
Jailkit can be installed like this:
zypper install http://download.opensuse.org/repositories/security/openSUSE_12.3/x86_64/jailkit-2.13-1.4.x86_64.rpm
16 Synchronize The System Clock
If you want to have the system clock synchronized with an NTP server do the following:
zypper install xntp
Then add system startup links for ntp and start ntp:
systemctl enable ntp.service
systemctl start ntp.service
17 Install rkhunter
rkhunter can be installed as follows:
zypper install rkhunter
18 Install SquirrelMail
To install the SquirrelMail webmail client, run:
zypper install squirrelmail-beta
Next we create the aliases /webmail and /squirrelmail right at the beginning of /etc/apache2/conf.d/squirrelmail.conf so that SquirrelMail can be accessed from any vhost (e.g. http://www.example.com/webmail or http://www.example.com/squirrelmail):
vi /etc/apache2/conf.d/squirrelmail.conf
| Alias /squirrelmail /srv/www/htdocs/squirrelmail Alias /webmail /srv/www/htdocs/squirrelmail [...] | 
Next we create the directory /srv/www/htdocs/squirrelmail/data and give it sufficient permissions so that the www group can write to it:
mkdir /srv/www/htdocs/squirrelmail/data
chown root:www /srv/www/htdocs/squirrelmail/data
chmod 770 /srv/www/htdocs/squirrelmail/data
Again comment out this line
vi /etc/apache2/conf.d/mod_suphp.conf
[...]
DirectoryIndex index.php5
<Location />
# suPHP_AddHandler application/x-httpd-php
[...]
Then restart Apache:
systemctl restart apache2.service
Then configure SquirrelMail:
/srv/www/htdocs/squirrelmail/config/conf.pl
We must tell SquirrelMail that we are using Dovecot:
WARNING:
   The file "config/config.php" was found, but it is for
   an older version of SquirrelMail. It is possible to still
   read the defaults from this file but be warned that many
   preferences change between versions. It is recommended that
   you start with a clean config.php for each upgrade that you
   do. To do this, just move config/config.php out of the way.
 
 Continue loading with the old config.php [y/N]? <-- y
 
 Do you want me to stop warning you [y/N]? <-- y
 
 SquirrelMail Configuration : Read: config.php (1.5.0)
 ---------------------------------------------------------
 Main Menu --
 1.  Organization Preferences
 2.  Server Settings
 3.  Folder Defaults
 4.  General Options
 5.  User Interface
 6.  Address Books
 7.  Message of the Day (MOTD)
 8.  Plugins
 9.  Database
 10. Language settings
 11. Tweaks
 
 D.  Set pre-defined settings for specific IMAP servers
 
 C   Turn color on
 S   Save data
 Q   Quit
 
 Command >> <-- D
 
 
 SquirrelMail Configuration : Read: config.php
 ---------------------------------------------------------
 While we have been building SquirrelMail, we have discovered some
 preferences that work better with some servers that don't work so
 well with others.  If you select your IMAP server, this option will
 set some pre-defined settings for that server.
 
 Please note that you will still need to go through and make sure
 everything is correct.  This does not change everything.  There are
 only a few settings that this will change.
 
 Please select your IMAP server:
     bincimap    = Binc IMAP server
     courier     = Courier IMAP server
     cyrus       = Cyrus IMAP server
     dovecot     = Dovecot Secure IMAP server
     exchange    = Microsoft Exchange IMAP server
     hmailserver = hMailServer
     macosx      = Mac OS X Mailserver
     mercury32   = Mercury/32
     uw          = University of Washington's IMAP server
     gmail       = IMAP access to Google mail (Gmail) accounts
 
     quit        = Do not change anything
 
 Command >> <-- dovecot
 
 
 SquirrelMail Configuration : Read: config.php
 ---------------------------------------------------------
 While we have been building SquirrelMail, we have discovered some
 preferences that work better with some servers that don't work so
 well with others.  If you select your IMAP server, this option will
 set some pre-defined settings for that server.
 
 Please note that you will still need to go through and make sure
 everything is correct.  This does not change everything.  There are
 only a few settings that this will change.
 
 Please select your IMAP server:
     bincimap    = Binc IMAP server
     courier     = Courier IMAP server
     cyrus       = Cyrus IMAP server
     dovecot     = Dovecot Secure IMAP server
     exchange    = Microsoft Exchange IMAP server
     hmailserver = hMailServer
     macosx      = Mac OS X Mailserver
     mercury32   = Mercury/32
     uw          = University of Washington's IMAP server
     gmail       = IMAP access to Google mail (Gmail) accounts
 
     quit        = Do not change anything
 
 Command >> dovecot
 
               imap_server_type = dovecot
          default_folder_prefix = <none>
                   trash_folder = Trash
                    sent_folder = Sent
                   draft_folder = Drafts
             show_prefix_option = false
           default_sub_of_inbox = false
 show_contain_subfolders_option = false
             optional_delimiter = detect
                  delete_folder = false
       force_username_lowercase = true
 
 Press enter to continue... <-- ENTER
 
 
 SquirrelMail Configuration : Read: config.php (1.5.0)
 ---------------------------------------------------------
 Main Menu --
 1.  Organization Preferences
 2.  Server Settings
 3.  Folder Defaults
 4.  General Options
 5.  User Interface
 6.  Address Books
 7.  Message of the Day (MOTD)
 8.  Plugins
 9.  Database
 10. Language settings
 11. Tweaks
 
 D.  Set pre-defined settings for specific IMAP servers
 
 C   Turn color on
 S   Save data
 Q   Quit
 
 Command >> <-- S
 
 
 SquirrelMail Configuration : Read: config.php (1.5.0)
 ---------------------------------------------------------
 Main Menu --
 1.  Organization Preferences
 2.  Server Settings
 3.  Folder Defaults
 4.  General Options
 5.  User Interface
 6.  Address Books
 7.  Message of the Day (MOTD)
 8.  Plugins
 9.  Database
 10. Language settings
 11. Tweaks
 
 D.  Set pre-defined settings for specific IMAP servers
 
 C   Turn color on
 S   Save data
 Q   Quit
 
 Command >> S
 
 Data saved in config.php
 
 
 
 Done activating plugins; registration data saved in plugin_hooks.php
 
 Press enter to continue... <-- ENTER
 
 
 SquirrelMail Configuration : Read: config.php (1.5.0)
 ---------------------------------------------------------
 Main Menu --
 1.  Organization Preferences
 2.  Server Settings
 3.  Folder Defaults
 4.  General Options
 5.  User Interface
 6.  Address Books
 7.  Message of the Day (MOTD)
 8.  Plugins
 9.  Database
 10. Language settings
 11. Tweaks
 
 D.  Set pre-defined settings for specific IMAP servers
 
 C   Turn color on
 S   Save data
 Q   Quit
 
 Command >> <-- Q
After you have created a website in ISPConfig, you can access SquirrelMail using the /webmail or /squirrelmail aliases:
19 ISPConfig 3
Before we install ISPConfig 3, make sure that the /var/vmail/ directory exists:
mkdir /var/vmail/
Download the current ISPConfig 3 version and install it. The ISPConfig installer will configure all services like Postfix, Dovecot, etc. for you. A manual setup as required for ISPConfig 2 is not necessary anymore.
You now also have the possibility to let the installer create an SSL vhost for the ISPConfig control panel, so that ISPConfig can be accessed using https:// instead of http://. To achieve this, just press ENTER when you see this question: Do you want a secure (SSL) connection to the ISPConfig web interface (y,n) [y]:.
cd /tmp
wget http://www.ispconfig.org/downloads/ISPConfig-3.0.5.4b.tar.gz
tar xvfz ISPConfig-3.0.5.4b.tar.gz
cd ispconfig3_install/install/
Now start the installation process by executing:
php -q install.php
server1:/tmp/ispconfig3_install/install # php -q install.php
 
 
 --------------------------------------------------------------------------------
  _____ ___________   _____              __ _         ____
 |_   _/  ___| ___ \ /  __ \            / _(_)       /__  \
   | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _    _/ /
   | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |  |_ |
  _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| | ___\ \
  \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, | \____/
                                               __/ |
                                              |___/
 --------------------------------------------------------------------------------
 
 
 >> Initial configuration
 
 Operating System: openSUSE or compatible, unknown version.
 
     Following will be a few questions for primary configuration so be careful.
     Default values are in [brackets] and can be accepted with <ENTER>.
     Tap in "quit" (without the quotes) to stop the installer.
 
 
 Select language (en,de) [en]: <-- ENTER
 
 Installation mode (standard,expert) [standard]: <-- ENTER
 
 Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [server1.example.com]: <-- ENTER
 
 MySQL server hostname [localhost]: <-- ENTER
 
 MySQL root username [root]: <-- ENTER
 
 MySQL root password []: <-- yourrootsqlpassword
 
 MySQL database to create [dbispconfig]: <-- ENTER
 
 MySQL charset [utf8]: <-- ENTER
 
 Generating a 2048 bit RSA private key
 .......................................................+++
 .................................................+++
 writing new private key to 'smtpd.key'
 -----
 You are about to be asked to enter information that will be incorporated
 into your certificate request.
 What you are about to enter is what is called a Distinguished Name or a DN.
 There are quite a few fields but you can leave some blank
 For some fields there will be a default value,
 If you enter '.', the field will be left blank.
 -----
 Country Name (2 letter code) [AU]: <-- ENTER
 State or Province Name (full name) [Some-State]: <-- ENTER
 Locality Name (eg, city) []: <-- ENTER
 Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- ENTER
 Organizational Unit Name (eg, section) []: <-- ENTER
 Common Name (eg, YOUR name) []: <-- ENTER
 Email Address []: <-- ENTER
 Configuring Jailkit
 Configuring Dovecot
 Configuring Spamassassin
 Configuring Amavisd
 Configuring Getmail
 Configuring Pureftpd
 Configuring BIND
 Configuring Apache
 Configuring Vlogger
 Configuring Apps vhost
 Configuring Bastille Firewall
 Configuring Fail2ban
 Installing ISPConfig
 ISPConfig Port [8080]: <-- ENTER
 
 Do you want a secure (SSL) connection to the ISPConfig web interface (y,n) [y]: <-- ENTER
 
 Generating RSA private key, 4096 bit long modulus
 ........++
 .....................................++
 e is 65537 (0x10001)
 You are about to be asked to enter information that will be incorporated
 into your certificate request.
 What you are about to enter is what is called a Distinguished Name or a DN.
 There are quite a few fields but you can leave some blank
 For some fields there will be a default value,
 If you enter '.', the field will be left blank.
 -----
 Country Name (2 letter code) [AU]: <-- ENTER
 State or Province Name (full name) [Some-State]: <-- ENTER
 Locality Name (eg, city) []: <-- ENTER
 Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- ENTER
 Organizational Unit Name (eg, section) []: <-- ENTER
 Common Name (eg, YOUR name) []: <-- ENTER
 Email Address []: <-- ENTER
 
 Please enter the following 'extra' attributes
 to be sent with your certificate request
 A challenge password []: <-- ENTER
 An optional company name []: <-- ENTER
 writing RSA key
 Configuring DBServer
 Installing ISPConfig crontab
 no crontab for root
 no crontab for getmail
 Restarting services ...
 redirecting to systemctl
 redirecting to systemctl
 redirecting to systemctl
 redirecting to systemctl
 redirecting to systemctl
 redirecting to systemctl
 redirecting to systemctl
 redirecting to systemctl
 Installation completed.
 server1:/tmp/ispconfig3_install/install #
Clean up the /tmp directory:
cd /tmp
rm -rf /tmp/ispconfig3_install
rm -f /tmp/ISPConfig-3-stable.tar.gz
Open /etc/suphp.conf...
vi /etc/suphp.conf
... and make sure that it contains x-httpd-suphp="php:/srv/www/cgi-bin/php" instead of x-httpd-suphp="php:/srv/www/cgi-bin/php5" towards the end of the file:
| [...] [handlers] ;Handler for php-scripts x-httpd-suphp="php:/srv/www/cgi-bin/php" [...] | 
Afterwards you can access ISPConfig 3 under http(s)://server1.example.com:8080/ or http(s)://192.168.0.100:8080/ (http or https depends on what you chose during installation). Log in with the username admin and the password admin (you should change the default password after your first login):
19.1 ISPConfig 3 Manual
In order to learn how to use ISPConfig 3, I strongly recommend to download the ISPConfig 3 Manual.
On about 300 pages, it covers the concept behind ISPConfig (admin, resellers, clients), explains how to install and update ISPConfig 3, includes a reference for all forms and form fields in ISPConfig together with examples of valid inputs, and provides tutorials for the most common tasks in ISPConfig 3. It also lines out how to make your server more secure and comes with a troubleshooting section at the end.
19.2 ISPConfig Monitor App For Android
With the ISPConfig Monitor App, you can check your server status and find out if all services are running as expected. You can check TCP and UDP ports and ping your servers. In addition to that you can use this app to request details from servers that have ISPConfig installed (please note that the minimum installed ISPConfig 3 version with support for the ISPConfig Monitor App is 3.0.3.3!); these details include everything you know from the Monitor module in the ISPConfig Control Panel (e.g. services, mail and system logs, mail queue, CPU and memory info, disk usage, quota, OS details, RKHunter log, etc.), and of course, as ISPConfig is multiserver-capable, you can check all servers that are controlled from your ISPConfig master server.
For download and usage instructions, please visit http://www.ispconfig.org/ispconfig-3/ispconfig-monitor-app-for-android/.
20 Links
- OpenSUSE: http://www.opensuse.org/
- ISPConfig: http://www.ispconfig.org/
 
					


 
  
 


