You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
- 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.
- First, check that the home directory for the www user is /home/www.
- Check that there is a .ssh directory.
- If it is missing, create it.
mkdir /home/www/.ssh
chown www:www /home/www/.ssh
- 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.
- First, check that the home directory for the db user is /home/db.
- Change it if necessary.
sed -i s#'/var/lib/mysql'#'/home/db'# /etc/passwd
- Check that there is a .ssh directory.
- If it is missing, create it.
mkdir /home/db/.ssh
chown db:db /home/db/.ssh
- 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.
- 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
- 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`
- 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
- From the MySQL server(s), test ssh connections to the IME server(s).
ssh www@isda-thalia2.mit.edu
exit
- 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
- 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");
- 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 &