multi-server setup on debian wheezy

Discussion in 'Installation/Configuration' started by saco721, Aug 13, 2013.

  1. saco721

    saco721 Member HowtoForge Supporter

    Hi,

    I was wondering if there is a multi-server setup guide for debian wheezy, or is it just for perfect server, as I can only find multi-server setup for debian squeeze?

    Many Thanks.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The multiserver wheezy guide is not ready yet, we will publish it as soon as it is abailable.
     
  3. MrWolf

    MrWolf New Member

    Hi,

    I do have a wheezy multi-server setup with MySQL cluster "master-to-master"

    while you wait for the official guide you can try to do this:

    Fallow this guide for building your two server:
    http://www.howtoforge.com/perfect-server-debian-wheezy-apache2-bind-dovecot-ispconfig-3-p3

    when you are at the MySQL part, fallow this guide (*for MySQL, unison and ispconfig only) :
    http://www.howtoforge.com/installing-a-web-email-and-mysql-database-cluster-on-debian-6.0-with-ispconfig-3

    on that guide, their is some step you need to avoid...

    DON'T DO THIS:
    in the file: /etc/mysql/my.cnf
    skip this on server 1:
    Code:
    master-host = 192.168.0.106
    master-user = slaveuser
    master-password = slave_user_password
    master-connect-retry = 60
    and skip this on server 2:
    Code:
    master-host = 192.168.0.105
    master-user = slaveuser
    master-password = slave_user_password
    master-connect-retry = 60
    
    and don't do this:
    Code:
    scp -pr /var/lib/mysql/* [email protected]:/var/lib/mysql/
    scp -pr /etc/mysql/debian.cnf [email protected]:/etc/mysql/debian.cnf
    you should have a working cluster

    in the cluster guide, don't install anything, for the installation, follow the wheezy guide.

    don't do it on a prod server, I reinstalled debian more then 10time before I get something stable.

    Hope this help

    Note*: I didn't install squirrel nor any other webmail client so I don't know if it will work or not if you install it
     
    Last edited: Aug 14, 2013
  4. MrWolf

    MrWolf New Member

    I forgot something important...

    after you setup your mysql cluster...
    do that command:
    Code:
    SHOW SLAVE STATUS \G
    in the mysql to verify that your replication is still up
    you should have something like this:
    Code:
    Slave_IO_State: Waiting for master to send event
    Slave_IO_Running: Yes
    Slave_SQL_Running: Yes
    
    and no error at the bottom.
    if you have any error, you may have done something wrong, post the error if needed.

    after you did that step on the server 1 from the cluster guide for debian 6:
    Code:
    CREATE USER 'root'@'192.168.0.106' IDENTIFIED BY 'myrootpassword';
    GRANT ALL PRIVILEGES ON * . * TO 'root'@'192.168.0.106' IDENTIFIED BY 'myrootpassword' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
    CREATE USER 'root'@'server2.example.tld' IDENTIFIED BY 'myrootpassword';
    GRANT ALL PRIVILEGES ON * . * TO 'root'@'server2.example.tld' IDENTIFIED BY 'myrootpassword' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
    FLUSH PRIVILEGES;
    QUIT;
    
    you will have an error on the sql of the server 2.
    just do this once:
    Code:
    stop slave;
    SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
    start slave;
    it will erase your error and everything will be back as normal
    check again with this:
    Code:
    SHOW SLAVE STATUS \G
    just to be sure

    you should not have any other error after that.
     

Share This Page