Changeset 1063


Ignore:
Timestamp:
Apr 4, 2009, 1:40:26 AM (16 years ago)
Author:
quentin
Message:
First parts of installer script
File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/doc/install-howto.sh

    r1058 r1063  
    11# This document is a how-to for installing a Fedora scripts.mit.edu server.
     2
     3set -e -x
     4
     5[ -e /scripts-boot-count ] || echo 0 > /scripts-boot-count
     6
     7source_server="old-faithful.mit.edu"
     8
     9boot=${1:$(cat /scripts-boot-count)}
     10
     11doreboot() {
     12    echo $(( $boot + 1 )) > /scripts-boot-count;
     13    shutdown -r now "Rebooting for step $(cat /scripts-boot-count)"
     14}
     15
     16YUM() {
     17    NSS_NONLOCAL_IGNORE=1 yum "$@"
     18}
    219
    320# Helper files for the install are located in server/fedora/config.
     
    522# Start with a normal install of Fedora.
    623
     24if [ $boot = 0 ]; then
    725# When the initial configuration screen comes up, under "Firewall
    826# configuration", disable the firewall, and under "System services", leave
     
    1129# kerneloops, mdmonitor, messagebus, microcode_ctl, netfs, network, nscd, ntpd,
    1230# sshd, udev-post, and nothing else.
     31    echo "--disabled" > /etc/sysconfig/system-config-firewall
     32    for i in NetworkManager avahi-daemon bluetooth cups isdn nfslock pcscd restorecond rpcbind rpcgssd rpcidmapd sendmail; do
     33        chkconfig "$i" off
     34    done
    1335
    1436# Edit /etc/selinux/config so it has SELINUX=disabled and reboot.
     37    sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
     38    doreboot
     39fi
    1540
    16 # Check out the scripts.mit.edu svn repository. Configure svn not to cache
    17 # credentials.
    18 
    19 # cd to server/fedora in the svn repository.
    20 
    21 # Run "make install-deps" to install various prereqs.  Nonstandard
    22 # deps are in /mit/scripts/rpm.
    23 
    24 # Check out the scripts /etc configuration, which is done most easily by
    25 # $ svn co svn://scripts.mit.edu/server/fedora/config/etc
    26 # # \cp -a etc /
    27 
     41if [ $boot = 1 ]; then
    2842# Create a scripts-build user account, and set up rpm to build in
    2943# $HOME by doing a
     
    3145# (If you just use the default setup, it will generate packages
    3246# in /usr/src/redhat.)
     47    adduser scripts-build
    3348
    34 # su scripts-build -
     49# Check out the scripts.mit.edu svn repository. Configure svn not to cache
     50# credentials.
    3551
    36 # Make sure that server/fedora (where you currently are) is writable
    37 # by user scripts-build.
     52    YUM install -y subversion
     53
     54    cd /srv
     55    svn co svn://$source_server/ repository
     56
     57    sed -i 's/^(# *)*store-passwords.*/store-passwords = no/' /root/.subversion/config
     58    sed -i 's/^(# *)*store-auth-creds.*/store-auth-creds = no/' /root/.subversion/config
     59
     60    chown -R scripts-build /srv/repository
     61
     62# cd to server/fedora in the svn repository.
     63    cd /srv/repository/server/fedora
     64
     65# Run "make install-deps" to install various prereqs.  Nonstandard
     66# deps are in /mit/scripts/rpm.
     67    make install-deps
     68
     69# Install bind
     70    YUM install -y bind
     71
     72# Check out the scripts /etc configuration
     73    cd /root
     74    svn co svn://scripts.mit.edu/server/fedora/config/etc etc
     75    \cp -a etc /
    3876
    3977# env NSS_NONLOCAL_IGNORE=1 yum install scripts-base
     78    YUM install -y scripts-base
    4079
    4180# Rebuild mit-zephyr on a 32-bit machine, like the one at Joe's home.
    42 
    43 # Run "make suexec" and "make install-suexec" to overwrite
    44 # /usr/sbin/suexec with one that works. The one installed by the
    45 # newly-built Apache RPM is misconfigured.
    46 # ... Except Anders claims he fixed this.
    4781
    4882# Remember to set NSS_NONLOCAL_IGNORE=1 anytime you're setting up
Note: See TracChangeset for help on using the changeset viewer.