Commit 7d89f56a authored by tbrehm's avatar tbrehm
Browse files

- Added support for openSUSE 11.0

parent f6896b42
Installation
-----------
It is recommended to use a clean (fresh) OpenSUSE installatiom where you selected to install just the minimal packages. A Gnome or KDE desktop is not needed and will just slow down the server. Then follow the steps below to setup your server with ISPConfig 3:
Install some basic packes and the compilers that we need later
yast2 -i findutils readline libgcc glibc-devel findutils-locate gcc flex lynx compat-readline4 db-devel wget gcc-c++ make vim telnet cron iptables iputils man man-pages
1) Install Postfix, Courier, Saslauthd, MySQL, phpMyAdmin with the following command line (on one line!):
yast2 -i postfix postfix-mysql mysql mysql-client phpMyAdmin courier-imap courier-authlib courier-authlib-mysql python cron cyrus-sasl cyrus-sasl-crammd5 cyrus-sasl-digestmd5 cyrus-sasl-gssapi cyrus-sasl-otp cyrus-sasl-plain cyrus-sasl-saslauthd libmysqlclient-devel
chkconfig --add mysql
/etc/init.d/mysql start
chkconfig --add postfix
/etc/init.d/postfix start
chkconfig --add saslauthd
/etc/init.d/saslauthd start
chkconfig --add saslauthd
/etc/init.d/saslauthd start
chkconfig --add fam
chkconfig --add courier-authdaemon
chkconfig --add courier-pop
chkconfig --add courier-imap
/etc/init.d/courier-pop start
/etc/init.d/courier-imap start
chkconfig --add courier-pop-ssl
chkconfig --add courier-imap-ssl
/etc/init.d/courier-pop-ssl start
/etc/init.d/courier-imap-ssl start
cd /tmp
wget http://download.opensuse.org/repositories/server:/mail/openSUSE_11.0/i586/getmail-4.7.6-1.4.i586.rpm
rpm -i getmail-4.7.6-1.4.i586.rpm
// Warnings like "warning: getmail-4.7.6-1.4.i586.rpm: Header V3 DSA signature: NOKEY, key ID 367fe7fc" can be ignored.
// Install maildrop
rpm --force -i http://download.opensuse.org/repositories/home%3A/cboltz/openSUSE_10.3/i586/maildrop-2.0.3-16.1.i586.rpm
// Install pam_mysql
yast2 -i pam-devel
cd /tmp
wget http://heanet.dl.sourceforge.net/sourceforge/pam-mysql/pam_mysql-0.7RC1.tar.gz
tar xvfz pam_mysql-0.7RC1.tar.gz
cd pam_mysql-0.7RC1
./configure
make
make install
rm -rf pam_mysql-0.7RC1
rm pam_mysql-0.7RC1.tar.gz
// Set the mysql database password:
mysqladmin -u root password yourrootsqlpassword
mysqladmin -h ispconfig.local -u root password yourrootsqlpassword
2) Install Amavisd-new, Spamassassin and Clamav (1 line!):
yast2 -i amavisd-new clamav clamav-db zoo unzip unrar bzip2 unarj perl-DBD-mysql
chkconfig --add amavis
chkconfig --add clamd
/etc/init.d/amavis start
/etc/init.d/clamd start
3) Install PHP5 modules (1 line!):
yast2 -i php5-bcmath php5-bz2 php5-calendar php5-ctype php5-curl php5-dbase php5-dom php5-ftp php5-gd php5-gettext php5-gmp php5-iconv php5-imap php5-ldap php5-mbstring php5-mcrypt php5-mysql php5-ncurses 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
Then run the following to enable the Apache modules:
a2enmod suexec
a2enmod rewrite
a2enmod ssl
chkconfig --add apache2
/etc/init.d/apache2 start
4) Install pure-ftpd and quota
yast2 -i pure-ftpd quota
// The current pure-ftpd package from SuSE is unstable and segfaults when a file is uploaded,
// we will replace it with a manually compiled package now:
cd /tmp
wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.21.tar.gz
tar xvfz pure-ftpd-1.0.21.tar.gz
cd pure-ftpd-1.0.21/
./configure --sysconfdir=/etc/pure-ftpd --with-everything --with-mysql
make
make install
mv /usr/sbin/pure-ftpd /usr/sbin/pure-ftpd.suse
ln -s /usr/local/sbin/pure-ftpd /usr/sbin/pure-ftpd
rm -rf pure-ftpd-1.0.21
rm -f pure-ftpd-1.0.21.tar.gz
chkconfig --add pure-ftpd
/etc/init.d/pure-ftpd start
5) Install mydns
cd /tmp
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/server:/dns/SUSE_Factory/i586/mydns-mysql-1.1.0-3.72.i586.rpm
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/server:/dns/SUSE_Factory/i586/mydns-1.1.0-3.72.i586.rpm
rpm -i mydns*.rpm
rm -rf /tmp/mydns*
chkconfig --add mydns
6) Install vlogger and webalizer
cd /tmp
wget http://n0rp.chemlab.org/vlogger/vlogger-1.3.tar.gz
tar xvfz vlogger-1.3.tar.gz
mv vlogger-1.3/vlogger /usr/sbin/
rm -rf vlogger*
yast2 -i webalizer perl-DateManip
7) Install ISPConfig 3
There are two possile scenarios, but not both:
7.1) Install the latest released version
7.2) Install directly from SVN
apt-get install php5-cli
7.1) Installation of beta 3 from tar.gz
cd /tmp
wget http://www.ispconfig.org/downloads/ISPConfig-3.0.0.6-beta.tar.gz
tar xvfz ISPConfig-3.0.0.6-beta.tar.gz
cd ispconfig3_install/install/
7.2) Installation from SVN
apt-get install subversion
cd /tmp
svn export svn://svn.ispconfig.org/ispconfig3/trunk/
cd trunk/install
7.1+7.2) Now proceed with the ISPConfig installation.
Now start the installation process by executing:
php -q install.php
The installer will configure all services like postfix, sasl, courier, etc. for you. A manual setup as required for ISPConfig 2 (perfect setup guides) is not nescessary. To login to the ISPConfig controlpanel, open the following URL in your browser (replace the IP to match your settings!):
http://192.168.0.100:8080/
the default login is:
user: admin
password: admin
In case you get a permission denied error from apache, please restart the apache webserver process.
Optional:
Install a webbased FTP Client
apt-get install squirrelmail
ln -s /usr/share/squirrelmail/ /var/www/webmail
Access squirrelmail:
http://192.168.0.100/webmail
To configure squirrelmail, run:
/usr/sbin/squirrelmail-configure
----------------------------------------------------------------------------------------------------------
Hints:
debian 4.0 under openvz:
VPSID=101
for CAP in CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE
do
vzctl set $VPSID --capability ${CAP}:on --save
done
----------------------------------------------------------------------------------------------------------
Installing Jailkit:
apt-get install build-essential autoconf automake1.9 libtool flex bison
cd /tmp
wget http://olivier.sessink.nl/jailkit/jailkit-2.5.tar.gz
tar xvfz jailkit-2.5.tar.gz
cd jailkit-2.5
./configure
make
make install
rm -rf jailkit-2.5*
<?php
//*** OpenSUSE 11.0 default settings
//* Main
$conf['language'] = 'en';
$conf['distname'] = 'opensuse110';
$conf['hostname'] = 'server1.example.com'; // Full hostname
$conf['ispconfig_install_dir'] = '/usr/local/ispconfig';
$conf['ispconfig_config_dir'] = '/usr/local/ispconfig';
$conf['ispconfig_log_priority'] = 2; // 0 = Debug, 1 = Warning, 2 = Error
$conf['server_id'] = 1;
$conf['init_scripts'] = '/etc/init.d';
$conf['runlevel'] = '/etc';
$conf['shells'] = '/etc/shells';
$conf['cron_tab'] = '/var/spool/cron/tabs/root';
$conf['pam'] = '/etc/pam.d';
//* MySQL
$conf['mysql']['init_script'] = 'mysql';
$conf['mysql']['host'] = 'localhost';
$conf['mysql']['ip'] = '127.0.0.1';
$conf['mysql']['port'] = '3306';
$conf['mysql']['database'] = 'dbispconfig';
$conf['mysql']['admin_user'] = 'root';
$conf['mysql']['admin_password'] = '';
$conf['mysql']['ispconfig_user'] = 'ispconfig';
$conf['mysql']['ispconfig_password'] = md5 (uniqid (rand()));
//* Apache
$conf['apache']['user'] = 'wwwrun';
$conf['apache']['group'] = 'www';
$conf['apache']['init_script'] = 'apache2';
$conf['apache']['version'] = '2.2';
$conf['apache']['vhost_conf_dir'] = '/etc/apache2/sites-available';
$conf['apache']['vhost_conf_enabled_dir'] = '/etc/apache2/sites-enabled';
$conf['apache']['vhost_port'] = '8080';
//* Postfix
$conf['postfix']['config_dir'] = '/etc/postfix';
$conf['postfix']['init_script'] = 'postfix';
$conf['postfix']['user'] = 'postfix';
$conf['postfix']['group'] = 'postfix';
$conf['postfix']['vmail_userid'] = '5000';
$conf['postfix']['vmail_username'] = 'vmail';
$conf['postfix']['vmail_groupid'] = '5000';
$conf['postfix']['vmail_groupname'] = 'vmail';
$conf['postfix']['vmail_mailbox_base'] = '/home/vmail';
//* Getmail
$conf['getmail']['config_dir'] = '/etc/getmail';
$conf['getmail']['program'] = '/usr/bin/getmail';
//* Courier
$conf['courier']['config_dir'] = '/etc/authlib';
$conf['courier']['courier-authdaemon'] = 'courier-authdaemon';
$conf['courier']['courier-imap'] = 'courier-imap';
$conf['courier']['courier-imap-ssl'] = 'courier-imap-ssl';
$conf['courier']['courier-pop'] = 'courier-pop';
$conf['courier']['courier-pop-ssl'] = 'courier-pop-ssl';
//* SASL
$conf['saslauthd']['config'] = '/etc/default/saslauthd';
$conf['saslauthd']['init_script'] = 'saslauthd';
//* Amavisd
$conf['amavis']['config_dir'] = '/etc/amavis';
$conf['amavis']['init_script'] = 'amavis';
//* ClamAV
$conf['clamav']['init_script'] = 'clamd';
//* Pureftpd
$conf['pureftpd']['config_dir'] = '/etc/pure-ftpd';
$conf['pureftpd']['init_script'] = 'pure-ftpd';
//* MyDNS
$conf['mydns']['config_dir'] = '/etc';
$conf['mydns']['init_script'] = 'mydns';
//* Jailkit
$conf['jailkit']['config_dir'] = '/etc/jailkit';
$conf['jailkit']['jk_init'] = 'jk_init.ini';
$conf['jailkit']['jk_chrootsh'] = 'jk_chrootsh.ini';
?>
\ No newline at end of file
This diff is collapsed.
......@@ -213,7 +213,7 @@ if($install_mode == 'Standard') {
system($conf['init_scripts'].'/'.$conf['courier']['courier-pop-ssl'].' restart');
system($conf['init_scripts'].'/'.$conf['apache']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['pureftpd']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['mydns']['init_script'].' restart');
system($conf['init_scripts'].'/'.$conf['mydns']['init_script'].' restart &> /dev/null');
}else{
......
......@@ -74,9 +74,20 @@ function get_distname() {
}
}
//** OpenSuSE
elseif(file_exists("/etc/SuSE-release")) {
if(stristr(file_get_contents('/etc/SuSE-release'),'11.0')) {
$distname = 'opensuse110';
swriteln("Operating System: openSUSE 11.0 or compatible\n");
}
}
//** Redhat
elseif(file_exists("/etc/redhat_release")) {
} else {
die('unrecognized linux distribution');
}
return $distname;
......
......@@ -187,7 +187,7 @@ class installer_base {
//** writes postfix configuration files
private function process_postfix_config($configfile)
public function process_postfix_config($configfile)
{
global $conf;
......@@ -329,12 +329,6 @@ class installer_base {
caselog($command." &> /dev/null", __FILE__, __LINE__, 'EXECUTED: '.$command, 'Failed to execute the command '.$command);
}
// TODO: Change the master.cf file
/*
Add:
maildrop unix - n n - - pipe
flags=R user=vmail argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}
*/
if(!stristr($options,'dont-create-certs')) {
//* Create the SSL certificate
$command = 'cd '.$config_dir.'; '
......@@ -386,7 +380,7 @@ class installer_base {
}
function configure_saslauthd() {
public function configure_saslauthd() {
global $conf;
......@@ -478,7 +472,7 @@ class installer_base {
wf($configfile, $content);
}
function configure_amavis() {
public function configure_amavis() {
global $conf;
// amavisd user config file
......@@ -513,11 +507,14 @@ class installer_base {
// Append the configuration for amavisd to the master.cf file
if(is_file($conf["postfix"]["config_dir"].'/master.cf')) copy($conf["postfix"]["config_dir"].'/master.cf',$conf["postfix"]["config_dir"].'/master.cf~');
$content = rf("tpl/master_cf_amavis.master");
$content = rf($conf["postfix"]["config_dir"].'/master.cf');
// Only add the content if we had not addded it before
if(!stristr($content,"127.0.0.1:10025")) {
unset($content);
$content = rf("tpl/master_cf_amavis.master");
af($conf["postfix"]["config_dir"].'/master.cf',$content);
}
unset($content);
// Add the clamav user to the amavis group
exec('adduser clamav amavis');
......
This diff is collapsed.
############################################################
# #
# Configuration file for pure-ftpd wrappers #
# #
############################################################
# If you want to run Pure-FTPd with this configuration
# instead of command-line options, please run the
# following command :
#
# /usr/sbin/pure-config.pl /usr/etc/pure-ftpd.conf
#
# Please don't forget to have a look at documentation at
# http://www.pureftpd.org/documentation.shtml for a complete list of
# options.
# Cage in every user in his home directory
ChrootEveryone yes
# If the previous option is set to "no", members of the following group
# won't be caged. Others will be. If you don't want chroot()ing anyone,
# just comment out ChrootEveryone and TrustedGID.
# TrustedGID 100
# Turn on compatibility hacks for broken clients
BrokenClientsCompatibility no
# Maximum number of simultaneous users
MaxClientsNumber 10
# Fork in background
Daemonize yes
# Maximum number of sim clients with the same IP address
MaxClientsPerIP 3
# If you want to log all client commands, set this to "yes".
# This directive can be duplicated to also log server responses.
VerboseLog no
# Allow dot-files
AllowDotFiles yes
# List dot-files even when the client doesn't send "-a".
DisplayDotFiles yes
# Don't allow authenticated users - have a public anonymous FTP only.
AnonymousOnly no
# Disallow anonymous connections. Only allow authenticated users.
NoAnonymous yes
# Syslog facility (auth, authpriv, daemon, ftp, security, user, local*)
# The default facility is "ftp". "none" disables logging.
SyslogFacility ftp
# Display fortune cookies
# FortunesFile /usr/share/fortune/zippy
# Don't resolve host names in log files. Logs are less verbose, but
# it uses less bandwidth. Set this to "yes" on very busy servers or
# if you don't have a working DNS.
DontResolve yes
# Maximum idle time in minutes (default = 15 minutes)
MaxIdleTime 15
# LDAP configuration file (see README.LDAP)
# LDAPConfigFile /etc/pure-ftpd/pureftpd-ldap.conf
# MySQL configuration file (see README.MySQL)
MySQLConfigFile /etc/pure-ftpd/db/mysql.conf
# Postgres configuration file (see README.PGSQL)
# PGSQLConfigFile /etc/pure-ftpd/pureftpd-pgsql.conf
# PureDB user database (see README.Virtual-Users)
# PureDB /etc/pure-ftpd/pureftpd.pdb
# Path to pure-authd socket (see README.Authentication-Modules)
# ExtAuth /var/run/ftpd.sock
# If you want to enable PAM authentication, uncomment the following line
# PAMAuthentication yes
# If you want simple Unix (/etc/passwd) authentication, uncomment this
# UnixAuthentication yes
# Please note that LDAPConfigFile, MySQLConfigFile, PAMAuthentication and
# UnixAuthentication can be used only once, but they can be combined
# together. For instance, if you use MySQLConfigFile, then UnixAuthentication,
# the SQL server will be asked. If the SQL authentication fails because the
# user wasn't found, another try # will be done with /etc/passwd and
# /etc/shadow. If the SQL authentication fails because the password was wrong,
# the authentication chain stops here. Authentication methods are chained in
# the order they are given.
# 'ls' recursion limits. The first argument is the maximum number of
# files to be displayed. The second one is the max subdirectories depth
LimitRecursion 2000 8
# Are anonymous users allowed to create new directories ?
AnonymousCanCreateDirs no
# If the system is more loaded than the following value,
# anonymous users aren't allowed to download.
MaxLoad 4
# Port range for passive connections replies. - for firewalling.
# PassivePortRange 30000 50000
# Force an IP address in PASV/EPSV/SPSV replies. - for NAT.
# Symbolic host names are also accepted for gateways with dynamic IP
# addresses.
# ForcePassiveIP 192.168.0.1
# Upload/download ratio for anonymous users.
# AnonymousRatio 1 10
# Upload/download ratio for all users.
# This directive superscedes the previous one.
# UserRatio 1 10
# Disallow downloading of files owned by "ftp", ie.
# files that were uploaded but not validated by a local admin.
AntiWarez yes
# IP address/port to listen to (default=all IP and port 21).
# Bind 127.0.0.1,21
# Maximum bandwidth for anonymous users in KB/s
# AnonymousBandwidth 8
# Maximum bandwidth for *all* users (including anonymous) in KB/s
# Use AnonymousBandwidth *or* UserBandwidth, both makes no sense.
# UserBandwidth 8
# File creation mask. <umask for files>:<umask for dirs> .
# 177:077 if you feel paranoid.
Umask 177:077
# Minimum UID for an authenticated user to log in.
MinUID 40
# Allow FXP transfers for authenticated users.