...
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.
...
- Shut
...
- down
...
- Apache
...
- on
...
- the
...
- server
...
- being
...
- upgraded.
...
Code Block
...
/etc/init.d/web stop
...
- 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
...
- 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
...
- 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 possible, use RPM to remove the version of MySQL that is there.
- Remove MySQL if it is not the correct version. Do not delete the data directories.
...
- 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
...
- 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
...
- 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
- Grep for user.
- 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.
...
- 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
...
- Grep for pid file.
Code Block grep pid /etc/my.cnf
...
- Should return the following line.
Code Block pid-file=/home/db/mysql.pid
- Should return the following line.
...
- If it does not,
...
- update
...
- the
...
- /etc/my.cnf
...
- file
...
- to
...
- contain
...
- that
...
- config
...
- line.
...
- 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
...
- 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.
...
- Go
...
- to
...
- the
...
- RadminD
...
- client
...
- directory
...
- and
...
- delete
...
- the
...
- previous
...
- command
...
- and
...
- transcript
...
- files.
...
Code Block
...
cd /var/radmind/client/ rm -rf *
...
- Use ra.sh,
...
- and
...
- update
...
- the
...
- version
...
- of
...
- PHP
...
- on
...
- the
...
- system.
...
Code Block
...
ra.sh -c update /
...
- Edit the appliable transcript and make certain nothing that has not been backed up is going to be overwritten.
- Start Apache
Code Block /etc/init.d/web start
...
- If it starts,
...
- log
...
- in
...
- as
...
- www
...
- user,
...
- and
...
- test
...
- socket
...
- connection
...
- to
...
- mysql.
...
- Copy
...
- the
...
- php.ini,
...
- phpinfo.php
...
- and
...
- settings.php
...
- files,
...
- and
...
- edit
...
- them
...
- to
...
- reflect
...
- local
...
- settings.
...
- Bounce
...
- MySQL,
...
- start
...
- Apache,
...
- give
...
- Drupal
...
- ~10
...
- min
...
- to
...
- init,
...
- and
...
- test
...
- the
...
- machine.