How to upgrade CentOS 6 to CentOS 7
Users wanting to upgrade to CentOS 7 should no longer follow this guide. If you do some services will break because the upgrade assistance no longer works. First2Host is offering all cPanel server users with other providers new Dedicated or VPS servers with CentOS 7 installed with cPanel and all accounts migrated to your server for free. First2Host will match and beat any other provides price and resources for new customers. Contact our sales team for more information.
Legacy Install Instructions – Upgrade CentOS 6 to CentOS 7
Now that CentOS 7 is maturing many users will want to upgrade from the older version of CentOS. Here we show you how to complete the upgrade. Please make sure you have sufficient backups of your server before completing this. It’s advisable to take a snapshot backup if you’re upgrading a VPS server. You can do this from your VPS control panel.
We need to add the yum repository for developer software by creating the file /etc/yum.repos.d/upgrade.repo. Then copy the below upgrade code into the file
nano /etc/yum.repos.d/upgrade.repo
[upgrade] name=upgrade baseurl=http://dev.centos.org/centos/6/upg/x86_64/ enabled=1 gpgcheck=0
Now install the required packages which are, preupgrade-assistant-contents, redhat-upgrade-too, and preupgrade-assistant:
yum install preupgrade-assistant-contents redhat-upgrade-tool preupgrade-assistant
Now need to import the GPG key. We are using the one from CentOS:
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7
Then import the GPG key and start the upgrade:
/usr/bin/redhat-upgrade-tool-cli --force --network 7 --instrepo=http://mirror.centos.org/centos/7/os/x86_64
If you are confronted with any errors try to clear the database cache
yum clean dbcache
Finally, reboot the system and the upgrade will be completed
How was this article? – How to upgrade CentOS 6 to CentOS 7
[kkstarratings]
More from Dedicated Servers
Enable Mod_RemoteIP – See Visitors Real IP address when using Cloudflare & Apache
If you are using Cloudflare on your Apache server you will always see Cloudflare IPs in your logs and not …
Fix 413 Request Entity Too Large Errors When Using NGINX
Just like Apache, NGINX imposes default limits on the size of files that can be uploaded. A 413 Request Entity …
Cloud-init Modules That Automate and Customize Deployments
Cloud-init is a popular way to automate deployments of instances in a cloud or none cloud environment. To save having …