Redhat yum to Centos

http://192.168.1.2/Centos72/Packages/yum-3.4.3-132.el7.centos.0.1.noarch.rpm
http://192.168.1.2/Centos72/Packages/yum-langpacks-0.4.2-4.el7.noarch.rpm
http://192.168.1.2/Centos72/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
http://192.168.1.2/Centos72/Packages/yum-plugin-aliases-1.1.31-34.el7.noarch.rpm
http://192.168.1.2/Centos72/Packages/yum-plugin-changelog-1.1.31-34.el7.noarch.rpm
http://192.168.1.2/Centos72/Packages/yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm
http://192.168.1.2/Centos72/Packages/yum-plugin-tmprepo-1.1.31-34.el7.noarch.rpm
http://192.168.1.2/Centos72/Packages/yum-plugin-verify-1.1.31-34.el7.noarch.rpm
http://192.168.1.2/Centos72/Packages/yum-plugin-versionlock-1.1.31-34.el7.noarch.rpm
http://192.168.1.2/Centos72/Packages/yum-utils-1.1.31-34.el7.noarch.rpm
rpm -qa | grep yum | xargs rpm -e –nodeps
rpm -ivh http://192.168.1.2/Centos72/Packages/yum-3.4.3-132.el7.centos.0.1.noarch.rpm http://192.168.1.2/Centos72/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm http://192.168.1.2/Centos72/Packages/yum-utils-1.1.31-34.el7.noarch.rpm http://192.168.1.2/Centos72/Packages/yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm http://192.168.1.2/Centos72/Packages/python-kitchen-1.1.1-5.el7.noarch.rpm http://192.168.1.2/Centos72/Packages/python-chardet-2.2.1-1.el7_1.noarch.rpm

rpm -ivh http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-updateonboot-1.1.31-50.el7.noarch.rpm

pvresize -v /dev/xvda2
lvs
lvextend -l +100%free /dev/mapper/rhel-root
lvresize -L 10 /dev/mapper/rhel-home

lvs
xfs_growfs /dev/mapper/rhel-root

dd if=/dev/zero of=/var/swap bs=1024 count=4000000
mkswap /var/swap
swapon /var/swap
chmod 0600 /var/swap
/var/swap swap swap defaults 0 0

4096000000 bytes (4.1 GB) copied, 132.766 s, 30.9 MB/s

pvcreate /dev/sdxx
vgextend media /dev/sdxx
lvm lvextend -l +100%FREE /dev/media/root
# resize2fs -f /dev/media/root
# reboot

CategoriesOS