Results 1 to 15 of 15

Thread: Setup second Dedicated Server for MySQL and EMAIL Hosting for another WHM Server

  1. #1
    Registered Member
    Join Date
    Sep 2010
    Posts
    5

    Default Setup second Dedicated Server for MySQL and EMAIL Hosting for another WHM Server

    Hello everyone,

    I have a current dedicated server that i would like to use for apache and whm/cpanel dns. I would like to get another dedicated server an have it be my Email and MySql Server with cpanel and without any whm features so it could be administrated easily. What are the steps i need to take to accomplish this ?

    Thank you for the support.

  2. #2
    cPanel Staff cPanelJared's Avatar
    Join Date
    Feb 2010
    Location
    Houston, TX
    Posts
    1,792
    cPanel/WHM Access Level

    Root Administrator

    Default Not possible as you describe

    There is no provision in cPanel for creating the type of cluster configuration you appear to be requesting. The only service that can be clustered currently is DNS. You may be interested in our DNS cluster documentation for more information about this feature.

    You can use a remote MySQL server for your databases. This is not meant to be a clustering system; rather, the MySQL service on the local server needs to be shut down, and the remote server will handle all MySQL transactions. Full information about setting up a remote MySQL server can be found here.

    For mail, you can simply make the MX records point to another server, but there is no direct provision for cPanel on one server to be able to control e-mail accounts on another server. Changes you make in the e-mail configuration on the local server would have no effect on the remote server that actually hosts the mail for the accounts. You can come close to what you want by using one cPanel server as a backup e-mail server, but you would still need to manage the accounts on each server separately.

    The type of clustering for most services you are requesting is planned for cPanel 12, but there is no timeframe for when this will be available.

    Other users may have developed work-arounds and third-party add-ons that make this type of clustering possible with current cPanel versions, but I am describing what is currently possible with "stock" cPanel, with no modifications or add-ons. I hope this helps.
    Last edited by cPanelJared; 10-21-2010 at 11:17 AM. Reason: Expanding on explanation for clustering e-mail
    For hands-on assistance, please reference our new support information page: Where should I go for support?
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists(Alt) - Documentation - Find cPanel hosting


    -- Jared Ryan, Technical Analyst, cPanel Technical Support

  3. #3
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,609
    cPanel/WHM Access Level

    Root Administrator

    Default

    I did want to expand on the backup mail exchanger idea for emails. As Jared mentioned, you cannot have a cluster for the mail servers, but you could have a setup for each cPanel created account to set it as a backup mail exchanger.

    In WHM > Create a New Account area, you'll see this option:

    Backup Mail Exchanger less »

    Configure server as a backup mail exchanger. Mail will be held until a lower number mail exchanger is available.
    How this works would be that the email machine you have as the primary mail machine (primary MX record) will receive emails normally, and when that machine is down, the cPanel machine will be the secondary MX for the accounts. It would receive the emails during the time the primary MX is down, and then deliver those emails to the primary machine once it's back up again.

    In this type of setup, the email accounts would need to be created on both machines (primary MX mail machine and secondary MX cPanel machine).
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  4. #4
    Registered Member
    Join Date
    Sep 2010
    Posts
    5

    Default A Big Big THANK YOU!

    I would like to Thank you so much for helping me and Answering my post am i Really Appreciate it a lot!


    I can't wait till cpanel 12 comes out

  5. #5
    Registered Member InterServed's Avatar
    Join Date
    Jul 2007
    Posts
    255
    cPanel/WHM Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by amusic View Post
    I would like to Thank you so much for helping me and Answering my post am i Really Appreciate it a lot!


    I can't wait till cpanel 12 comes out
    Watching how cPanel progress works i could estimate we still need to wait for like one year or so.

  6. #6
    Registered Member
    Join Date
    Jul 2004
    Posts
    135

    Default Re: Setup second Dedicated Server for MySQL and EMAIL Hosting for another WHM Server

    Too bad that this take ages to be build. Clustering DB/Apache etc is vital in hosting now days.

  7. #7
    Registered Member hostmedic's Avatar
    Join Date
    Apr 2003
    Location
    Washington Court House, Ohio, United States
    Posts
    559
    cPanel/WHM Access Level

    DataCenter Provider

    Default Re: Setup second Dedicated Server for MySQL and EMAIL Hosting for another WHM Server

    Can multiple cPanel servers share a Remote MySQL easy?
    I know there are some databases that are the same on each server (roundcube, horde, etc)



    Feel like your Cloud Provider's just weathering the storm? Hop Off the Cloud - The Weathers nicer over here.

  8. #8
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,609
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Setup second Dedicated Server for MySQL and EMAIL Hosting for another WHM Server

    Hello hostmedic,

    Multiple cPanel servers can share the MySQL remote database machine, although I am uncertain if I would be able to define easily in describing it. It can be done and it has been done, but usernames cannot conflict in the database.

    One solution for Roundcube might be to convert it to SQLite rather than using MySQL in that instance to ensure it doesn't need to use the remote MySQL database, which then leaves only Horde to deal with in that scenario.

    To convert a Roundcube database from MySQL to SQLite, it is simply issuing this command on the cPanel machine in root SSH:

    Code:
    /scripts/convert_roundcube_mysql2sqlite
    Thanks.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  9. #9
    Registered Member hostmedic's Avatar
    Join Date
    Apr 2003
    Location
    Washington Court House, Ohio, United States
    Posts
    559
    cPanel/WHM Access Level

    DataCenter Provider

    Default Re: Setup second Dedicated Server for MySQL and EMAIL Hosting for another WHM Server

    Thanks - I used roundcube as an example -
    Generally we stick with all servers using the old style of mysql - where the database is the cpanel username + the db name like this cpname_dbname

    I will give it a shot later today migrating a few together and see how it goes.
    That will be really handy to say the least. :-)



    Feel like your Cloud Provider's just weathering the storm? Hop Off the Cloud - The Weathers nicer over here.

  10. #10
    Registered Member hostmedic's Avatar
    Join Date
    Apr 2003
    Location
    Washington Court House, Ohio, United States
    Posts
    559
    cPanel/WHM Access Level

    DataCenter Provider

    Exclamation Re: Setup second Dedicated Server for MySQL and EMAIL Hosting for another WHM Server

    While asking for clarification to this via a cPanel ticket - Ken, like always, gave a quick response as well as made it very clear:

    While cpanel does have tools to point mysql usage to a remote database, it's not supported to have multiple cpanel installs use the same database at this time. The scripts that install php based applications, such as wordpress, will be modified to use the remote database, but the problem is all the sql using services that cpanel manges which are managed with the assumption that only one instance of cpanel is working with the remote sql server.

    For example, when horde is updated, the user/password is reset. That new password is randomly generated and stored at /var/cpanel/hordepassword. If two machines are using the same remote database, one will change the password and the other will change it again breaking connectivity for the first one, roundcube works the same way, as does, cphulkd, and cpanel's own management of mysql.

    The only way to work around this is to manually sync the passwords in /var/cpanel/hordepassword, /var/cpanel/roundcubepassword, /root/.my.cnf, and a few others, however it is still likely you will run into problems using that setup which is why it's not supported nor is it recommended.
    Sadly this is a real pain - but I understand. I am hoping cPanel can help us with this in the future and perhaps the easy fix is just to have all the databases use something like an underscore_servername in the database table names - to allow us to get around this issue.



    Feel like your Cloud Provider's just weathering the storm? Hop Off the Cloud - The Weathers nicer over here.

  11. #11
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,609
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Setup second Dedicated Server for MySQL and EMAIL Hosting for another WHM Server

    The best solution in this instance is simply to convert Roundcube to SQLite and to remove Horde as a webmail option. I'd already mentioned Roundcube conversion, but most people prefer Roundcube over Horde regardless, so if your users can live without Horde, then simply drop it and convert Roundcube to SQLite.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  12. #12
    Registered Member hostmedic's Avatar
    Join Date
    Apr 2003
    Location
    Washington Court House, Ohio, United States
    Posts
    559
    cPanel/WHM Access Level

    DataCenter Provider

    Default Re: Setup second Dedicated Server for MySQL and EMAIL Hosting for another WHM Server

    So - what about any others cPanel uses?
    Just want to clarify this is possible - we ran into a few issues while trying this -
    using the SQL lite and disabling Horde is pretty simple - but want to make sure all other mysql databases wont go to the birds doing this.



    Feel like your Cloud Provider's just weathering the storm? Hop Off the Cloud - The Weathers nicer over here.

  13. #13
    Registered Member hostmedic's Avatar
    Join Date
    Apr 2003
    Location
    Washington Court House, Ohio, United States
    Posts
    559
    cPanel/WHM Access Level

    DataCenter Provider

    Default Re: Setup second Dedicated Server for MySQL and EMAIL Hosting for another WHM Server

    Quote Originally Posted by cPanelTristan View Post
    The best solution in this instance is simply to convert Roundcube to SQLite and to remove Horde as a webmail option. I'd already mentioned Roundcube conversion, but most people prefer Roundcube over Horde regardless, so if your users can live without Horde, then simply drop it and convert Roundcube to SQLite.
    Please hop in and peek @ cPanel tickets ID# 1358102 - are you saying something different than Kenneth?



    Feel like your Cloud Provider's just weathering the storm? Hop Off the Cloud - The Weathers nicer over here.

  14. #14
    Registered Member cPanel Partner NOC Badge
    Join Date
    Jun 2004
    Posts
    313
    cPanel/WHM Access Level

    DataCenter Provider

    Default Re: Setup second Dedicated Server for MySQL and EMAIL Hosting for another WHM Server

    Really the only other DBs I can see being a problem are the cphulkd and eximstats databases. I usually recommend disabling cPHulk in favor of CSF or APF+BFD anyways so that just leaves Eximstats. The chances of having a duplicate row/primary key in the Eximstats DB is slim-to-none and slim just left town, so what you'll be left with is a database that has mail stats for all of the cPanel servers using that MySQL instance.

    Of course cPanel is probably going to act weird if you try to create a user on one server that already exists on another, but I presume you would have some sort of procedure to ensure that isn't attempted.
    NDCHost (ProVPS): Xen VPS / Dedicated / Co-Location
    Contact us for your cPanel Licensing needs! We price match, provide better support, and take care of our customers!

  15. #15
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,609
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Setup second Dedicated Server for MySQL and EMAIL Hosting for another WHM Server

    There are different methods to achieve the same purpose to try to get multiple machines to connect to one remote MySQL server. What Ken has stated is sound on the option to keep Horde and simply change the password and re-sync it for all the machines. I personally believe it is easier to not use Horde at all and convert Roundcube to SQLite.

    Next, please note that there is nothing in our documentation that states you cannot have multiple MySQL machines connected to a remote MySQL machine. This doesn't indicate we support that setup. If you want to pursue multiple machines to one MySQL machine, you can do it but you will run into some issues that I had already mentioned originally. For example, another consideration would be eximstats and cphulkd also have individual databases. eximstats is going to be skewed for users on both machines and cphulkd will probably need the password re-sync for it as well (if you are using cphulkd on the machines). If cphulkd blocks a user on one machine, that user is going to be blocked on the other machine(s).

    The biggest issue beyond the webmail clients; however, is one I already noted that usernames cannot conflict. You would not be able to have a user admin on one machine and another user admin on another machine. If you do, both users will likely be able to see the databases of the other user in their cPanel account due to the wildcard grant for admin_ for cPanel systems with database prefixing, which looks similar to the following:

    Code:
    GRANT ALL PRIVILEGES ON `username\_%`.* TO 'username'@'%'
    As such, you cannot have the same user on multiple machines in this setup.

    Ken and I discussed this entire matter prior to my latest reply. As far as I can see, we are simply indicating different mechanisms to use for webmail in the setup you are wanting to try.

    Finally, if you do end up trying to achieve this, please only setup two machines for testing it out initially to ensure it works and you are able to see what issues arise. This way you can easily convert back if needed.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads

  1. Trying to setup WHM for Dedicated Server (having troubles)
    By TrayHosting in forum General Discussion
    Replies: 1
    Last Post: 06-01-2014, 09:22 AM
  2. WHM setup for dedicated server
    By eskimoroll in forum General Discussion
    Replies: 1
    Last Post: 03-15-2011, 05:32 AM
  3. Replies: 3
    Last Post: 10-21-2010, 06:51 PM
  4. Replies: 0
    Last Post: 03-01-2009, 06:23 PM
bargain