Setting up a 2.2.8 machine

Setting up a new machine
========================

TIP:
----
I think you would probably benefit from getting a batch of machines
physically configured (add cards or disks as needed) and then do the
steps in parallel.  That is, install 2.2.8 on all of the machines, run
init on all of them, and then use rsh from tyagi to add the packages,
etc. as outlined below.


Doing the base install:
-----------------------

install 2.2.8 cam using our release server, see Arun's notes on the
    DIRT FAQ- no packages, no users.  Just basic install (including 
    extra discs if you're using them.)

Basic initialization of file-system:
------------------------------------
change /root/.rhosts to allow rsh from tyagi137 root

create a .rhosts file with an entry for tyagi137.cs.unc.edu. This can
be used to create a .rhosts file with only 1 entry:
	# echo "tyagi137.cs.unc.edu root" > /root/.rhosts
	# chmod 600 /root/.rhosts

ftp to tyagi
get /usr/dirt/bin/init_dirt (I suggest storing it as /root/init_dirt)

Running the script creates the mount points under /net, makes
/usr/src, /usr/home, /usr/dirt links to the right places.  It also
creates /etc/mount.local, adds a call to it from /etc/rc.local and
calls it for the first time.

So run the script:
./init_dirt

Now you have a /usr/dirt with all of the goodies.

(Remind everyone to add /usr/dirt/bin to their path.)


Adding users, packages, etc files, etc.)
----------------------------------------
(STILL AS ROOT)

The different things to do on all machines (all in /usr/dirt/bin):

(HINT, look at setup_machines to make things a bit easier on yourself):

edit /etc/rc.conf: 
                    lpd_enable="YES"
                    linux_enable="YES"
                       (This can also be done with /usr/dirt/bin/lpd_enable
                        and /usr/dirt/bin/linux_change scripts.)
		    sendmail_enable="NO"
                       (This can also be done with /usr/dirt/bin/disable_sendmail.pl 
                       script, but just editing rc.conf here is easier.)

/usr/dirt/bin/add_pkgs_dirt /usr/dirt/config/pkgs.no_X
		
                         - add the "standard" dirt packages to the machine 
		 	  (check /tmp/add_pkgs_dirt for problems!)

dist_etc_dirt 		- add some etc files to all machines (read the script)

add_dirt_users  	- add all of the class (be sure to do
		 	  dist_etc_dirt and add_pkgs_dirt first!)

install_kernel      	- install the DIRT kernel on the machine

install_firewall_2.2.8  - install our set of firewall rules for production
                          machines 

MAYBE: 
Xlibs_dirt 		- if the machine doesn't have X, add X libraries (this might not be
	 	          needed - it was because someone built emacs dependent on X - use
			  as needed and NOT on machines that have or WILL have X)

For a production machine, you want to do

cp /net/tyagi137//usr/lib/libkrb.so.3.0 /usr/lib
                        - Necessary for xlock to work


/usr/dirt/bin/install_X    - install XFree86 (ie. X-Windows)

/usr/dirt/bin/add_pkgs_dirt /usr/dirt/config/pkgs.X  

                           - install packages that require X

You could do a batch of the above with rsh from tyagi possibly inside
a loop like:

foreach i ( sylvester howard lovey speedy petunia ) 
	rsh $i /usr/dirt/bin/add_pkgs_dirt /usr/dirt/config/pkgs.no_X
	rsh $i /usr/dirt/bin/dist_etc_dirt
	...
end

Even better, it can be done with 

	/usr/dirt/bin/setup_machines -M machine_file 

where machine_file contains a list of the machines to be set up.
/usr/dirt/config/new_machines is a sample input file (yes, you can
have comments).  (This does NOT do the xlibs_dirt part.)


Restore from the backups if necessary
-------------------------------------
If there's data that needs to be restored pull stuff off
tyagi:/playpen[12]/tape* as appropriate (or off of the actual tape if
necessary).

Other DiRT documents
Author: Mark Parris Last updated: Aug 25, 1999 D.Ott