|
cPanel Version 11 - Update ChecklistContents
1. Accessing the Command Line Interface Recently cPanel.net released the latest stable version of the cPanel/WHM system, version 11.2.0. More information on this new update may be found at http://www.cpanel.net/products/cPanelandWHM/linux/cpanel11/index.html We have found that several important updates are either necessary or recommended for optimal performance under this new version of the cPanel/WHM system. This article provides very thorough instruction on how you can perform these updates yourself, however the possibility that the updates may not complete as this article expects does exist. If you feel that you cannot perform these updates yourself, or would rather have our staff perform these updates for you to avoid any issues, please contact our Support Division at https://desk.hostdime.com/ and request that our staff perform these updates for you. NOTE: It is very important that we perform these updates for you at an appropriate time to avoid any situation which you or your clients may interpret as downtime. To achieve this it is best that these updates occur during a time period where the server is receiving the least amount of activity (i.e. high traffic, CPU, and memory usage). If you decide to request our staff to perform these updates please let us know what time of day (including time zone) you believe your server has the lowest amount of CPU and memory usage. Typically such usage occurs during non-peak/low traffic hours during the early morning (2 AM EST - 7 AM EST), however since many of our clients provide services to global regions of the world other than North America, we will need you to provide us with what you believe to be the best time for these updates. As always, please also provide our support team with the necessary information so they may log into your server (IP address, hostname, root pass, SSH port, su user credentials). If any custom configurations have been made to your server regarding your Apache, Exim, MySQL, or other systems which are provided by the cPanel/WHM system, we advise that you open a ticket via our helpdesk (link is provided above) with a description of these customizations and request that we perform the updates for you. Our support team will be more experienced in dealing with the most common conflicts with such custom configurations, and thus will be able to avoid them or at least handle them in the quickest fashion possible once the conflicts or issues are detected. DisclaimerWhile the instructions below are very thorough, and presented for clients which do not have a high level of technical proficiency, there is a chance that unexpected conflicts or issues may occur during these updates. We would rather perform these updates for you than risk any downtime or issues for your websites or clients in the event that any unexpected issues occur. We are providing the instructions for this update below for customers which feel they are technically proficient enough to perform these updates themselves (and thus retain control over the process). Be advised that by following these instructions that you do so at your own risk. If you decide to follow these instructions yourself and run into any issues, please do not hesitate to contact our Support Division team via the HostDime Helpdesk at https://desk.hostdime.com/ with a description of what you have done and what issues have occured during the update. 1. Accessing the Command Line Interface - Back to TopSome of the steps of this update require that you access the command line interface of your server using a secure shell (SSH) client program, and running the commands as instructed. Below are instructions for those using the Windows and Macintosh platforms. Windows Users If you are using Windows, you can access the command line interface of your server by using a secure shell (SSH) client program known as Putty. You can download the Putty.exe file by clicking here. When you run this program you will see a window such as the following:
Under the 'Host Name (or IP address)' field enter the hostname or IP address of your server (or just use one of your domain names if you like). Under the 'Port' field you should just leave it as '22', unless you happen to know that your server is using a different SSH port. After you've entered the information in, click on the 'Open' button at the bottom. Next you will be prompted to enter your login name after 'login as:'. Enter the username 'root' then press the ENTER key. Next enter the root password for your server (the same one you use for WHM) then press ENTER again.
After a message which indicates the last login made with your username (along with the IP address which the root user logged in from) you will see the command prompt. It is from this line that you will enter the commands as instructed in the sections which follow.
If you wish to copy and paste the commands provided in the sections below, just copy the commands to your clipboard, then click on the title bar of the window to make sure the Putty window is selected. Next right click with your right mouse button, inside of the black area of the window, and your command will automatically paste into the window at the command line. If you are copying a block of commands, all commands except for the last one will automatically be run. Make sure you press the ENTER key once after pasting a block of commands to make sure all commands are successfully run. Mac OS X Users If you are a Macintosh user running the Mac OS X operating system you can use the program called "Terminal" which is included with your operating system inside of the Applications -> Utilities folder. Double click on this program to open it, and then connect to the server using the following command: ssh -l<username> <servername> -p<port>
For example, to connect to a server named 'myserver.mydomain.com' as the 'root' user, with the server using port 1234 (standard secure shell port is normally 22), you would use this command: ssh -lroot myserver.mydomain.com -p1234 2. Upgrade to Perl 5.8.8 - Back to TopSince the cPanel/WHM system heavily relies on scripts programmed in Perl version 5.8.8, it is necessary that you update to the latest Perl version. If you are not running the latest Perl version, then you should expect to have some problems with either the upgrade or cPanel/WHM version 11. To check if you are already running Perl version 5.8.8, you can run the 'perl -v' command. In this example the server is running version 5.8.5.
If you are already running Perl version 5.8.8, continue to the next step of this tutorial (Mail Format Conversion ). If you are not running Perl version 5.8.8, continue with the steps below. Performing Update You can copy the following command block from this webpage, and then right click in your Putty window so it will paste the commands to the command line. Press enter a couple times to make sure the commands complete. This will install the new Perl version all at once. wget http://layer1.cpanel.net/perl588installer.tar.gz; tar xfvz perl588installer.tar.gz; cd perl588installer; ./install; I will continue with instructions which show how these commands are run separately for those who wish to make sure they receive the same results just as I have in the example screenshots. If you receive any errors, its best to contact our support instead of continuing with this update. The next step is to download the Perl source code package. You can do this by running 'wget http://layer1.cpanel.net/perl588installer.tar.gz' then pressing ENTER. You will see some output which indicates how far the download has progressed. After the download of the package has completed, you should see something similar to this:
Next use the command 'tar xfvz perl588installer.tar.gz' to unpackage (like unzip) the file.
Then use the 'cd perl588installer' command to change to the directory of the new folder of files we've placed into the 'root' users home directory.
Last run the './install' command to run the installer script. You will see something similar to this window as the actual Perl source code is downloaded from the cPanel system file repository server. Many more commands will fly up the screen as the new Perl version is compiled and installed.
If you see many errors at the end of the process, with a message that indicates a test failure, then contact our support team to perform this Perl update for you.
If instead you receive a message such as this which indicates no failures, then you should continue. Note that it says 'Tested 107, 107 ok, 0 failed.' This is the message you want to see at the end of the process.
After you are done performing the Perl update, use the command 'cd ..' to return to the directory you were in before.
Next run the following command to remove the files which you downloaded for the update. This will remove both the directory and the original package file you downloaded. rm -rf perl588installer; rm -rf perl588installer.tar.gz;
Verifying Update Run this command to verify that the cPanel 11 update is completed: perl -c /scripts/wwwacct
If you do not see any errors, then everything should be fine. If you do receive any errors, then run the following commands to ensure that everything is updated. /usr/local/cpanel/bin/checkperlmodules
Then run this command to force the update of cPanel 11 (updating anything which was originally missed) /scripts/upcp --force
3. Mail Format Conversion - Back to TopThere are two mail formats which were available for the cPanel/WHM system under version 10. Mbox Mbox is a mail format which stores all of the email messages for a particular mailbox (such as a users Inbox or Trash folder) to be stored inside of a single file on the servers hard drive. Under this mail format, an Inbox with 1 GB of messages will cause an increased amount of memory and CPU resources just to open the file and obtain the messages when the user checks their email via POP3, IMAP, or webmail. This obviously results in poor performance for the server. Originally this mail format was to be discontinued in cPanel version 11, however by high demand the cPanel developers decided to leave support for this format available in cPanel 11 to avoid the widespread issues which the update would cause for the servers which have not been converted away from the Mbox mail format. It is expected that cPanel version 12 will not support the Mbox mail format, and thus it is critical that you make sure that your server is converted to the new Maildir format before the cPanel 12 update occurs. It is also recommended that the mail conversion take place before the cPanel 11 update occurs to avoid any issues. If your server has already updated to cPanel 11, please do continue with the mail conversion. This is merely a recommendation we are making to avoid issues which may occur. MailDir Unlike the Mbox mail format, a mailbox on a server using the Maildir mail format is represented as an individual folder on the servers hard drive, with each email message stored as a separate file under this folder. This obviously makes for a more efficient mail system, and improved server performance (or lack of possible poor performance). This mail format is not supported by the NeoMail webmail program (the NeoMail development project has also been discontinued), and thus all cPanel/WHM systems which are converted to the MailDir format will no longer provide the NeoMail program as an option. Disclaimer During the conversion, all incoming mail will be stored in the Exim mail server queue until the conversion is completed. After the conversion is completed the mail server will begin to deliver the mail which was queued to the local mailboxes hosted by the server. If your clients send mail from the server during the conversion, the messages will be sent without any issues, however as stated the incoming mail will wait inside of the queue until the conversion is completed. Due to this delay with incoming mail, its important that the mail conversion occur during non-peak usage of the server otherwise you will receive complaints from your clients indicating that they have not received email which they have expected. The mail conversion from may take several hours, and will increase the load average for your server while the conversion occurs, which may result in the server responding very slow. It is highly recommended that you perform the conversion on your server during non-peak hours when the server is receiving the least amount of traffic. Optimizing the Conversion All cPanel accounts have usernames which reflect the same username of an actual Linux user account located on the server. Due to Linux user standards, this account is able receive mail. The cPanel system is designed to allow you to access the mail inside of this account via the cPanel or webmail, even though there is not a direct email address assigned to the account. On many older cPanel servers this primary account was assigned as the catch-all mail account by default when it was created on the server. This Default Catch-All setting specifies where email messages should be routed if they are not addressed to an actual mail account or forwarding address on the server. Typically this primary cPanel user email account goes unused, and thus causes the cPanel accounts to exceed their disk quota after several megabytes or gigabytes of spam messages (sent to non-existing addresses) are received. Fortunately the latest cPanel versions setup new accounts to bounce back email messages received for email addresses which do not exist. Since your server may still have many of these types of accounts with extremely large mailboxes which are full of spam, it is recommended that you advise your clients to clear out these mailboxes of unnecessary messages before you continue with the mail conversion. The primary cPanel user mail account can be cleared by setting up a temporary IMAP mail account setting inside of a mail client program such as Outlook Express (included by default with Windows XP) or Thunderbird, then connecting to the server and deleting all the mail. IMAP will be more efficient than POP3 as a mail access method as the IMAP method does not download the content of the messages unless you select a single message to view it (unlike POP3 which downloads all messages before removing them from the server). If you advise your clients to clear out the primary mailbox, make sure you also instruct them to reconfigure the default catch-all setting for their cPanel account so that it bounces back the messages using the ' :fail: no such address here' setting. This is done via the Mail > Default Address area of the cPanel.
Already Converted To perform the conversion you will need to access the command line of your server as instructed in the first section above. Run this command from the command line to check to see if your server is already using the 'maildir' mail format: /scripts/convert2maildir If the script reports that 'maildir is enabled' above the numerical menu of options, then your server is already using the maildir mail format. If the script outputs 'maildir is not active, this system is using mbox', then continue with this section. Rebuilding RPM Database Some of our technicians have found that the Redhat Package Manager (RPM) database on the servers was corrupted, and this led to the mail conversion not completing as it should have. Run the following commands to ensure this database is not corrupted before you proceed: rm -fv /var/lib/rpm/__db.*;
Checking for Free Space Before you continue with the conversion, its important that you make sure you have at least 5 gigabytes of disk space (10 gigabytes recommended) available on your servers primary drive. To do this you can run the following command to view the partitions which are mounted to the file system on your server: df -h;
As you can see from the example above, the /dev/hda5 partition has 106 GB total, 31 GB used, and 70 GB avaialble for use. This is the primary partition of the server as it is indicated as mounted on '/'. If you see a line which details a partition mounted to /home, make sure the partition is also noted to have at least 5 - 10 GB of available disk space. To proceed with the next step, Backup Email Accounts, you will need to make sure that at least 10 GB of disk space is available on the backup drive attached to your server (if one is present). This is denoted in the same output mounted to /backup.
If you do not have enough space on the server to continue with the backup or the conversion, or you have no backup drive setup on your server, please contact our Support Division at https://desk.hostdime.com/ for further assistance. Backup Email Accounts Run the backup script using the following command: /scripts/convert2maildir After you run this command you will be prompted with a menu like so. Select option #1 to backup all the mail folders on the server. This will ensure that if any issues occur during the conversion, you will be able to restore from the backup.
You will be prompted to confirm that you wish to continue, as the backup will overwrite any previous backup. Since you haven't run this script before, enter 'y' and press ENTER to continue.
You will begin to see all of the accounts being backed up as they are performed. |