You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

  1. Log into the IME server(s), and double check the home directory and ssh setup. Repeat these steps for all IME servers in this cluster.
    1. First, check that the home directory for the www user is /home/www.
      grep www /etc/passwd
      
      • Change it if necessary.
    2. Check that there is a .ssh directory.
      ls -ald /home/www/.ssh
      
    3. If it is missing, create it.
      mkdir /home/www/.ssh
      chown www:www /home/www/.ssh
      
  2. Log into the MySQL server(s) that the Thalia cluster uses, and double check the home directory and ssh setup. Repeat these steps for all MySQL servers in this cluster.
    1. First, check that the home directory for the db user is /home/db.
      grep db /etc/passwd
      
    2. Change it if necessary.
      sed -i s#'/var/lib/mysql'#'/home/db'# /etc/passwd
      
    3. Check that there is a .ssh directory.
      ls -ald /home/db/.ssh
      
    4. If it is missing, create it.
      mkdir /home/db/.ssh
      chown db:db /home/db/.ssh
      
    5. Create RSA keys to allow the db user on the MySQL server to log in as the www user on the IME servers, and add them to the authorized key list.
      1. On the MySQL server(s), generate the RSA key(s), and save the fingerprint, in case it needs to be compared later.
        ssh-keygen -t rsa -b 1024 -f /home/db/.ssh/id_rsa -N "" | grep ':' > /home/db/.ssh/id_rsa.fingerprint
        
      2. Transfer the public key to the www user directory on the IME server(s). Repeat this step for each MySQL server to each IME server
        scp /home/db/.ssh/id_rsa.pub www@isda-thalia2.mit.edu:/home/www/.ssh/id_rsa.pub-db@`hostname`
        
    6. Log into the IME server(s) as the www user, and add the public key to the list of authorized keys. Repeat these steps for each IME server.
      su - www
      cd .ssh
      cat id_rsa.pub-db\@isda-thalia13.mit.edu >> authorized_keys
      chmod og-w authorized_keys
      
    7. From the MySQL server(s), test ssh connections to the IME server(s).
      ssh www@isda-thalia2.mit.edu
      exit
      
  3. On the MySQL server(s), create a bin directory for the db user, and install the test.pl script.
    cd /home/db
    mkdir /home/db/bin
    chown db:db /home/db/bin
    cd /home/db/bin
    scp root@trogdor.mit.edu:/opt/software-repository-tmp/Thalia/test.pl /home/db/bin
    chown db:db /home/db/bin/test.pl
    chmod u+rx,a-w,go-rx /home/db/bin/test.pl
    
    1. Be certain to edit it, and set the @args values to be appropriate for the server.
      my @args =("scp", "/home/db/bin/test.pl", "www\@cms-proto-th1.mit.edu:/home/www/thalia/stats");
      
    2. As the db user, use crontab -e to edit the cron tables, and add an entry.
      8 13 * * * /home/db/bin/test.pl >> /home/db/bin/test.log 2>&1 &
      
  • No labels