Tags:
create new tag
, view all tags

nethz development infrastructure

Apache structure

We distinguish between the production servers:

  • idn.ethz.ch
  • idn-test.ethz.ch
and the development machines:
  • n-dev0.ethz.ch (aka n-vermeul)
  • n-dev1.ethz.ch (aka n-corti)
  • n-dev2.ethz.ch (aka n-amueller)
  • n-dev3.ethz.ch (Gunter Lange)
  • n-dev4.ethz.ch (aka n-bircher)
  • n-dev5.ethz.ch (aka n-mala)
  • n-dev6.ethz.ch (aka n-yserrano)
  • n-dev7.ethz.ch (aka n-lbenno)

On production machines the apache home directory is stored as usual in /home/$WEB/. E.g. n-vermeul.ethz.ch has the home directory in /home/ndev0/.

Die Server können unter https://webcontrol.ethz.ch gestartet und gestoppt werden.

Directory structure

The whole apache home directory is stored in the subversion repository and has the following structure:

  • htdocs/
  • cgi-bin/
  • conf/: user specific httpd options
  • perl_libs/: site specific Perl libraries

Machines

name IP Alias Entwickler PERL Host
n-yserrano 129.132.46.89 n-dev6 Yves perl-5.8.8-lp thingfish.ethz.ch
n-vermeul 129.132.46.90 n-dev0 Swen perl-5.8.8-lp thingfish.ethz.ch
n-corti 129.132.46.91 n-dev1 Matteo perl-5.8.8-lp thingfish.ethz.ch
n-amueller 129.132.46.92 n-dev2 Anton perl-5.8.8-lp thingfish.ethz.ch
n-lbenno 129.132.46.93 n-dev7 Benno perl-5.8.8-lp thingfish.ethz.ch
idn-new 129.132.46.94   production perl-5.8.7-lp otep.ethz.ch
idn-test 129.132.46.95   production perl-5.8.8-lp thingfish.ethz.ch
n-didi 129.132.46.106 n-dev3 Roland perl-5.8.8-lp thingfish.ethz.ch
n-bircher 129.132.46.107 n-dev4 Peter perl-5.8.8-lp thingfish.ethz.ch
n-mala 129.132.46.109 n-dev5 Brigitte perl-5.8.8-lp thingfish.ethz.ch

Configuration

Perl Programme

sind unter
/home/ndev0/cgi-bin/
/home/ndev0/htdocs/
/home/ndev0/logs/
zu finden. Für jeden Entwickler gibt es ein eigenes Set von Verzeichnissen (ndev0, ndev1, etc.)

Perl Module

Standardmässig sind folgende Perl-Module installiert:

  • Cwd
  • POSIX
  • locale
  • Net::LDAPS
  • Net::SSH::Perl
  • Exporter
  • Socket
  • FileHandle
  • XML::Simple
  • Digest::SHA1;
  • MIME::Base64;
  • Unicode::String
  • DBI
  • Carp
  • English
  • Time::Local
  • Date::Calc
  • Class::Std
  • Class::Std::Utils
  • DBD::Oracle
  • LWP::UserAgent;
  • HTML::TreeBuilder
  • Digest::MD5
  • File::Path
  • CGI
  • version

Oracle

Für die Verbindung zur nethz Datenbank ist folgender Oracle Client installiert: 10.2.0.1 installation

  • Install dir: /opt/oracle/product/10.2.0/client_1
  • Perl: /opt/oracle/product/10.2.0/client_1/perl
  • Perl modules: /opt/oracle/product/10.2.0/client_1/perl/lib/5.8.3 and /opt/oracle/product/10.2.0/client_1/perl/lib/site_perl/5.8.3

tnsnames.ora

Database settings ( $ORACLE_HOME/network/admin/tnsnames.ora). The file should be readable by apache.

INFRA_PROD.ID =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = orust.ethz.ch)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = infra10g.orust.id)
      (SERVER = DEDICATED)
    )
  )

INFRA_TEST.ID =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = MARRA.ETHZ.CH)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = infra10g.marra.id)
      (SRVR = DEDICATED)
    )
  )

Permissions

All the database users must be in the dba and oinstall groups.

Apache

Variables:

  • ${IP}: the server's IP
  • ${WEB}: web name

Configuration

  • Apache
    Die Apache-Konfigurationsdatei httpd.conf befindet sich unter
    /etc/apache/vhosts/129.132.xxx.yyy/conf/httpd.conf
    129.132.xxx.yyy ist die IP-Adresse des jeweiligen Webservers.

    ServerAdmin sysadm@idn.ethz.ch
    <Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 129.132.64.208, 129.132.64.216, 129.132.57.95
    </Location>

  • Logfiles
    Standard-Apache Logfile
    /etc/apache/vhosts/129.132.xxx.yyy/logs/access_log
    Standard-Apache Error-Logifile
    /etc/apache/vhosts/129.132.xxx.yyy/logs/error_log
    Die Logfiles werden rotiert und komprimiert: access_log.1.gz, error_log.2.gz etc.

  • PERL
    • add the perl executable path to the environment running apache:
      echo "/usr/pack/perl-VERSION-PACKAGER/bin/" > etc/apache/vhosts/${IP}/conf/path
      end change the shebang to #!/usr/bin/env perl (instead of #!usr/bin/perl)
    • add the site libraries to the PERL5LIB environment variable. In httpd.conf:
      SetEnv PERL5LIB "/home/ndev0/perl_libs/"

  • PHP
    php_value include_path "/etc/apache/vhosts/${IP}/conf:/home/${WEB}/idweb/include.php/"

  • mod_auth_external (http://unixpapa.com/mod_authnz_external/):
    LoadModule external_auth_module /usr/pack/apache-1.3.33-pb/libexec/mod_auth_external.so
    AddExternalAuth nethz /home/idn/bin/check_pw
    SetExternalAuthMethod nethz environment

Virtual hosts

virtual host redirect
itproeth http://www0.id.ethz.ch/Publikationen/ITproETH/
www.itproeth
id-leistungsauftrag
www.notebooks http://www0.id.ethz.ch/Dienste/Laptopverleih/index_en.html
www.laptops http://www0.id.ethz.ch/Dienste/Laptopverleih/
www.passwort https://idn.ethz.ch/cgi-bin/admin_tool/main.cgi
passwort
www.password
password
www.netservice https://idn.ethz.ch/cgi-bin/komticket/main.cgi
netservice
alarm https://idn.ethz.ch/cgi-bin/alarm/main.cgi
www.alarm
massensms https://idn.ethz.ch/cgi-bin/massensms/main.cgi
www.massensms
inventar https://idn.ethz.ch/cgi-bin/invdb/main.cgi
www.inventar
isgtool https://idn.ethz.ch/cgi-bin/isg/main.cgi
www.isgtool
isg-tool
www.isg-tool
cablecom https://idn.ethz.ch/cgi-bin/cablecom/main.cgi
www.cablecom
sms https://idn.ethz.ch/cgi-bin/sms/main.cgi
www.sms
www.messagetree https://idn.ethz.ch/cgi-bin/MessageTree/main.cgi
messagetree
www.hispeed https://idn.ethz.ch/cgi-bin/hispeed/main.cgi
hispeed
phonebook http://idn.ethz.ch/cgi-bin/phone/phonebook.cgi
www.phonebook

External sofware

Varia

  • mkdir /var/spool/mail_spooler
    chwon w3_idn /var/spool/mail_spooler

Directory structure

/home/idn/

Topic revision: r26 - 2013-06-11 - vermeul
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback