| 1 | 
edhill | 
1.1 | 
#! /usr/bin/env bash | 
| 2 | 
  | 
  | 
 | 
| 3 | 
  | 
  | 
#  Ed Hill | 
| 4 | 
  | 
  | 
#  Sat Apr  2 16:02:21 EST 2005 | 
| 5 | 
  | 
  | 
 | 
| 6 | 
  | 
  | 
echo "These are notes meant to be read." | 
| 7 | 
  | 
  | 
echo "They are not a complete script." | 
| 8 | 
  | 
  | 
exit 1 | 
| 9 | 
  | 
  | 
#  The following notes explain how the forge setup was moved from the | 
| 10 | 
  | 
  | 
#  existing FC2 system to the new FC3 system. | 
| 11 | 
  | 
  | 
 | 
| 12 | 
  | 
  | 
 | 
| 13 | 
  | 
  | 
#  =========  Fedora Extras  ========= | 
| 14 | 
  | 
  | 
# | 
| 15 | 
  | 
  | 
cd /etc/yum.repos.d/ | 
| 16 | 
  | 
  | 
cat > extras.repo <<EOF | 
| 17 | 
  | 
  | 
[extras] | 
| 18 | 
  | 
  | 
name=Fedora Extras - $releasever - $basearch | 
| 19 | 
  | 
  | 
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/ | 
| 20 | 
  | 
  | 
gpgcheck=1 | 
| 21 | 
  | 
  | 
gpgkey=http://download.fedora.redhat.com/pub/fedora/linux/extras/RPM-GPG-KEY-Fedora-Extras | 
| 22 | 
  | 
  | 
 | 
| 23 | 
  | 
  | 
EOF | 
| 24 | 
  | 
  | 
rpm --import http://download.fedora.redhat.com/pub/fedora/linux/extras/RPM-GPG-KEY-Fedora-Extras | 
| 25 | 
  | 
  | 
yum install cvs cvsweb which php gcc-g77 netcdf\*  | 
| 26 | 
  | 
  | 
 | 
| 27 | 
  | 
  | 
 | 
| 28 | 
  | 
  | 
#  =========  cvs  ========= | 
| 29 | 
  | 
  | 
# | 
| 30 | 
  | 
  | 
#  pull over pserver config from old-forge and put it in  | 
| 31 | 
  | 
  | 
#    /etc/xinetd.d/cvspserver | 
| 32 | 
edhill | 
1.2 | 
# | 
| 33 | 
  | 
  | 
#  add cvsgraph | 
| 34 | 
  | 
  | 
yum install cvsgraph | 
| 35 | 
edhill | 
1.1 | 
 | 
| 36 | 
  | 
  | 
 | 
| 37 | 
  | 
  | 
#  =========  sendmail  ========= | 
| 38 | 
  | 
  | 
# | 
| 39 | 
  | 
  | 
yum install sendmail-cf | 
| 40 | 
  | 
  | 
cat >>/etc/mail/local-host-names <<EOF | 
| 41 | 
  | 
  | 
# local-host-names - include all aliases for your machine here. | 
| 42 | 
  | 
  | 
dev.mitgcm.org | 
| 43 | 
  | 
  | 
mitgcm.org | 
| 44 | 
  | 
  | 
cpt-emilie.org | 
| 45 | 
  | 
  | 
cpt-gce.org | 
| 46 | 
  | 
  | 
acesgrid.org | 
| 47 | 
  | 
  | 
 | 
| 48 | 
  | 
  | 
EOF | 
| 49 | 
  | 
  | 
#  EDIT: /etc/mail/sendmail.mc | 
| 50 | 
  | 
  | 
#  see:  diff -u /etc/mail/sendmail.mc_ORIG /etc/mail/sendmail.mc | 
| 51 | 
  | 
  | 
make -C /etc/mail | 
| 52 | 
  | 
  | 
/etc/init.d/sendmail restart | 
| 53 | 
  | 
  | 
 | 
| 54 | 
  | 
  | 
 | 
| 55 | 
  | 
  | 
#  =========  mailman  ========= | 
| 56 | 
  | 
  | 
# | 
| 57 | 
  | 
  | 
#  set "fqdn = 'mitgcm.org'" in /usr/lib/mailman/Mailman/mm_cfg.py | 
| 58 | 
  | 
  | 
#    though it is probably not 100% necessary | 
| 59 | 
  | 
  | 
#  copy over the relevant mailman aliases from old-forge and add | 
| 60 | 
  | 
  | 
#    them to /etc/aliases then restart sendmail | 
| 61 | 
  | 
  | 
#  copy over the old lists from old-forge: | 
| 62 | 
  | 
  | 
#    /var/mailman/lists/*  ==>  /var/lib/mailman/lists/* | 
| 63 | 
  | 
  | 
#    /var/mailman/archives/*  ==>  /var/lib/mailman/archives/* | 
| 64 | 
  | 
  | 
#  then fix the old, annoying mailman URLs to get rid of  | 
| 65 | 
  | 
  | 
#    "dev.mitgcm.org" references: | 
| 66 | 
  | 
  | 
cd /usr/lib/mailman/bin/ | 
| 67 | 
  | 
  | 
for i in mitgcm-support mitgcm-devel mitgcm-cvs 12003 ; do | 
| 68 | 
  | 
  | 
    ./withlist -l -r fix_url $i  -u mitgcm.org -v | 
| 69 | 
  | 
  | 
done | 
| 70 | 
  | 
  | 
#  check setup | 
| 71 | 
  | 
  | 
./check_perms | 
| 72 | 
  | 
  | 
#  start it | 
| 73 | 
  | 
  | 
/etc/init.d/mailman start | 
| 74 | 
  | 
  | 
 | 
| 75 | 
  | 
  | 
 | 
| 76 | 
  | 
  | 
#  =========  apache  ========= | 
| 77 | 
  | 
  | 
# | 
| 78 | 
  | 
  | 
#  permanently disable the overly restrictive SELinux web server policy | 
| 79 | 
  | 
  | 
#    but note that we could (maybe?) revisit this at a later date : | 
| 80 | 
  | 
  | 
#      http://fedora.redhat.com/docs/selinux-apache-fc3/ | 
| 81 | 
  | 
  | 
setsebool -P httpd_disable_trans=1 | 
| 82 | 
  | 
  | 
# | 
| 83 | 
  | 
  | 
#  bring over apache config file from old-forge and meld it into the  | 
| 84 | 
  | 
  | 
#    slightly different syntax (VirtualHost-s) needed by the newer  | 
| 85 | 
  | 
  | 
#    apache in FC3 | 
| 86 | 
  | 
  | 
# | 
| 87 | 
  | 
  | 
/etc/init.d/httpd restart | 
| 88 | 
  | 
  | 
 | 
| 89 | 
  | 
  | 
 | 
| 90 | 
  | 
  | 
#  =========  mediawiki & mysql  ========= | 
| 91 | 
  | 
  | 
# | 
| 92 | 
  | 
  | 
#  basic setup & permissions | 
| 93 | 
  | 
  | 
ssh forge | 
| 94 | 
edhill | 
1.3 | 
yum install php-mysql php-gd php-mbstring | 
| 95 | 
edhill | 
1.1 | 
scp belle:/etc/httpd/ecco_wikki_htpasswd /etc/httpd/ | 
| 96 | 
  | 
  | 
# | 
| 97 | 
  | 
  | 
#  the mediawiki content is all in mysql databases, and this is | 
| 98 | 
  | 
  | 
#    a whole-hog approach to getting the mysql data | 
| 99 | 
  | 
  | 
ssh belle | 
| 100 | 
  | 
  | 
  mysqldump -A > /scratch/edhill/mysql_dump_all.sql | 
| 101 | 
  | 
  | 
 | 
| 102 | 
  | 
  | 
ssh forge | 
| 103 | 
  | 
  | 
  scp belle:/scratch/edhill/mysql_dump_all.sql /scratch/edhill/ | 
| 104 | 
  | 
  | 
  /etc/init.d/mysqld restart | 
| 105 | 
  | 
  | 
  cd /var/lib/mysql/ | 
| 106 | 
  | 
  | 
  rm -rf mysql test | 
| 107 | 
  | 
  | 
  mysql < /scratch/edhill/mysql_dump_all.sql | 
| 108 | 
  | 
  | 
  /etc/init.d/mysqld restart | 
| 109 | 
  | 
  | 
 | 
| 110 | 
  | 
  | 
 |