Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

This

...

page

...

describes

...

how

...

to

...

update

...

a

...

legacy

...

(pre-cfg

...

mgmt,

...

sysuser

...

based

...

configuration)

...

PHP

...

built

...

to

...

use

...

the

...

latest

...

PHP

...

build,

...

installed

...

by

...

RadminD

...

and

...

including

...

JPEG

...

library

...

support.

...

  1. Shut

...

  1. down

...

  1. Apache

...

  1. on

...

  1. the

...

  1. server

...

  1. being

...

  1. upgraded.

...

  1. Code Block

...

  1. 
    /etc/init.d/web stop
    

...

  1. Backup the MySQL databases
    Code Block
    
    mysqldump -p --all-databases --flush-privileges --single-transaction > ~/database-backups-`hostname`.sql
    mysqldump -p -B pubsdev --flush-privileges --single-transaction > ~/database-backups-pubsdev-`hostname`.sql
    

...

  1. Check version of MySQL,

...

  1. and

...

  1. shutdown

...

  1. MySQL

...

  1. on

...

  1. the

...

  1. server

...

  1. if

...

  1. it

...

  1. is

...

  1. not

...

  1. the

...

  1. OS

...

  1. provided

...

  1. version

...

  1. (5.0.45

...

  1. x86_64

...

  1. on

...

  1. the

...

  1. 64

...

  1. bit

...

  1. RHEL5.1

...

  1. servers)

...

  1. Code Block

...

  1. 
    mysql --version
    /etc/init.d/mysqld stop
    

...

    1. Remove MySQL if it is not the correct version. Do not delete the data directories.
      • If possible, use RPM to remove the version of MySQL that is there.
        Code Block
        
        ###  This code chunk in untested.  Use only after careful review.
        rpm -e /home/db/tmp/MySQL-server-community-5.0.45-0.rhel5.i386.rpm
        /etc/init.d/mysql stop
        rpm -e MySQL-client-community
        rpm -e MySQL-shared-community
        rpm -e MySQL-clusterstorage-community
        rpm -e MySQL-clustertools-community
        rpm -e MySQL-clusterextra-community
        rpm -e MySQL-clustermanagement-community
        

...

      • If it is a hand-installed

...

      • version,

...

      • such

...

      • as

...

      • the

...

      • custom

...

      • build

...

      • on

...

      • 5.0.67,

...

      • must

...

      • delete

...

      • the

...

      • files

...

      • by

...

      • hand

...

      • (and

...

      • force

...

      • yum

...

      • to

...

      • write

...

      • over

...

      • remaining

...

      • files

...

      • that

...

      • we

...

      • have

...

      • missed).

...

      • Backup

...

      • the

...

      • my.cnf

...

      • config

...

      • file.

...

      • Code Block

...

      • 
        cp /etc/my.cnf /home/db
        rm -rf /usr/bin/mysql /usr/lib/mysql /usr/include/mysql /usr/share/mysql /usr/man/man1/mysql.1 /usr/share/man/man1/mysql.1.gz /usr/libexec/mysqld /usr/man/man8/mysqld.8 /usr/share/man/man1/mysqld.1.gz
        

...

  1. Install correct version of MySQL, if necessary, and reconfigure it.
    Code Block
    
    yum -y install mysql-server
    /etc/init.d/mysql stop
    rm /var/lock/subsys/mysqld
    cp /home/db/my.cnf /etc/my.cnf
    scp dracus@athena.dialup.mit.edu:/afs/athena.mit.edu/project/amit-dsl/Public/MySQL/mysqld /etc/init.d/mysqld
    

...

    1. Check that the init script sets the user to be db, and that the my.cnf file contains the proper location for the pid file.
      • Grep for user.
        Code Block
        
        grep user /etc/init.d/mysqld
        

...

      • Should return the following line.
        Code Block
        
        get_mysql_option /etc/my.cnf user "db"
        

...

      • If it does not,

...

      • download

...

      • the

...

      • correct

...

      • init

...

      • script

...

      • from

...

      • the

...

      • AMIT

...

      • DSL.

...

      • Code Block

...

      • 
        scp dracus@athena.dialup.mit.edu:/afs/athena.mit.edu/project/amit-dsl/Public/MySQL/mysqld /etc/init.d/mysqld
        

...

    1. Grep for pid file.
      Code Block
      
      grep pid /etc/my.cnf
      

...

      • Should return the following line.
        Code Block
        
        pid-file=/home/db/mysql.pid
        

...

      • If it does not,

...

      • update

...

      • the

...

      • /etc/my.cnf

...

      • file

...

      • to

...

      • contain

...

      • that

...

      • config

...

      • line.

...

  1. Log

...

  1. into

...

  1. Nebula/Lockbox

...

  1. (the

...

  1. RadminD

...

  1. server),

...

  1. and

...

  1. link

...

  1. the

...

  1. host

...

  1. command

...

  1. filename

...

  1. to

...

  1. the

...

  1. legacy

...

  1. PHP

...

  1. command

...

  1. file.

...

  1. Code Block

...

  1. 
    cd /var/radmind/command/isda
    ln -s legacy-php-rhel5.1-x86_64.K [hostname].K
    

...

  1. Move the PHP directory to a backup location.
    Code Block
    
    cd /home/www
    mv php-5.2.6 php-5.2.6-backup
    rm php
    

...

    • Replace '[hostname

...

    • ]'

...

    • with

...

    • the

...

    • base

...

    • hostname

...

    • of

...

    • the

...

    • server

...

    • being

...

    • upgraded.

...

  1. Go

...

  1. to

...

  1. the

...

  1. RadminD

...

  1. client

...

  1. directory

...

  1. and

...

  1. delete

...

  1. the

...

  1. previous

...

  1. command

...

  1. and

...

  1. transcript

...

  1. files.

...

  1. Code Block

...

  1. 
    cd /var/radmind/client/
    rm -rf *
    

...

  1. Use ra.sh,

...

  1. and

...

  1. update

...

  1. the

...

  1. version

...

  1. of

...

  1. PHP

...

  1. on

...

  1. the

...

  1. system.

...

  1. Code Block

...

  1. 
    ra.sh -c update /
    

...

    • Edit the appliable transcript and make certain nothing that has not been backed up is going to be overwritten.
  1. Start Apache
    Code Block
    
    /etc/init.d/web start
    

...

  1. If it starts,

...

  1. log

...

  1. in

...

  1. as

...

  1. www

...

  1. user,

...

  1. and

...

  1. test

...

  1. socket

...

  1. connection

...

  1. to

...

  1. mysql.

...

  1. Copy

...

  1. the

...

  1. php.ini,

...

  1. phpinfo.php

...

  1. and

...

  1. settings.php

...

  1. files,

...

  1. and

...

  1. edit

...

  1. them

...

  1. to

...

  1. reflect

...

  1. local

...

  1. settings.

...

  1. Bounce

...

  1. MySQL,

...

  1. start

...

  1. Apache,

...

  1. give

...

  1. Drupal

...

  1. ~10

...

  1. min

...

  1. to

...

  1. init,

...

  1. and

...

  1. test

...

  1. the

...

  1. machine.