Poul Nissen
TYPO3 Cumulus Flash tag cloud by TYPO3-Macher - die TYPO3 Dienstleister (based on WP Cumulus Flash tag cloud by Roy Tanck) requires Flash Player 9 or better.
Software installation side 2
Postfix med SMTP-AUTH og TLS
Postfix er allerede installeret, så vi skal ahve installeret Cyrus-SASL nu:
yast -i cyrus-sasl cyrus-sasl-crammd5 cyrus-sasl-digestmd5 cyrus-sasl-gssapi cyrus-sasl-otp cyrus-sasl-plain cyrus-sasl-saslauthd
Så laver vi et start link til saslauthd og starter det
chkconfig --add saslauthd
/etc/init.d/saslauthd start
Bagefter laver vi certifikater til TLS:
mkdir /etc/postfix/ssl
cd /etc/postfix/ssl/
openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
chmod 600 smtpd.key
openssl req -new -key smtpd.key -out smtpd.csr
openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
openssl rsa -in smtpd.key -out smtpd.key.unencrypted
mv -f smtpd.key.unencrypted smtpd.key
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650
Næste skridt i processen konfigurerer Postfix til SMTP-AUTH og TLS
postconf -e 'mydomain = example.com'
postconf -e 'myhostname = server1.$mydomain'
postconf -e 'smtpd_sasl_local_domain ='
postconf -e 'smtpd_sasl_auth_enable = yes'
postconf -e 'smtpd_sasl_security_options = noanonymous'
postconf -e 'broken_sasl_auth_clients = yes'
postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,check_relay_domains'
postconf -e 'inet_interfaces = all'
postconf -e 'alias_maps = hash:/etc/aliases'
postconf -e 'smtpd_tls_auth_only = no'
postconf -e 'smtp_use_tls = yes'
postconf -e 'smtpd_use_tls = yes'
postconf -e 'smtp_tls_note_starttls_offer = yes'
postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key'
postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt'
postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem'
postconf -e 'smtpd_tls_loglevel = 1'
postconf -e 'smtpd_tls_received_header = yes'
postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
postconf -e 'tls_random_source = dev:/dev/urandom'
For at aktiverer TLS forbindelsen i Postfix, rediger /etc/postfix/master.cf og udkommenterer linien tlsmgr så den ligner denne:
tlsmgr unix - - n 1000? 1 tlsmgr
Genstart nu Postfix:
/etc/init.d/postfix restart
For at se SMTP-AUTH og TLS Virker rigtigt brug følgende komando:
telnet localhost 25
Efter du har etableret forbindelsen til din Postfix mail server skriv så
ehlo localhost
Hvis du ser disse linier
250-STARTTLS
og
250-AUTH
Så er alt ok

- skriv quit
Courier-IMAP/Courier-POP3
Vi bruger POP3/IMAP demonen da den har Maildir support. det er derfor vi bruger Courier-IMAP og Courier-POP3.
yast -i courier-imap fam-server courier-authlib expect tcl
efter installationen laver vi start links og starter POP3, IMAP, POP3s and IMAPs:
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
Hvis du ikke vil bruge ISPConfig, konfigurer Postfix til at afleverer emails til brugernes Maildir*:
postconf -e 'home_mailbox = Maildir/'
postconf -e 'mailbox_command ='
/etc/init.d/postfix restart
Husk ! gør ikke ovenstående hvis du ikke vil bruge ISPConfig, da ISPConfig laver de nøvendige instillinger med en procmail recept. Husk i ISPConfig under konfiguration at aktiverer MAILDIR under Management -> Server -> Settings -> EMail i ISPConfig's web interface
Apache/PHP5
Nu installere vi Apache serveren med php5:
yast2 -i apache2 apache2-devel apache2-mod_perl apache2-mod_php5 apache2-prefork perl-HTML-Parser perl-HTML-Tagset perl-Tie-IxHash perl-URI perl-libwww-perl php5 php5-devel zlib zlib-devel
Nu installere vi nogle PHP5 moduler:
yast2 -i php5-bcmath php5-bz2 php5-calendar php5-ctype php5-curl php5-dbase php5-debuginfo php5-dom php5-filepro php5-ftp php5-gd php5-gettext php5-gmp php5-iconv php5-imap php5-ldap php5-mbstring php5-mcrypt php5-mhash php5-mysql php5-mysqli 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
Nu konfigurerer /etc/apache2/httpd.conf:
vi /etc/apache2/httpd.conf
og skift DirectoryIndex til
DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php5 index.php4 index.php3 index.pl index.html.var index.aspx default.aspx
Rediger /etc/sysconfig/apache2 og tilføj rewrite til APACHE_MODULES linien:
vi /etc/sysconfig/apache2
APACHE_MODULES="actions alias auth_basic [...] negotiation setenvif ssl suexec userdir php5 rewrite"
tilføj også SSL til APACHE_SERVER_FLAGS linien:
APACHE_SERVER_FLAGS="SSL"
Konfigurer nu systemet til starte Apache under boot:
chkconfig --add apache2
kør så
SuSEconfig
/etc/init.d/apache2 start
Deaktiver PHP og Perl Globalt
(hvis du ikke ønsker at bruge ISPConfig så spring dette punkt over)
I ISPConfig konfigurerer du brugen af PHP og PERL på den webside du kan specificerer om brugen PHP eller PERL er tilladt på pågældende hjemmeside og det er derfor vi deaktiverer brugen af PHP og PERL globalt.
For at deaktiverer globalt redigerer vi i /etc/mime.types ved at udkommenterer application/x-perl og application/x-php linierne:
#application/x-perl pl pm al perl
#application/x-php php php3 php4
Så genstarter vi Apache
/etc/init.d/apache2 restart
Proftpd
Vi bruger Proftpd i stedet for vsftpd som kommer med SuSE som standart FTP server ISPConfig skal bruge Proftpd på SUSE 10.1 og på andre distribtioner kan det værer anderledes. Siden der ikke er nogen SUSE pakker til Proftpd skal programmet kompiles manuelt.
cd /tmp/
wget --passive-ftp ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.0.tar.gz
tar xvfz proftpd-1.3.0.tar.gz
cd proftpd-1.3.0/
./configure --sysconfdir=/etc
make
make install
cd ..
rm -fr proftpd-1.3.0*
Nu laver vi filen /etc/init.d/proftpd:
vi /etc/init.d/proftpd
#! /bin/sh
# Copyright (c) 2000-2001 SuSE GmbH Nuernberg, Germany.
# All rights reserved.
#
# Original author: Marius Tomaschewski <mt@suse.de>
#
# Slightly modified in 2003 for use with SuSE Linux 8.1,
# by www.learnlinux.co.uk
#
# Slightly modified in 2005 for use with SuSE Linux 9.2,
# by Falko Timme
#
# /etc/init.d/proftpd
#
### BEGIN INIT INFO
# Provides: proftpd
# Required-Start: $network $remote_fs $syslog $named
# Required-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Starts ProFTPD server
### END INIT INFO
# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}
# Force execution if not called by a runlevel directory.
test $link = $base && START_PROFTPD=yes # Modified by learnlinux.co.uk
test "$START_PROFTPD" = yes || exit 0 # Modified by learnlinux.co.uk
# Return values acc. to LSB for all commands but
# status (see below):
#
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
proftpd_cfg="/etc/proftpd.conf"
proftpd_bin="/usr/local/sbin/proftpd"
proftpd_pid="/usr/local/var/proftpd.pid"
[ -r $proftpd_cfg ] || exit 6
[ -x $proftpd_bin ] || exit 5
# Source status functions
. /etc/rc.status
# First reset status of this service
rc_reset
case "$1" in
start)
echo -n "Starting ProFTPD Server: "
test -f /etc/shutmsg && rm -f /etc/shutmsg
/sbin/startproc $proftpd_bin
rc_status -v
;;
stop)
echo -n "Shutting down ProFTPD Server: "
test -x /usr/local/sbin/ftpshut && /usr/local/sbin/ftpshut now && sleep 1
/sbin/killproc -TERM $proftpd_bin
test -f /etc/shutmsg && rm -f /etc/shutmsg
rc_status -v
;;
restart)
## If first returns OK call the second, if first or
## second command fails, set echo return value.
$0 stop
$0 start
rc_status
;;
try-restart)
## Stop the service and if this succeeds (i.e. the
## service was running before), start it again.
## Note: not (yet) part of LSB (as of 0.7.5)
$0 status >/dev/null && $0 restart
rc_status
;;
reload|force-reload)
## Exclusive possibility: Some services must be stopped
## and started to force a new load of the configuration.
echo -n "Reload ProFTPD Server: "
/sbin/killproc -HUP $proftpd_bin
rc_status -v
;;
status)
# Status has a slightly different for the status command:
# 0 - service running
# 1 - service dead, but /var/run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running
echo -n "Checking for ProFTPD Server: "
checkproc $proftpd_bin
rc_status -v
;;
probe)
## Optional: Probe for the necessity of a reload,
## give out the argument which is required for a reload.
[ $proftpd_cfg -nt $proftpd_pid ] && echo reload
;;
*)
echo "Usage: $0 {start|stop|status|restart|reload|try-restart|probe}"
exit 1
;;
esac
# Set an exit status.
rc_exit
kør så
chmod 755 /etc/init.d/proftpd
chkconfig --add proftpd
start Proftpd
/etc/init.d/proftpd start
Af sikkerhedsgrunde kan du tilføje dette til /etc/proftpd.conf:
vi /etc/proftpd.conf
DefaultRoot ~
IdentLookups off
ServerIdent on "FTP Server ready."
Vær sikke på at udkommenterer disse linier så brugeren kan bruge chmod på filer og mapper.
# Bar use of SITE CHMOD by default
#<Limit SITE_CHMOD>
# DenyAll
#</Limit>
Genstart Proftpd:
/etc/init.d/proftpd restart