r7 - 26 Mar 2008 - 11:34:30 - BeckyHYou are here: Wiki >  AppLogic23 Web > CatWebserversWeb5Cid
ALERT! AppLogic 2.3 Beta Documentation The latest production release is AppLogic 3.0.30

WEB5: Simple Web Server based on CentOS 5 - Implementation Design

Class Volumes

The boot volume of WEB is based on the LUX5 appliance (CentOS 5). Below is a list of the software packages installed on WEB (on top of LUX), most of them are from the CentOS 5 package repository.

Installed Packages.

  • alsa-lib-1.0.12-3.el5
  • apr-1.2.7-11
  • apr-util-1.2.7-6
  • aspell-0.60.3-7.1
  • aspell-en-6.0-2.1
  • atk-1.12.2-1.fc6
  • audiofile-0.2.6-5
  • audit-libs-python-1.3.1-1.el5
  • avahi-0.6.16-1.el5
  • avahi-glib-0.6.16-1.el5
  • bind-libs-9.3.3-9.0.1.el5
  • bind-utils-9.3.3-9.0.1.el5
  • cairo-1.2.4-1.fc6
  • chkfontpath-1.10.1-1.1
  • cryptsetup-luks-1.0.3-2.2.el5
  • cups-libs-1.2.4-11.5.3.el5
  • curl-7.15.5-2.el5
  • cyrus-sasl-2.1.22-4
  • dbus-1.0.0-6.el5
  • dbus-glib-0.70-5
  • dbus-python-0.70-7.el5
  • distcache-1.4.5-14.1
  • dmidecode-2.7-1.28.2.el5
  • esound-0.2.36-3
  • fontconfig-2.4.1-6.el5
  • freetype-2.2.1-17.el5
  • gamin-0.1.7-8.el5
  • GConf2-2.14.0-9.el5
  • gd-2.0.33-9.3.fc6
  • ghostscript-8.15.2-9.1.el5
  • ghostscript-fonts-5.50-13.1.1
  • gmp-4.1.4-10.el5
  • gnome-keyring-0.6.0-1.fc6
  • gnome-mime-data-2.4.2-3.1
  • gnome-mount-0.5-3.el5
  • gnome-vfs2-2.16.2-4.el5
  • gnutls-1.4.1-2
  • gtk2-2.10.4-16.el5
  • hal-0.5.8.1-19.el5
  • hesiod-3.1.0-8
  • hicolor-icon-theme-0.9-2.1
  • httpd-2.2.3-7.el5.centos
  • hwdata-0.194-1
  • ImageMagick-6.2.8.0-3.el5.4
  • ImageMagick-perl-6.2.8.0-3.el5.4
  • kbd-1.12-19.el5
  • kernel-headers-2.6.18-8.1.10.el5
  • lcms-1.15-1.2.2
  • libart_lgpl-2.3.17-4
  • libbonobo-2.16.0-1.fc6
  • libbonoboui-2.16.0-1.fc6
  • libc-client-2004g-2.2.1
  • libcroco-0.6.1-2.1
  • libdaemon-0.10-5.el5
  • libevent-1.1a-3.2.1
  • libfontenc-1.0.2-2.2.el5
  • libFS-1.0.0-3.1
  • libgcrypt-1.2.3-1
  • libglade2-2.6.0-2
  • libgnome-2.16.0-6.el5
  • libgnomecanvas-2.14.0-4.1
  • libgnomeui-2.16.0-5.el5
  • libgpg-error-1.4-2
  • libgsf-1.14.1-6.1
  • libgssapi-0.10-2
  • libICE-1.0.1-2.1
  • libIDL-0.8.7-1.fc6
  • libidn-0.6.5-1.1
  • libjpeg-6b-37
  • libnotify-0.4.2-6.el5
  • libpng-1.2.10-7.0.2
  • librsvg2-2.16.1-1.el5
  • libSM-1.0.1-3.1
  • libtiff-3.8.2-7.el5
  • libusb-0.1.12-5.1
  • libutempter-1.1.4-3.fc6
  • libwmf-0.2.8.4-10.1
  • libwnck-2.16.0-4.fc6
  • libX11-1.0.3-8.0.1.el5
  • libXau-1.0.1-3.1
  • libXcursor-1.1.7-1.1
  • libXdmcp-1.0.1-2.1
  • libXext-1.0.1-2.1
  • libXfixes-4.0.1-2.1
  • libXfont-1.2.2-1.0.2.el5
  • libXft-2.1.10-1.1
  • libXi-1.0.1-3.1
  • libXinerama-1.0.1-2.1
  • libxml2-2.6.26-2.1.2
  • libxml2-python-2.6.26-2.1.2
  • libXpm-3.5.5-3
  • libXrandr-1.1.1-3.1
  • libXrender-0.9.1-3.1
  • libXres-1.0.1-3.1
  • libxslt-1.1.17-2
  • libXt-1.0.2-3.1.fc6
  • mailcap-2.1.23-1.fc6
  • mod_auth_mysql-3.0.0-3.1
  • mod_perl-2.0.2-6.3.el5
  • mod_ssl-2.2.3-7.el5.centos
  • mysql-5.0.22-2.1.0.1
  • nfs-utils-1.0.9-16.el5
  • nfs-utils-lib-1.0.8-7.2
  • notification-daemon-0.3.5-8.el5
  • ntsysv-1.3.30.1-1
  • ORBit2-2.14.3-4.el5
  • pango-1.14.9-3.el5.centos
  • pciutils-2.2.3-4
  • perl-AppConfig-1.65-1.el5.rf
  • perl-BSD-Resource-1.28-1.fc6.1
  • perl-DBD-MySQL-3.0007-1.fc6
  • perl-DBI-1.52-1.fc6
  • perl-GD-2.35-1.el5.rf
  • perl-MailTools-1.77-1.el5.centos
  • perl-Pod-POM-0.17-1.2.el5.rf
  • perl-String-CRC32-1.4-2.fc6
  • perl-Template-Toolkit-2.15-1.el5.rf
  • perl-Text-Autoformat-1.13-1.2.el5.rf
  • perl-Text-Reform-1.11-1.2.el5.rf
  • perl-TimeDate-1.16-1.el5.centos
  • php-5.1.6-15.el5
  • php-cli-5.1.6-15.el5
  • php-common-5.1.6-15.el5
  • php-gd-5.1.6-15.el5
  • php-imap-5.1.6-15.el5
  • php-mysql-5.1.6-15.el5
  • php-pdo-5.1.6-15.el5
  • php-pear-1.4.9-4
  • php-pgsql-5.1.6-15.el5
  • pkgconfig-0.21-1.fc6
  • pm-utils-0.19-3.el5.centos.1
  • policycoreutils-1.33.12-3.el5
  • portmap-4.0-65.2.2.1
  • postgresql-libs-8.1.9-1.el5
  • procmail-3.22-17.1.el5.centos
  • rsync-2.6.8-3.1
  • samba-client-3.0.23c-2.el5.2.0.2
  • samba-common-3.0.23c-2.el5.2.0.2
  • sendmail-8.13.8-2.el5
  • shared-mime-info-0.19-3.el5
  • startup-notification-0.8-4.1
  • sudo-1.6.8p12-10
  • tcpdump-3.9.4-8.1
  • telnet-0.17-38.el5
  • ttmkfdir-3.0.9-23.el5
  • unzip-5.52-2.2.1
  • urw-fonts-2.3-6.1.1
  • xorg-x11-filesystem-7.1-2.fc6
  • xorg-x11-font-utils-7.1-2
  • xorg-x11-xfs-1.0.2-4
  • zip-2.31-1.2.2

Re-install Procedure

Here are the steps needed to create a WEB5 class from LUX5 (tested on applogic 2.2.0)

  1. Create an application with only LUX5 and NET in it; configure the NET appliance
  2. Branch LUX5
  3. Resize volumes
    1. vol resize LUX5.boot size=300M 
    2. vol resize LUX5.usr size=500M 
  4. Edit the class (in EDT)
    1. add a placeholder volume (name: content; mount on /dev/hda3; shared, ro)
    2. make the usr volume rw
    3. Update terminals: in | In | http db | Out | mysql fs | Out | nfs log| Out | cifs aux| Out | any net| Out | any mon| Out | cce
    4. mark net terminal as gateway
    5. change the class icon color to blue
    6. change the class name to WEB5
    7. change the class description
    8. change class category to 'Web Servers'
    9. Add the following properties:
      • host_name : type = string , dflt = ""
      • admin_email : type = string , dflt = root@localhost
      • content_on_fs : type = string , values = on|off , dflt = off
      • docs_dir : type = string , dflt = ""
      • docs_loc : type = string , dflt = ""
      • scripts_dir : type = string , dflt = ""
      • scripts_loc : type = string , dflt = ""
      • logs_enabled : lowercase , type = string , values = off|on , dflt = off
      • logs_base_dir : type = string , dflt = /
      • access_log_filename : type = string , dflt = ""
      • error_log_filename : type = string , dflt = ""
      • error_log_level : lowercase , type = string , values = debug|info|notice|warn|error|crit|alert|emerg , dflt = warn
      • cgi_ext : type = string , dflt = .cgi
      • shared_perl_ext : type = string , dflt = ""
      • index_files : type = string , dflt = "index.html index.html.var"
      • use_htaccess : lowercase , type = string , values = off|on , dflt = off
      • max_connections : type = integer , min = 1 , max = 256 , dflt = 128
      • persistent_connections : lowercase , type = string , values = off|on , dflt = on
      • idle_timeout_sec : type = integer , dflt = 15
      • data_timeout_sec : type = integer , dflt = 300
      • default_charset : type = string , dflt = off
      • info_level : lowercase , type = string , values = full|os|minor|major|prod , dflt = prod
      • server_signature : lowercase , type = string , values = off|on , dflt = off
      • env : type = string , dflt = ""
    10. Set resources
      • CPU: 0.10 | 4 | 0.30
      • MEM: 128M | 8G | 512M
      • BW: 1M |100M | 1M
  5. Connect the net terminal of WEB5 to the net appliance
  6. Create a volume and use it the WEB5 placeholder
  7. Save the application
  8. Start the application in debug mode
  9. Login the WEB5 and do
    mkdir -p /mnt/content /mnt/log 
  10. Install rpms:
       yum upgrade
       yum -y install httpd mod_perl ImageMagick ImageMagick-perl mod_ssl mod_auth_mysql sudo
       yum -y install php php-mysql php-gd php-imap php-pgsql php-pear 
       yum -y install perl-TimeDate perl-String-CRC32 perl-MailTools perl-DBD-MySQL
       yum -y install nfs-utils samba-client rsync ntsysv bind-utils sendmail  zip unzip tcpdump telnet words
       

    rpm -Uv perl-AppConfig-1.65-1.el5.rf.noarch.rpm (Current link)
    rpm -Uv perl-Pod-POM-0.17-1.2.el5.rf.noarch.rpm (Current link)
    rpm -Uv perl-Text-Reform-1.11-1.2.el5.rf.noarch.rpm (Current link)
    rpm -Uv perl-Text-Autoformat-1.13-1.2.el5.rf.noarch.rpm (Current link)
    rpm -Uv perl-Template-Toolkit-2.15-1.el5.rf.i386.rpm (Current link)
    rpm -Uv perl-GD-2.35-1.el5.rf.i386.rpm (Current link)
    yum clean all
    rpm --rebuilddb
  11. Copy the following files in WEB5
  12. Fix init scripts
       chkconfig --levels 12345 sendmail off
       chkconfig --levels 12345 xfs off
       chkconfig --levels 12345 haldaemon off
       chkconfig --levels 12345 avahi-daemon off
       chkconfig --levels 12345 messagebus off
       chkconfig --levels 345 httpd on
       
  13. Fix log rotation by editing /etc/logrotate.conf and ensuring the following are set:
       rotate 4
       size 512k
       

  1. Setup permissions of scripts
       chgrp nobody /var/lib/php/session
       cd /appliance ;chown root * ; chmod +x appliance.sh execute_command.sh feed_apache_counters.sh httpd_prerun.sh
       rm  /etc/httpd/conf.d/proxy_ajp.conf
       
  2. Stop the application
  3. Mount the boot volume of WEB5 (vol mount WEB5.boot) and cleanup.
     
       rm -f root/.bash_history root/.lesshst appliance/log appliance/vmalog appliance/passwd.stamp etc/resolv.conf
       find var/log -type f -exec rm {} \;
       rm -f tmp/*
       echo -n "" > etc/applogic_network.conf
       echo -n "" > etc/hosts
       echo -n "" > etc/applogic/appliance.desc
       echo -n "" > etc/applogic.sh
       
  4. Umount the boot volume (vol umount WEB5.boot)
  5. Edit class
    • add /etc/httpd/conf.d/appl.conf to the configuration files tab (volume: boot; qte method: none)
    • make the usr volume ro
  6. Save the application
  7. Vol resize
       vol resize WEB5.boot size=150M
       vol resize WEB5.usr size=330M
       
  8. Move the class to the /proto catalog or any other catalog of your choosing.

-- NetClime - 25 Sep 2007

 
Copyright © CA 2005-2011. All Rights Reserved.
%