Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Wiki Markup
# 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.

...


{code

...

}
grep www /etc/passwd

...

  • Change it if necessary.

...

{code}
##* Change it if necessary.
## Check that there is a .ssh directory.
{code}
ls -ald /home/www/.ssh

...


{code}
## If it is missing, create it.

...


{code

...

}
mkdir /home/www/.ssh
chown www:www /home/www/.ssh

...

{code}
# 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.

...


{code

...

}
grep db /etc/passwd

...


{code}
## Change it if necessary.
{code}
sed -i s#'/var/lib/mysql'#'/home/db'# /etc/passwd

...

{code}
## Check that there is a .ssh directory.
{code}
ls -ald /home/db/.ssh

...

{code}
## If it is missing, create it.

...


{code

...

}
mkdir /home/db/.ssh
chown db:db /home/db/.ssh

...

{code}
## 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.

...


{code

...

}
ssh-keygen -t rsa -b 1024 -f /home/db/.ssh/id_rsa -N "" | grep ':' > /home/db/.ssh/id_rsa.fingerprint

...


{code}
### 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

...


{code

...

}
scp /home/db/.ssh/id_rsa.pub www@isda-thalia2.mit.edu:/home/www/.ssh/id_rsa.pub-db@`hostname`

...

{code}
## 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.

...


{code

...

}
su - www
cd .ssh
cat id_rsa.pub-db\@isda-thalia13.mit.edu >> authorized_keys
chmod og-w authorized_keys

...

{code}
## From the MySQL server(s), test ssh connections to the IME server(s).

...


{code

...

}
ssh www@isda-thalia2.mit.edu
exit

...

{code}
# On the MySQL server(s), check that the perl::DBI package is installed, create a bin directory for the db user, and install the test.pl script.

...


##  Get the perl::DBI package and install it.

...


##*  For RHEL4 on i386/i686 systems:

...


{code

...

}
scp root@trogdor:/opt/software-repository-tmp/MySQL/perl-DBI-1.40-8.i386.rpm /home/db/tmp
rpm -ivh /home/db/tmp/perl-DBI-1.40-8.i386.rpm

...


{code}
##  Create the db user bin directory, and copy the stats reporting script into it.
{code}
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/thaliastats.pl  /home/db/bin
chown db:db /home/db/bin/thaliastats.pl 
chmod u+rx,a-w,go-rx /home/db/bin/thaliastats.pl 

...


{code}
## Be certain to edit it, and set the values for $dbname (the repository database for this cluster), $to (the email recipient of the report, often either map-support@mit.edu or thalia-dev@mit.edu), $reply_to (email address of the replying email), and @scp_servers (the list of the servers you want to scp the report to. They should be the names of the IME/UI servers).

...


{code

...

}
my $dbname = "thalia211";
my $to       = "To: thalia-dev\@mit.edu\n";
my $reply_to = "Reply-to: thalia-dev\@mit.edu\n";
my @scp_servers = ("isda-thalia2.mit.edu", "isda-thalia11.mit.edu");

...


{code}
## As the db user, use crontab \-e to edit the cron tables, and add an entry.

...


{code

...

}
8 13 * * * /home/db/bin/thaliastats.pl >> /home/db/bin/thaliastats.log 2>&1 &

...

{code}
## Ceck /etc/cron.allow file, and if the user db is not listed, add it.

...


#  On the IME server(s), create the location to receive the stat reports.

...


{code

...

}
mkdir /home/www/thalia/stats
chown www:www /home/www/thalia/stats
{code}