Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

  1. Log

...

  1. into

...

  1. the

...

  1. IME

...

  1. server(s),

...

  1. and

...

  1. double

...

  1. check

...

  1. the

...

  1. home

...

  1. directory

...

  1. and

...

  1. ssh

...

  1. setup.

...

  1. Repeat

...

  1. these

...

  1. steps

...

  1. for

...

  1. all

...

  1. IME

...

  1. servers

...

  1. in

...

  1. this

...

  1. cluster.

...

    1. First,

...

    1. check

...

    1. that

...

    1. the

...

    1. home

...

    1. directory

...

    1. for

...

    1. the

...

    1. www

...

    1. user

...

    1. is

...

    1. /home/www.

...

    1. Code Block

...

    1. 
      grep www /etc/passwd
      

...

      • Change it if necessary.
    1. Check that there is a .ssh directory.
      Code Block
      
      ls -ald /home/www/.ssh
      

...

    1. If it is missing,

...

    1. create

...

    1. it.

...

    1. Code Block

...

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

...

  1. Log into the MySQL server(s)

...

  1. that

...

  1. the

...

  1. Thalia

...

  1. cluster

...

  1. uses,

...

  1. and

...

  1. double

...

  1. check

...

  1. the

...

  1. home

...

  1. directory

...

  1. and

...

  1. ssh

...

  1. setup.

...

  1. Repeat

...

  1. these

...

  1. steps

...

  1. for

...

  1. all

...

  1. MySQL

...

  1. servers

...

  1. in

...

  1. this

...

  1. cluster.

...

    1. First,

...

    1. check

...

    1. that

...

    1. the

...

    1. home

...

    1. directory

...

    1. for

...

    1. the

...

    1. db

...

    1. user

...

    1. is

...

    1. /home/db.

...

    1. Code Block

...

    1. 
      grep db /etc/passwd
      

...

    1. Change it if necessary.
      Code Block
      
      sed -i s#'/var/lib/mysql'#'/home/db'# /etc/passwd
      

...

    1. Check that there is a .ssh directory.
      Code Block
      
      ls -ald /home/db/.ssh
      

...

    1. If it is missing,

...

    1. create

...

    1. it.

...

    1. Code Block

...

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

...

    1. 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),

...

      1. generate

...

      1. the

...

      1. RSA

...

      1. key(s),

...

      1. and

...

      1. save

...

      1. the

...

      1. fingerprint,

...

      1. in

...

      1. case

...

      1. it

...

      1. needs

...

      1. to

...

      1. be

...

      1. compared

...

      1. later.

...

      1. Code Block

...

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

...

      1. Transfer the public key to the www user directory on the IME server(s).

...

      1. Repeat

...

      1. this

...

      1. step

...

      1. for

...

      1. each

...

      1. MySQL

...

      1. server

...

      1. to

...

      1. each

...

      1. IME

...

      1. server

...

      1. Code Block

...

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

...

    1. Log into the IME server(s)

...

    1. as

...

    1. the

...

    1. www

...

    1. user,

...

    1. and

...

    1. add

...

    1. the

...

    1. public

...

    1. key

...

    1. to

...

    1. the

...

    1. list

...

    1. of

...

    1. authorized

...

    1. keys.

...

    1. Repeat

...

    1. these

...

    1. steps

...

    1. for

...

    1. each

...

    1. IME

...

    1. server.

...

    1. Code Block

...

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

...

    1. From the MySQL server(s),

...

    1. test

...

    1. ssh

...

    1. connections

...

    1. to

...

    1. the

...

    1. IME

...

    1. server(s).

...

    1. Code Block

...

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

...

  1. On the MySQL server(s),

...

  1. check

...

  1. that

...

  1. the

...

  1. perl::DBI

...

  1. package

...

  1. is

...

  1. installed,

...

  1. create

...

  1. a

...

  1. bin

...

  1. directory

...

  1. for

...

  1. the

...

  1. db

...

  1. user,

...

  1. and

...

  1. install

...

  1. the

...

  1. test.pl

...

  1. script.

...

    1. Get

...

    1. the

...

    1. perl::DBI

...

    1. package

...

    1. and

...

    1. install

...

    1. it.

...

      • For

...

      • RHEL4

...

      • on

...

      • i386/i686

...

      • systems:

...

      • Code Block

...

      • 
        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
        

...

    1. Create the db user bin directory, and copy the stats reporting script into it.
      Code Block
      
      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 
      

...

    1. 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

...

    1. or

...

    1. thalia-dev@mit.edu),

...

    1. $reply_to

...

    1. (email

...

    1. address

...

    1. of

...

    1. the

...

    1. replying

...

    1. email),

...

    1. and

...

    1. @scp_servers

...

    1. (the

...

    1. list

...

    1. of

...

    1. the

...

    1. servers

...

    1. you

...

    1. want

...

    1. to

...

    1. scp

...

    1. the

...

    1. report

...

    1. to.

...

    1. They

...

    1. should

...

    1. be

...

    1. the

...

    1. names

...

    1. of

...

    1. the

...

    1. IME/UI

...

    1. servers).

...

    1. Code Block

...

    1. 
      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");
      

...

    1. As the db user,

...

    1. use

...

    1. crontab

...

    1. -e

...

    1. to

...

    1. edit

...

    1. the

...

    1. cron

...

    1. tables,

...

    1. and

...

    1. add

...

    1. an

...

    1. entry.

...

    1. Code Block

...

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

...

    1. Ceck /etc/cron.allow

...

    1. file,

...

    1. and

...

    1. if

...

    1. the

...

    1. user

...

    1. db

...

    1. is

...

    1. not

...

    1. listed,

...

    1. add

...

    1. it.

...

  1. On

...

  1. the

...

  1. IME

...

  1. server(s),

...

  1. create

...

  1. the

...

  1. location

...

  1. to

...

  1. receive

...

  1. the

...

  1. stat

...

  1. reports.

...

  1. Code Block

...

  1. 
    mkdir /home/www/thalia/stats
    chown www:www /home/www/thalia/stats

...

  1.