| [371] | 1 | This document is a how-to for installing a Fedora scripts.mit.edu server. | 
|---|
| [181] | 2 |  | 
|---|
| [861] | 3 | Helper files for the install are located in server/fedora/config. | 
|---|
 | 4 |  | 
|---|
| [881] | 5 | * Start with a normal install of Fedora. | 
|---|
| [861] | 6 |  | 
|---|
| [881] | 7 | * Edit /etc/selinux/config so it has SELINUX=disabled and reboot. | 
|---|
| [861] | 8 |  | 
|---|
| [788] | 9 | * Check out the scripts.mit.edu svn repository. Configure svn not to cache | 
|---|
 | 10 |   credentials. | 
|---|
| [387] | 11 |  | 
|---|
 | 12 | * cd to server/fedora in the svn repository. | 
|---|
 | 13 |  | 
|---|
| [861] | 14 | * Run "make install-deps" to install various prereqs.  Nonstandard | 
|---|
 | 15 |   deps are in /mit/scripts/rpm. | 
|---|
| [387] | 16 |  | 
|---|
| [861] | 17 | * Create a scripts-build user account, and set up rpm to build in  | 
|---|
 | 18 |   $HOME by doing a  | 
|---|
 | 19 |   cp config/home/scripts-build/.rpmmacros /home/scripts-build/ | 
|---|
 | 20 |   (If you just use the default setup, it will generate packages  | 
|---|
 | 21 |   in /usr/src/redhat.) | 
|---|
| [785] | 22 |  | 
|---|
| [861] | 23 | * su scripts-build - | 
|---|
 | 24 |  | 
|---|
 | 25 | * Make sure that server/fedora (where you currently are) is writable | 
|---|
 | 26 |   by user scripts-build. | 
|---|
 | 27 |  | 
|---|
| [387] | 28 | * Use the Makefile to build the scripts.mit.edu-specific Fedora | 
|---|
 | 29 |   packages. | 
|---|
| [796] | 30 |   - export PATH=$PATH:/usr/sbin | 
|---|
| [785] | 31 |   - make download | 
|---|
 | 32 |   - make setup | 
|---|
 | 33 |   - make all | 
|---|
 | 34 |   - openafs-devel is a build-dependency of accountadm, so you'll need to | 
|---|
| [861] | 35 |     install the openafs-devel package you just built by hand when that fails. | 
|---|
| [387] | 36 |  | 
|---|
| [861] | 37 | * Then install the packages you just built as root: | 
|---|
 | 38 |    - yum localinstall --nogpgcheck accountadm-0.00-0.x86_64.rpm \ | 
|---|
 | 39 |        execsys-0.00-0.x86_64.rpm httpd* \ | 
|---|
 | 40 |        kmod-openafs-1.4.7-1.1.2.6.25_14.fc9.x86_64.rpm \ | 
|---|
 | 41 |        krb5-{debuginfo,devel,libs,pki,workstation-1}* \ | 
|---|
 | 42 |        logview-0.00-0.x86_64.rpm mit-zephyr-2.1-6-linux.x86_64.rpm \ | 
|---|
 | 43 |        mod_ssl-2.2.8-3.x86_64.rpm nss_nonlocal-* \ | 
|---|
 | 44 |        openafs-1.4.7-1.1.1.x86_64.rpm \ | 
|---|
 | 45 |        openafs-{authlibs,client,debuginfo,devel,docs,krb5}* openssh* \ | 
|---|
 | 46 |        sql-signup-0.00-0.x86_64.rpm tokensys-0.00-0.x86_64.rpm \ | 
|---|
| [916] | 47 |        whoisd-0.00-0.x86_64.rpm \ | 
|---|
 | 48 |        nss-ldapd* | 
|---|
| [861] | 49 |  | 
|---|
| [796] | 50 | * Rebuild mit-zephyr on a 32-bit machine, like the one at Joe's home. | 
|---|
 | 51 |  | 
|---|
| [861] | 52 | * Run "make suexec" and "make install-suexec" to overwrite | 
|---|
| [562] | 53 |   /usr/sbin/suexec with one that works. The one installed by the | 
|---|
 | 54 |   newly-built Apache RPM is misconfigured. | 
|---|
| [881] | 55 |   ... Except Anders claims he fixed this. | 
|---|
| [562] | 56 |  | 
|---|
| [881] | 57 | * Remember to set NSS_NONLOCAL_IGNORE=1 anytime you're setting up | 
|---|
| [906] | 58 |   anything, e.g. using yum. Otherwise useradd will query LDAP in a stupid way | 
|---|
 | 59 |   that makes it hang forever. | 
|---|
| [881] | 60 |  | 
|---|
| [861] | 61 | * Install and configure bind | 
|---|
 | 62 |   - env NSS_NONLOCAL_IGNORE=1 yum install bind | 
|---|
 | 63 |   - chkconfig named on | 
|---|
 | 64 |   - service named start | 
|---|
 | 65 |  | 
|---|
| [788] | 66 | * Check out the scripts /etc configuration, which is done most easily by | 
|---|
| [861] | 67 |   $ svn co svn://scripts.mit.edu/server/fedora/config/etc | 
|---|
 | 68 |   # \cp -a etc / | 
|---|
| [788] | 69 |  | 
|---|
| [862] | 70 | * Reload the iptables config to take down the restrictive firewall  | 
|---|
 | 71 |   service iptables restart | 
|---|
 | 72 |  | 
|---|
| [861] | 73 | * Copy over root's dotfiles from one of the other machines. | 
|---|
| [803] | 74 |  | 
|---|
| [861] | 75 | * Replace rsyslog with syslog-ng by doing: | 
|---|
 | 76 |   # rpm -e --nodeps rsyslog | 
|---|
 | 77 |   # yum install syslog-ng | 
|---|
 | 78 |  | 
|---|
| [788] | 79 | * Install various dependencies of the scripts system, including syslog-ng, | 
|---|
| [798] | 80 |   glibc-devel.i386, python-twisted-core, mod_fcgid, nrpe, nagios-plugins-all. | 
|---|
| [788] | 81 |  | 
|---|
| [906] | 82 | * Disable NetworkManager with chkconfig NetworkManager off. Configure | 
|---|
| [881] | 83 |   networking on the front end and back end, and the routing table to send | 
|---|
| [906] | 84 |   traffic over the back end. Make sure that chkconfig reports "network" on, so | 
|---|
 | 85 |   that the network will still be configured at next boot. | 
|---|
| [788] | 86 |  | 
|---|
| [861] | 87 | * Fix the openafs /usr/vice/etc <-> /etc/openafs mapping by changing | 
|---|
 | 88 |    /usr/vice/etc/cacheinfo to contain: | 
|---|
 | 89 |         /afs:/usr/vice/cache:10000000 | 
|---|
| [788] | 90 |  | 
|---|
| [881] | 91 | * Figure out why Zephyr isn't working. Most recently, it was because there | 
|---|
 | 92 |   was a 64-bit RPM installed; remove it and install Joe's 32-bit one | 
|---|
| [861] | 93 |  | 
|---|
| [387] | 94 | * Install the full list of RPMs that users expect to be on the | 
|---|
 | 95 |   scripts.mit.edu servers.  See server/doc/rpm and | 
|---|
| [562] | 96 |   server/doc/rpm_snapshot.  (Note that this is only a snapshot, and not | 
|---|
 | 97 |   all packages may in fact be in use.) | 
|---|
| [387] | 98 |  | 
|---|
 | 99 | * Install the full list of perl modules that users expect to be on the | 
|---|
 | 100 |   scripts.mit.edu servers.  See server/doc/perl and | 
|---|
 | 101 |   server/doc/perl_snapshot. | 
|---|
 | 102 |  | 
|---|
| [832] | 103 |   - export PERL_MM_USE_DEFAULT=1 | 
|---|
| [812] | 104 |   - Run 'cpan', accept the default configuration, and do 'o conf | 
|---|
 | 105 |     prerequisites_policy follow'. | 
|---|
| [818] | 106 |   - Parse the output of perldoc -u perllocal | grep head2 on an existing | 
|---|
 | 107 |     server, and "notest install" them from the cpan prompt. | 
|---|
| [812] | 108 |  | 
|---|
 | 109 | * Install the Python eggs and Ruby gems and PEAR/PECL doohickeys that are on | 
|---|
 | 110 |   the other scripts.mit.edu servers and do not have RPMs. | 
|---|
| [818] | 111 |   - Look at /usr/lib/python2.5/site-packages for Python eggs and modules. | 
|---|
 | 112 |   - Look at `gem list` for Ruby gems. | 
|---|
 | 113 |   - Look at `pear list` for Pear fruits (or whatever they're called). | 
|---|
| [785] | 114 |  | 
|---|
| [812] | 115 | * echo 'import site, os.path; site.addsitedir(os.path.expanduser("~/lib/python2.5/site-packages"))' > /usr/lib/python2.5/site-packages/00scripts-home.pth | 
|---|
 | 116 |  | 
|---|
| [387] | 117 | * Install the credentials (machine keytab, daemon.scripts keytab, SSL | 
|---|
 | 118 |   certs). | 
|---|
 | 119 |  | 
|---|
| [916] | 120 | * If you are setting up a test server, pay attention to | 
|---|
| [562] | 121 |   /etc/sysconfig/network-scripts and do not bind scripts' IP address. | 
|---|
| [916] | 122 |   You will also need to modify /etc/ldap.conf, /etc/nss-ldapd.conf, | 
|---|
 | 123 |   /etc/openldap/ldap.conf, and /etc/httpd/conf.d/vhost_ldap.conf to | 
|---|
 | 124 |   use scripts.mit.edu instead of localhost. | 
|---|
| [562] | 125 |  | 
|---|
| [861] | 126 | * Install fedora-ds-base and set up replication (see ./HOWTO-SETUP-LDAP | 
|---|
 | 127 |     and ./fedora-ds-enable-ssl-and-kerberos.diff). | 
|---|
| [785] | 128 |  | 
|---|
| [916] | 129 | * Make the services dirsrv, nslcd, nscd, postfix, and httpd start at | 
|---|
 | 130 |   boot. Run chkconfig to make sure the set of services to be run is | 
|---|
 | 131 |   correct. | 
|---|
| [818] | 132 |  | 
|---|
| [803] | 133 | * Run fmtutil-sys --all, which does something that makes TeX work. | 
|---|
 | 134 |  | 
|---|
| [875] | 135 | * Reboot the machine to restore a consistent state, in case you | 
|---|
 | 136 |   changed anything. | 
|---|
 | 137 |  | 
|---|
| [562] | 138 | * (Optional) Beat your head against a wall. | 
|---|
 | 139 |  | 
|---|
| [387] | 140 | * Possibly perform other steps that I've neglected to put in this | 
|---|
 | 141 |   document. | 
|---|