Setting up a new server - Suse 11.1

Discussion in 'Server Operation' started by londonman, Mar 27, 2009.

  1. falko

    falko Super Moderator Howtoforge Staff

    Did you copy [...] from my tutorials? This is just a placeholder indicating that there's some other content in the file that is not shown in my tutorials. Please remove it from your configuration files.
     
  2. londonman

    londonman New Member

    Looks as though i did follow too much to the letter - my apologies, i have removed [....] the said

    and carried out the following, results below:-

    xxxxx:~ # telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 xxxxxx.example.com ESMTP Postfix

    quit
    221 2.0.0 Bye
    Connection closed by foreign host.
    Only got as far as the this

    220 xxxxxx.example.com ESMTP Postfix

    and it just seems to hang there - so i exited
    Any thing more that i can do?
     
  3. londonman

    londonman New Member


    Progressing on from the above:-

    I have carried out the following and have ran in to this error, is it ok? I have checked the line one issue but did not see anything that might result in an error.

    xxxxxx:/tmp # /etc/init.d/proftpd start
    /etc/init.d/proftpd: line 1: syntax error near unexpected token `c'
    /etc/init.d/proftpd: line 1: `opyright (c) 2000-2001 SuSE GmbH Nuernberg, Germany.'

    It looks as if there is an issue or something may have been broken.

    xxxxxx:/tmp # /etc/init.d/proftpd restart
    /etc/init.d/proftpd: line 1: syntax error near unexpected token `c'
    /etc/init.d/proftpd: line 1: `opyright (c) 2000-2001 SuSE GmbH Nuernberg, Germany.'

    Thanks
     
  4. falko

    falko Super Moderator Howtoforge Staff

    This is where you have to enter
    Code:
    ehlo localhost
    What's in /etc/init.d/proftpd?
     
  5. londonman

    londonman New Member

    Ok We have lift off it works
    Thanks for that

    I have ran the following commands, Results as requested:-

    xxxxxx:/ # cat /etc/init.d/proftpd
    opyright (c) 2000-2001 SuSE GmbH Nuernberg, Germany.
    # All rights reserved.
    #
    # Original author: Marius Tomaschewski <[email protected]>
    #
    # Slightly modified in 2003 for use with SuSE Linux 8.1,
    # by http://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
    xxxxxx:/ #
     
  6. falko

    falko Super Moderator Howtoforge Staff

    The first line and part of the second are missing. This is how the file must look:

    Code:
    #! /bin/sh
    # Copyright (c) 2000-2001 SuSE GmbH Nuernberg, Germany.
    # All rights reserved.
    #
    # Original author: Marius Tomaschewski <[email protected]>
    #
    # Slightly modified in 2003 for use with SuSE Linux 8.1,
    # by http://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
     
  7. londonman

    londonman New Member

    Hi Falko
    Thanks i have now changed the first and second line as advised

    However upon exit of vi the following messaged is shown:-
    xxxxxx:~ # vi /etc/init.d/proftpd vi
    2 files to edit

    I have progress to stage 17 of your post and ran into the following when installing ISPconfg can you help with this?
    I have read the install docs.

    English is Chosen 2
    Do you want to continue with the installation? [y/n]y
    Do you accept the licence? [y/n]y
    1) standard
    2) expert
    Your Choice: 1
    Checking for MTA...
    /usr/sbin/postfix
    OK

    ISPConfig found the following MTA:
    postfix
    Is this correct? [y/n]y
    Check ftp [y/n] y
    STEP 0: Decide the signature algorithm used for certificates
    The generated X.509 certificates can contain either
    RSA or DSA based ingredients. Select the one you want to use.
    Signature Algorithm ((R)SA or (D)SA) [R]:R
    STEP 2: Generating X.509 certificate signing request for CA [ca.csr]
    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.
    -----
    1. Country Name (2 letter code) [XY]:UK
    2. State or Province Name (full name) [Snake Desert]:.
    3. Locality Name (eg, city) [Snake Town]:XXXXXX
    4. Organization Name (eg, company) [Snake Oil, Ltd]:XX
    5. Organizational Unit Name (eg, section) [Certificate Authority]:.
    6. Common Name (eg, CA name) [Snake Oil CA]:.
    7. Email Address (eg, name@FQDN) [[email protected]]:.
    8. Certificate Validity (days) [365]:365
    STEP 3: Generating X.509 certificate for CA signed by itself [ca.crt]
    Certificate Version (1 or 3) [3]:3
    STEP 5: Generating X.509 certificate signing request for SERVER [server.csr]
    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.
    -----
    1. Country Name (2 letter code) [XY]:UK
    2. State or Province Name (full name) [Snake Desert]:.
    3. Locality Name (eg, city) [Snake Town]:LONDON
    4. Organization Name (eg, company) [Snake Oil, Ltd]:JJA
    5. Organizational Unit Name (eg, section) [Webserver Team]:.
    6. Common Name (eg, FQDN) [www.snakeoil.dom]:.
    7. Email Address (eg, name@fqdn) [[email protected]]:.
    8. Certificate Validity (days) [365]:.
    STEP 6: Generating X.509 certificate signed by own CA [server.crt]
    Certificate Version (1 or 3) [3]:3
    bad number of days
    usage: x509 args
    -inform arg - input format - default PEM (one of DER, NET or PEM)
    -outform arg - output format - default PEM (one of DER, NET or PEM)
    -keyform arg - private key format - default PEM
    -CAform arg - CA format - default PEM
    -CAkeyform arg - CA key format - default PEM
    -in arg - input file - default stdin
    -out arg - output file - default stdout
    -passin arg - private key password source
    -serial - print serial number value
    -subject_hash - print subject hash value
    -issuer_hash - print issuer hash value
    -hash - synonym for -subject_hash
    -subject - print subject DN
    -issuer - print issuer DN
    -email - print email address(es)
    -startdate - notBefore field
    -enddate - notAfter field
    -purpose - print out certificate purposes
    -dates - both Before and After dates
    -modulus - print the RSA key modulus
    -pubkey - output the public key
    -fingerprint - print the certificate fingerprint
    -alias - output certificate alias
    -noout - no certificate output
    -ocspid - print OCSP hash values for the subject name and public key
    -ocsp_uri - print OCSP Responder URL(s)
    -trustout - output a "trusted" certificate
    -clrtrust - clear all trusted purposes
    -clrreject - clear all rejected purposes
    -addtrust arg - trust certificate for a given purpose
    -addreject arg - reject certificate for a given purpose
    -setalias arg - set certificate alias
    -days arg - How long till expiry of a signed certificate - def 30 days
    -checkend arg - check whether the cert expires in the next arg seconds
    exit 1 if so, 0 if not
    -signkey arg - self sign cert with arg
    -x509toreq - output a certification request object
    -req - input is a certificate request, sign and output.
    -CA arg - set the CA certificate, must be PEM format.
    -CAkey arg - set the CA key, must be PEM format
    missing, it is assumed to be in the CA file.
    -CAcreateserial - create serial number file if it does not exist
    -CAserial arg - serial file
    -set_serial - serial number to use
    -text - print the certificate in text form
    -C - print out C code forms
    -md2/-md5/-sha1/-mdc2 - digest to use
    -extfile - configuration file with X509V3 extensions to add
    -extensions - section from config file with X509V3 extensions to add
    -clrext - delete extensions before signing and input certificate
    -nameopt arg - various certificate name options
    -engine e - use engine e, possibly a hardware device.
    -certopt arg - various certificate text options
    mkcert.sh:Error: Failed to generate X.509 certificate
    make[1]: *** [certificate] Error 1
    make[1]: Leaving directory `/tmp/install_ispconfig/compile_aps/apache_1.3.41/src'
    make: *** [certificate] Error 2
    ERROR: Could not make certificate for Apache
    cd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    mv: cannot stat `binaries/aps.tar.gz': No such file or directory
    mv: cannot stat `binaries/spamassassin.tar.gz': No such file or directory
    mv: cannot stat `binaries/uudeview.tar.gz': No such file or directory
    mv: cannot stat `binaries/clamav.tar.gz': No such file or directory
    mv: cannot stat `binaries/cronolog': No such file or directory
    mv: cannot stat `binaries/cronosplit': No such file or directory
    mv: cannot stat `binaries/ispconfig_tcpserver': No such file or directory
    mv: cannot stat `binaries/zip': No such file or directory
    mv: cannot stat `binaries/unzip': No such file or directory
    tar: spamassassin.tar.gz: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error exit delayed from previous errors
    mv: cannot stat `spamassassin': No such file or directory
    tar: uudeview.tar.gz: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error exit delayed from previous errors
    mv: cannot stat `uudeview': No such file or directory
    tar: clamav.tar.gz: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error exit delayed from previous errors
    mv: cannot stat `clamav': No such file or directory
    tar: aps.tar.gz: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error exit delayed from previous errors
    mv: cannot stat `ispconfig_tmp': No such file or directory
    cp: cannot stat `dist.info': No such file or directory
    All prerequisites are fulfilled.
    Here we go...
    chmod: cannot access `./install.php': No such file or directory

    This is my issue if i have not made any mistakes before hand
    Please enter your MySQL server:

    What should be the correct response?
     
  8. londonman

    londonman New Member

    Sorry Falko

    I have found the answer to my earlier post.
     
  9. londonman

    londonman New Member

    Ok i spoke too soon
    No this is the wrong command - Can you help.
    Error message recieved as follows:-

    Please enter your MySQL server:[server name xxxxxx]
    OK
    Please enter your MySQL user:root
    Please enter your MySQL password:
    ERROR 1130 (00000): Host 'xxxxxx.example.com' is not allowed to connect to this MySQL server
    The provided MySQL password is wrong!
     
  10. londonman

    londonman New Member


    YES YES
    Sorted at last ISPconfig installed
    But there is always a but

    I am unable to log into the GUI via web browser
    not even ip address will work
    Your help please.
     
  11. falko

    falko Super Moderator Howtoforge Staff

    You should've used localhost here.

    Please try
    Code:
    /etc/init.d/ispconfig_server restart
    What's the output of
    Code:
    netstat -tap
    afterwards?
     
  12. londonman

    londonman New Member

    Reply to command as follows:-

    xxxxxx:~ # netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 *:mysql *:* LISTEN 1853/mysqld
    tcp 0 0 *:sunrpc *:* LISTEN 2517/rpcbind
    tcp 0 0 *:81 *:* LISTEN 16854/ispconfig_htt
    tcp 0 0 localhost:821 *:* LISTEN 3189/famd
    tcp 0 0 xxxxxx:domain *:* LISTEN 3125/named
    tcp 0 0 xxxxxx.exampl:domain *:* LISTEN 3125/named
    tcp 0 0 localhost:domain *:* LISTEN 3125/named
    tcp 0 0 *:ssh *:* LISTEN 3101/sshd
    tcp 0 0 localhost:ipp *:* LISTEN 3244/cupsd
    tcp 0 0 *:smtp *:* LISTEN 3302/master
    tcp 0 0 localhost:953 *:* LISTEN 3125/named
    tcp 0 0 xxxxxx:ssh 192.168.0.xx0:45495 ESTABLISHED 16436/0
    tcp 0 0 *:imaps *:* LISTEN 2554/couriertcpd
    tcp 0 0 *:pop3s *:* LISTEN 2596/couriertcpd
    tcp 0 0 *:pop3 *:* LISTEN 2577/couriertcpd
    tcp 0 0 *:imap *:* LISTEN 2534/couriertcpd
    tcp 0 0 *:sunrpc *:* LISTEN 2517/rpcbind
    tcp 0 0 *:www-http *:* LISTEN 3156/httpd2-prefork
    tcp 0 0 *:domain *:* LISTEN 3125/named
    tcp 0 0 *:ssh *:* LISTEN 3101/sshd
    tcp 0 0 *:smtp *:* LISTEN 3302/master
    tcp 0 0 localhost:953 *:* LISTEN 3125/named
    tcp 0 0 *:https *:* LISTEN 3156/httpd2-prefork


    At what point is is best to do an update download for the system or not ?
    I assume once a decision is made on the domain name it is poss to make the relevant changes with little effort?
    Thanks again.
     
  13. londonman

    londonman New Member

    Hi Falko

    In addition to my earlier post i have encounter the following issue:-

    Have a lot of fun...
    xxxxxx:~ # /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin
    xxxxxx:~ # /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin
    ^C
    xxxxxx:~ # /home/admispconfig/ispconfig
    -bash: /home/admispconfig/ispconfig: is a directory

    the command seems to hang.

    Update
    I have now re-ran the ip adders after rebooting in the browser and was able to get an error reply.

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/admispconfig/ispconfig/lib/config.inc.php on line 104
     
  14. londonman

    londonman New Member

    Hi Falko
    carried out the following command :-

    vi /home/admispconfig/ispconfig/lib/config.inc.php

    and found and removed the following:
    type'; // 'filter' = set PHP filters, 'addtype' = Set PHP addtype or 'both' = Set Filter + Addtype, suphp = SuPHP wrapper enabled, 'addhandler' = Set PHP AddHandler (nescessary for SuSE 10.2)

    YES! YES! we have lift off
    Access granted

    Now all that is left is to set up a web page and upload it to test the system.

    Any tips? - Don't forget this is new to me, but i am learning fast.
    What are the prerequisites to install on the system?
    Sorry for the trouble thus far and Thank you.
     
  15. falko

    falko Super Moderator Howtoforge Staff

Share This Page