Issue link: https://read.uberflip.com/i/1334488
Chapter 11 227 Web server(apache) settings Apache User: www-data WWWROOT: /var/www/ Galera Servers The following table lists the IP address, data directory, and installation directory for the servers: Server-id IP-address Datadir Installdir 1 172.16.0.21 /var/lib/mysql/ /usr/local/ 2 172.16.0.22 same as mentioned earlier same as mentioned earlier 3 172.16.0.23 same as mentioned earlier same as mentioned earlier 5. The final step asks for an e-mail address to send the configuration and deployment script to. Once a valid e-mail address has been entered, press the Generate Deployment Scripts button. Node preparation 1. Each node is configured such that the user used to run the setup routine (the OS user as configured in step 2 in the previous section) can SSH to each node—including itself—and run commands through sudo without being asked for a password. To do this, we first create the user's SSH key as follows: ssh-keygen -t rsa -N "" 2. We now need to copy this to each of our nodes, including the node we're on now (so that it can SSH to itself): # copy ssh key to 172.16.0.20, 172.16.0.21, 172.16.0.22 # and 172.16.0.23 for a in {20..23} do ssh-copy-id -i .ssh/id_rsa.pub galera@172.16.0.${a} done 3. This will ask for the password of the galera user on each of the nodes, but following this, we shouldn't be prompted. To test, simply do the following, which should get executed without intervention: for a in {20..23} do ssh galera@172.16.0.${a} ls done www.it-ebooks.info

