Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cPanel upgrade CentOS 5 to CentOS 6

Discussion in 'General Discussion' started by Mise, Aug 3, 2017.

Tags:
  1. Mise

    Mise Member

    Joined:
    May 15, 2011
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    51
    I know I'm going with some delay but I want to upgrade to CentoOS 6.
    I have read some guides but mostly are addressed to migrate to a new server. In my case the server it's the same one.

    I have enough space in an external FTP server to store the customer accounts. My plain is to make a new clean install of CentOS 6 in the same server, then downloading all the backup accounts to some folder, and from here restore all the accounts.

    I have 5 questions:

    1 - The new server should be able to host one additional PHP v5.3 for some old websites. What's the best way to install an additional php 5.3 version in CentOS 6? Is there some tutorial?

    2 - I have Apache/2.2. Should I rectify all the .htaccess in all the websites?

    3- Now the server has MySQL v 5.1.73. Should I make some tuning in the new server with old passwords or something?

    4- Can I expect a successful import of customers accounts or there are some unavoidable problem to solve manually? Which are?

    5 - Is there some CPanel tool to export and import all the customers accounts, packages, etc.. at one time? It can work importing form the same server as in my case?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,480
    Likes Received:
    60
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,


    1 - The new server should be able to host one additional PHP v5.3 for some old websites. What's the best way to install an additional php 5.3 version in CentOS 6? Is there some tutorial?
    -> New cPanel installation are shipped with Easyapache4 and cPanel has removed the PHP 5.3 version from it, the only available one is PHP 5.4, 5.5, 5.6, 7.0, 7.1, and higher. If you want PHP 5.3, you can install CloudLinux on the new machine that has PHP 5.3 availale in it..

    2 - I have Apache/2.2. Should I rectify all the .htaccess in all the websites?
    -> I don't think there will be any need to change anything in the .htaccess as long as as the modules used in it are available on the new system.

    3- Now the server has MySQL v 5.1.73. Should I make some tuning in the new server with old passwords or something?
    -> New server will be shipped with MySQL 5.5 or 5.6 (MariaDB will also be an option). When you restore the accounts, there will be chances of database restoration fails and for this you may have to enable the backward compatibility (like PHPmyadmin has ) and when you restore those database, you have to upgrade it because 5.1 has been deprecated for long now..

    4- Can I expect a successful import of customers accounts or there are some unavoidable problem to solve manually? Which are?
    -> Since you are on older version of MySQL, you may have to do some extra efforts for restoration..

    5 - Is there some CPanel tool to export and import all the customers accounts, packages, etc.. at one time? It can work importing form the same server as in my case?
    -> cPanel transfer tool is available for migration, which you can use...

    My preference would be that you install CentOS 7 because CentOS 6 may also deprecate soon (not sure when).
     
    Mise likes this.
  3. Mise

    Mise Member

    Joined:
    May 15, 2011
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    51
    just one question: Are you sure the transfer tool can use the cpanel backup accounts from the same disk?

    I don't know very much about CloudLinux but I suppose it would force to some equal distribution of the server resources among users. However, I have some users who need more resources conssumption than others. I don't know really how it works but if I'm right then I don't understand where is the benefit in cutting the resources for those who need it instead others.
    What's the main reason to change to CloudLinux?.

    (I add: I suppose that still there is no problem in CPanel to compile and install php 5.3 with DSO and keep it for those websites I wish. Just by adding the include in Apache and the handler to SuPHP. It would keep php5.3 independent from EAsyApache4 but working)


    About upgrade to CentOS 7, I was looking that, although I'm not sure if jumping 2 versions it would be more problematic. Do you think it will work in the same way when importing the accounts?



    lot of thanks for the valuable help!
     
    #3 Mise, Aug 4, 2017
    Last edited: Aug 4, 2017
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @Mise,

    I'm happy to help answer any questions you have about the migration process.

    EasyApache 4 is installed with new installations of cPanel and it does not support PHP 5.3 due to it's EOL status and security vulnerabilities. The only way to use PHP 5.3 would be to purchase CloudLinux and use it's PHP Selector option:

    CloudLinux - Main | New template

    Could you verify the specific .htaccess lines or entries you are concerned about?

    You can run the following command on the existing server to determine if any of your MySQL users are using the old style passwords:

    Code:
    mysql -e "select User,plugin from mysql.user where plugin = 'mysql_old_password';"
    If so, the following document explains how to upgrade the passwords for these users:

    MySQL :: MySQL 5.6 Reference Manual :: 6.3.8.3 Migrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin

    The most common issues relate to the change in PHP versions (e.g. scripts that use functions unsupported in newer versions of PHP). It's difficult to know of any exact issues that will arise, but we are happy to help you troubleshoot any problems that you notice post-migration.

    You can use "WHM >> Backup Configuration" and choose the remote FTP destination to have backups automatically sent to the remote FTP server. As for the restoration process, we provide documentation on restoring multiple backups at:

    Backup Restoration - Documentation - cPanel Documentation

    Additionally, the following option is available for backing up and restoring service configurations:

    The cpconftool Script - Documentation - cPanel Documentation

    However, keep in mind you need to manually transfer these service configuration backup files to the remote FTP server, as they are not included with the standard backups.

    I recommend CentOS 7 over CentOS 6 if you prefer a more future-proof OS. cPanel fully supports the use of CentOS 7.

    Let us know if you have any additional questions or concerns.

    Thanks!
     
  5. Mise

    Mise Member

    Joined:
    May 15, 2011
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    51
    I suppose when you says "the only way" you mean there is not integrated support in CPanel to php5.3. This is something that I understand. However, I suppose that there is not any Cpanel code to impede the execution of php 5.3. It would be really a disaster

    There are customers with complex code for php5.3. They don't want to pay more neither to renew their websites. For these customers I have php 5.3 with some extra security. In the recent years I had no serious security problem with all them.
    (Although I had some problems with updated Wordpress working with php5.6 because no special attention to them).



    good to know. Although at this moment I prefer the server can distribute the peaks of work among different users and time periods.

    thanks, that's useful to know. That command return:
    ERROR 1054 (42S22) at line 1: Unknown column 'plugin' in 'field list'

    Can it means no problems expected with mysql passwords?

    this will not be a problem in my case if I can install php5.3 for several websites. The rest already is for php5.6 and I believe it should work.

    my question was not really about FTP but about restoring the accounts from some folder in the same disk. I think the cpanel script backup_restore_manager can do this

    From cpanel docs: (Backup Restoration - Documentation - cPanel Documentation):
    Code:
    /usr/local/cpanel/bin/backup_restore_manager add user=temptest restore_point=2016-02-26 mail_config=1 mysql=1 subdomains=1
    
    It works in the same way?
    /usr/local/cpanel/bin/backup_restore_manager add user=temptest



    (I say this because probably I cannot use the FTP directly for the restore process)

    well, after some time with CentOS 6 I will migrate to CentOS 7. Although now I prefer CentOS 6 because there is more info.


    Please, if you can write me something more specific about importing the accounts from the same disk, I would be grateful to know.


    thanks for the support



    .
     
    #5 Mise, Aug 4, 2017
    Last edited: Aug 4, 2017
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    There's no way to install PHP 5.3 with EasyApache 4 without the use of third-party software (e.g. CloudLinux). This is discussed some more on the following feature request:

    Allow to install PHP 5.3 in Easy Apache 4 with the understanding that these versions are not secure.

    Yes, you can use that method to restore the accounts from backups. Keep in mind that you'd need to have the backup directory mounted on a separate hard drive or partition from the OS, as reinstalling the OS to use CentOS 6 will erase the contents of the existing partition.

    You are unlikely to notice any issues if you were not already using the "Use old style (4.0) passwords with MySQL® 4.1+ (required if you have problems with PHP apps authenticating)" option in "WHM >> Tweak Settings".

    Thank you.
     
Loading...

Share This Page