Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Shut down Apache on the server being upgraded.
    Code Block
    /etc/init.d/web stop
    
  2. 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
    
  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)
    Code Block
    
    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
        
  4. 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
        
    2. 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.
  5. Log into Nebula/Lockbox (the RadminD server), and link the host command filename to the legacy PHP command file.
    Code Block
    cd /var/radmind/command/isda
    ln -s legacy-php-rhel5.1-x86_64.K [hostname].K
    
    • Wiki Markup
      Replace '\[hostname\]' with the base hostname of the server being upgraded.