You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

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 down Apache on the server being upgraded.
    /etc/init.d/web stop
    
  2. Backup the MySQL databases
    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
    
  3. Check version of MySQL, and shutdown MySQL on the server if it is not the OS provided version (5.0.45 x86_64 on the 64 bit RHEL5.1 servers)
    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.
        ###  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.
        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
        
  4. Install correct version of MySQL, if necessary, and reconfigure it.
    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.
        grep user /etc/init.d/mysqld
        
      • Should return the following line.
        get_mysql_option /etc/my.cnf user "db"
        
      • If it does not, download the correct init script from the AMIT DSL.
        scp dracus@athena.dialup.mit.edu:/afs/athena.mit.edu/project/amit-dsl/Public/MySQL/mysqld /etc/init.d/mysqld
        
    2. Grep for pid file.
      grep pid /etc/my.cnf
      
      • Should return the following line.
        pid-file=/home/db/mysql.pid
        
      • If it does not, update the /etc/my.cnf file to contain that config line.
  5. Log into Nebula/Lockbox (the RadminD server), and link the host command filename to the legacy PHP command file.
    cd /var/radmind/command/isda
    ln -s legacy-php-rhel5.1-x86_64.K [hostname].K
    
    • Replace '[hostname]' with the base hostname of the server being upgraded.

  • No labels