ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Linux Project

    IT Discussion
    5
    36
    5.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User
      last edited by

      I want to do a Linux project, I want to have 2 CentOS7 Servers and have DNS load balance, or provide failover, assuming one of the boxes fails.

      1. How do I have 2 linux boxes "sync" so there identical. They will have a full LAMP stack, and WordPress installed.

      2. How do I configure DNS to rotate between them, however if ones fails, just load the working one?

      scottalanmillerS 1 Reply Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller
        last edited by

        Truly identical you do with DRBD.

        ? 1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller @A Former User
          last edited by

          @Aaron-Studer said:

          1. How do I configure DNS to rotate between them, however if ones fails, just load the working one?

          That depends. Do you want to make them into a single, HA system? If so, configure DRBD and Pacemaker and turn them into a cluster.

          The NORMAL way to do this is to not do it at all. You just put both DNS entries into your DNS setup and your systems automatically try one then the other if the first one fails. No DNS level setup to do at all. DNS is naturally redundant.

          1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller
            last edited by

            Why are you running DNS on your web servers?

            ? 1 Reply Last reply Reply Quote 0
            • ?
              A Former User @scottalanmiller
              last edited by

              @scottalanmiller said:

              Why are you running DNS on your web servers?

              I am not, I am using cloudflare, can cloudflare do that for free?

              1 Reply Last reply Reply Quote 0
              • ?
                A Former User @scottalanmiller
                last edited by

                @scottalanmiller said:

                Truly identical you do with DRBD.

                Didn't want to do anything that highend. A once daily sync would be fine, I just don't want the site to be down. Since I am using wordpress could I just sync the DB? Any maybe sync the files using rSync?

                ? scottalanmillerS 2 Replies Last reply Reply Quote 0
                • ?
                  A Former User @A Former User
                  last edited by A Former User

                  @Aaron-Studer said:

                  @scottalanmiller said:

                  Truly identical you do with DRBD.

                  Didn't want to do anything that highend. A once daily sync would be fine, I just don't want the site to be down. Since I am using wordpress could I just sync the DB? Any maybe sync the files using rSync?

                  You could setup a cron job to take a wordpress backup and a cron job on the second one to import the backup. Not the most elegant way to do it though.

                  1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller @A Former User
                    last edited by

                    @Aaron-Studer said:

                    @scottalanmiller said:

                    Truly identical you do with DRBD.

                    Didn't want to do anything that highend. A once daily sync would be fine, I just don't want the site to be down. Since I am using wordpress could I just sync the DB? Any maybe sync the files using rSync?

                    Then Rsync. The answer is always Rsync with UNIX.

                    ? 1 Reply Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller
                      last edited by

                      Remember that a database has its files open, always. So you can't sync them. You have to backup and restore them. Nothing can sync an open file.

                      1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User @scottalanmiller
                        last edited by

                        @scottalanmiller will rsync ruin my DB?

                        scottalanmillerS 1 Reply Last reply Reply Quote 0
                        • scottalanmillerS
                          scottalanmiller @A Former User
                          last edited by

                          @Aaron-Studer said:

                          @scottalanmiller will rsync ruin my DB?

                          Anything will.

                          1 Reply Last reply Reply Quote 0
                          • scottalanmillerS
                            scottalanmiller
                            last edited by

                            If you want a full-on MySQL cluster...

                            http://galeracluster.com/

                            1 Reply Last reply Reply Quote 0
                            • ?
                              A Former User
                              last edited by

                              So in that case it would be a 2 part job, 1 sync WP directory. 2 backup \ restore DB?

                              scottalanmillerS 1 Reply Last reply Reply Quote 0
                              • scottalanmillerS
                                scottalanmiller @A Former User
                                last edited by

                                @Aaron-Studer said:

                                So in that case it would be a 2 part job, 1 sync WP directory. 2 backup \ restore DB?

                                You can do it that way.... three steps...

                                1. Backup
                                2. Sync
                                3. Restore
                                1 Reply Last reply Reply Quote 0
                                • ?
                                  A Former User
                                  last edited by A Former User

                                  You could do something like this and have it store to something both can access: http://jamieflarity.com/computers/how-to-backup-your-wordpress-database-and-files-without-a-plugin/ then just do a cronjob to import the sql.gz on the second server

                                  1 Reply Last reply Reply Quote 1
                                  • scottalanmillerS
                                    scottalanmiller
                                    last edited by

                                    Or you could cluster the MySQL instances. It is pretty rare that you would want to protect a system anywhere but at the application level. The idea that you do it somewhere beneath the apps themselves is a notion that vendors like VMware try to push to SMB clients who don't understand that apps needs to replicate themselves and can do so far better than the platform can.

                                    1 Reply Last reply Reply Quote 0
                                    • ?
                                      A Former User
                                      last edited by

                                      Hm..... Just found this....

                                      https://wordpress.org/plugins/database-sync/

                                      1 Reply Last reply Reply Quote 1
                                      • ?
                                        A Former User
                                        last edited by

                                        So want I am thinking about doing is running a server at home and on C@C, and having them in sync. then if ether one goes down, no problem.

                                        scottalanmillerS 1 Reply Last reply Reply Quote 0
                                        • scottalanmillerS
                                          scottalanmiller @A Former User
                                          last edited by

                                          @Aaron-Studer said:

                                          So want I am thinking about doing is running a server at home and on C@C, and having them in sync. then if ether one goes down, no problem.

                                          That mostly makes sense. Dealing with the dynamic IP address of your house is the pain. But this doesn't explain the DNS thing.

                                          1 Reply Last reply Reply Quote 0
                                          • ?
                                            A Former User
                                            last edited by A Former User

                                            How do I setup cloudflare to point to 2 ip addresses?

                                            scottalanmillerS 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post