Projekt mspr@job1: Difference between revisions

From JoBaPedia
Jump to navigation Jump to search
No edit summary
Line 19: Line 19:
* Install pdo for db2 (see howto in database/)
* Install pdo for db2 (see howto in database/)
* Enable apache to access instance db2mspr (DB2INSTANCE in /etc/sysconfig/apache2, export?)
* Enable apache to access instance db2mspr (DB2INSTANCE in /etc/sysconfig/apache2, export?)
* Other settings in /etc/sysconfig/apache2
** APACHE_SERVERADMIN="joachim.banzhaf@googlemail.com"
** APACHE_SERVERNAME="banzhaf.homeip.net"
* add line in /etc/apache2/listen.conf: "Listen 801"
* Install scripts for import and web  
* Install scripts for import and web  
** all in web/ except gen_* to /srv/www/htdocs
** all in web/ except gen_* to /srv/www/htdocs
Line 32: Line 36:


'''next task:'''
'''next task:'''
* restore database from last backup and logs from job4 and document steps
* restore database from last backup and logs from job4 and document steps
* check db settings are the same as on job4
* check db settings are the same as on job4
* Create portforward public :801 to job1:80
* Create portforward public :801 to job1:801
* Check if pages show correct results
* Check if pages show correct results
* Setup cron for data imports
* Setup cron for data imports
Line 43: Line 46:
* disable update on job4
* disable update on job4
* restore db again
* restore db again
* edit proxy destination (remove test port :801 from url)
cd /srv/www/htdocs
for i in image index mainframe naviframe titleframe; do sed -i 's/:801//' $i.php; done
* test again
* test again
* move public :80 port
* remove public :801 forward
* forward public :80 to job1:80
* make apache listen to :80 instead of :801
* final tests

Revision as of 14:08, 10 February 2012

How I move the MSPR site from job4 to job1

Preparation

  • Install standard opensuse 12.1
  • Add repositories pacman, nvidia, vlc
  • Install the following packages
zypper install apache2 php5 hg apache2-mod_php5 php5-devel php5-pear gcc-c++
  • Install db2 express-c 9.7.4
  • Create instance db2mspr
  • Configure instance like db2inst4 on job4
db2 update dbm cfg using numdb 2 federated yes DFT_MON_BUFPOOL on DFT_MON_LOCK on \
 DFT_MON_SORT on DFT_MON_STMT on DFT_MON_TABLE on DFT_MON_UOW on \
 INSTANCE_MEMORY 524288 SHEAPTHRES 200000 INTRA_PARALLEL YES
  • Create connect user db2inst2 (required because tables have this schema)
  • Create loader user mspr (loads data from mspr web/xml pages)
  • Clone mspr repository to /home/joachim/workspace/mspr (for scripts and docs)
  • Install pdo for db2 (see howto in database/)
  • Enable apache to access instance db2mspr (DB2INSTANCE in /etc/sysconfig/apache2, export?)
  • Other settings in /etc/sysconfig/apache2
    • APACHE_SERVERADMIN="joachim.banzhaf@googlemail.com"
    • APACHE_SERVERNAME="banzhaf.homeip.net"
  • add line in /etc/apache2/listen.conf: "Listen 801"
  • Install scripts for import and web
    • all in web/ except gen_* to /srv/www/htdocs
    • util/mspr-* to /usr/local/bin
    • database/ta_mqt_refresh.sh to /usr/local/bin
  • edit proxy destination (add test port :801 to url)
cd /srv/www/htdocs
for i in image index mainframe naviframe titleframe; do sed -i 's/\(homeip.net\)/\1:801/' $i.php; done
  • set password file for db connection /etc/apache/db2inst2.passwd
  • create group mspr with members mspr, db2mspr

Test Installation

next task:

  • restore database from last backup and logs from job4 and document steps
  • check db settings are the same as on job4
  • Create portforward public :801 to job1:801
  • Check if pages show correct results
  • Setup cron for data imports
  • Testrun for data import (check home directory requirement for mspr)

Production Switch

  • disable update on job4
  • restore db again
  • edit proxy destination (remove test port :801 from url)
cd /srv/www/htdocs
for i in image index mainframe naviframe titleframe; do sed -i 's/:801//' $i.php; done
  • test again
  • remove public :801 forward
  • forward public :80 to job1:80
  • make apache listen to :80 instead of :801
  • final tests