Linux: Entire Inplace Red Hat to Centos/Mediawiki fix. Including extending the volume
Inplace upgrade example from Red Hat to Centos
This includes fixing MediaWiki
#Increasing volume size if more space is needed.
fdisk -l
fdisk /dev/sda
#Allocate more available space – For a virtual machine increase the disk size.
reboot
fdisk -l
pvcreate /dev/sda4
vgextend VolGroup00 /dev/sda4
vgdisplay VolGroup00 | grep “Free”
lvextend -L+30G /dev/VolGroup00/LogVol00 or lvextend -l+17818 /dev/VolGroup00/LogVol00
ext2online /dev/VolGroup00/LogVol00
resize2fs /dev/VolGroup00/LogVol00
df -h
#Red Hat to Centos conversion
yum clean all
mkdir ~/centos
cd ~/centos/
uname -a
cat /etc/redhat-release
wget http://mirror.rit.edu/centos/5.8/os/i386/RPM-GPG-KEY-CentOS-5
wget http://mirror.rit.edu/centos/5.8/os/i386/CentOS/centos-release-5.8.el5.centos.i386.rpm
wget http://mirror.rit.edu/centos/5.8/os/i386/CentOS/centos-release-5-8.el5.centos.i386.rpm
wget http://mirror.rit.edu/centos/5.8/os/i386/CentOS/centos-release-notes-5-8.el5.centos.i386.rpm
wget http://mirror.rit.edu/centos/5.8/os/i386/CentOS/centos-release-notes-5.8-0.i386.rpm
wget http://mirror.rit.edu/centos/5.8/os/i386/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm
wget http://mirror.rit.edu/centos/5.8/os/i386/CentOS/yum-updatesd-0.9-2.el5.noarch.rpm
wget http://mirror.rit.edu/centos/5.8/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
wget http://mirror.rit.edu/centos/5.8/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
wget http://mirror.rit.edu/centos/5.8/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.noarch.rpm
wget http://mirror.rit.edu/centos/5.8/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
rpm -import RPM-GPG-KEY-CentOS-5
rpm -e –nodeps redhat-release
rpm -e yum-rhn-plugin
rpm -Uvh –force *.rpm
yum upgrade
reboot
yum update
reboot (if needed)
MediaWiki Fix
#Upgrade PHP
php -v
#Query yum to see what php modules are installed
yum list installed | grep php | cut -d’ ‘ -f1
#Query yum to see what php53 modules are available
yum search php53 | cut -d’ ‘ -f1 | grep php
service httpd stop
yum remove php php-cli php-common php-ldap php-mysql php-pdo
yum install php53 php53-cli php53-common php53-ldap php53-mysql php53-pdo
service httpd start
#Check mysql to make sure the version number is comatible with MediaWiki
mysql -V
mysqldump –user=root –password –all-databases > mysqlbackup.sql
cd /var/www/html
ls
mkdir wiki-bak1
cp wiki/* wiki-bak1/ -R
cd wiki
cd maintenance/
php update.php
service httpd restart