Main

This document was written and is being maintained by Joshua D.
Abraham. It assumes the user has a basic understanding of computers.
This document contains the steps for installing useful tools after the
core install.  This document contains the small differences between
FreeBSD 5.4 and FreeBSD 6.0.

If you have any suggestions, comments or questions please feel free to
email me at jabra (-at-) ccs (dot) neu (dot) edu.

--------------------------------------------------------------------


Please note
    this is a two   2
    this is a z     Z
        
1a) Install cvsup-without-gui
    
    $ pkg_add -r cvsup-without-gui
   
1) Secure Machine

    $ ee /etc/rc.conf

    ADD the following lines

    sendmail_enable="NONE"
    inetd_enable="NO"
    ntpdate_flags="north-America.pool.ntp.org"
    ntpdate_enable="YES"
    
    Tweaked configs for Your environment

    ifconfig_fxp0="inet 10.0.0.30 netmask 255.255.240.0"
    ifconfig_fpx1="inet 0.0.0.0 netmask 255.255.255.0"
    defaultrouter="10.0.0.1"

    Save and Quit [ esc a a ]
    -------------------------

    $ ee /etc/ssh/sshd_config

    CHANGE the following

        #Protocol 2
    to
        Protocol 2

    and CHANGE the following

        #PermitRootLogin no
    to
        PermitRootLogin no

    Save and Quit [ esc a a ]
    -------------------------

    # changes the console to not logout
    $ ee /etc/ttys

    CHANGE the following

        console none    unknown off secure
    to
        console none    unknown off insecure

    Save and Quit [ esc a a ]
    -------------------------
    
    $ /etc/netstart
    

2) Install ports tree 
   
    $ cp /usr/share/examples/cvsup/ports-supfile /root/
    $ cp /usr/share/examples/cvsup/stable-supfile /root/
    
    $ ee /root/ports-supfile
    
    CHANGE the following
    
        *default host=CHANGE_THIS.FreeBSD.org
    to
        *default host=cvsup4.FreeBSD.org
    
    Save and Quit [ esc a a ]
    -------------------------
    
    $ ee /root/stable-supfile
    
    CHANGE the following
    
        *default host=CHANGE_THIS.FreeBSD.org
    to
        *default host=cvsup4.FreeBSD.org
        
    
    AND the following
    
        *default release=cvs tag=RELENG_5
    to
        *default release=cvs tag=RELENG_5_4 #depending
        *default release=cvs tag=RELENG_6
    
    Save and Quit [ esc a a ]
    -------------------------

3) Setup scripts for maintaining systems

    $ mkdir /root/scripts
    $ cd /root/scripts

    $ ee ports-update.sh

    Write the following
    
    #!/bin/sh
    # updating port
    echo "Beginning Ports Update"
    /usr/local/bin/cvsup -g -L 2 /etc/ports-supfile
    echo "Ports Update Complete"
    
    Save and Quit [ esc a a ]
    -------------------------
    
    $ ee src-update.sh
    
    Write the following
    
    #!/bin/sh
    # updating source
    echo "Beginning Source Update"
    /usr/local/bin/cvsup -g -L 2 /etc/stable-supfile
    echo "Source Update Complete"
    
    Save and Quit [ esc a a ]
    -------------------------
    
    $ chmod +x *.sh
    
    $ cp /root/ports-supfile /etc/
    $ cp /root/stable-supfile /etc/
    
    $ chmod 640 /etc/ports-supfile
    $ chmod 640 /etc/stable-supfile 
    
4) Rebuild the entire machine and Kernel

    $ /root/scripts/src-update.sh

    $ cd /usr/src

    # Note if want to use a custom kernel copy the GENERIC file and
    # rebuild using KERNCONF=CUSTOM
        
        $ cd /usr/src/sys/i386/conf

        $ cp GENERIC CUSTOM

        # then customize CUSTOM for your environment

    After you enter the following go to lunch ( THIS WILL TAKE A WHILE)

    $ make buildworld && make buildkernel KERNCONF=GENERIC
    $ make installkernel KERNCONF=GENERIC && make installworld

    $ mergemaster -p 

    $ reboot
     
    Login: root
    password: password

    $ cd /usr/src
    $ make clean
 
5) Update ports
    
    $ pkg_add -r portupgrade
    $ /usr/local/bin/portupgrade -a
    
6) Adding applications
    
    $ pkg_add -r portaudit
    
    $ pkg_add -r zsh

    $ pkg_add -r wget
    
        $ pkg_add -r screen # may be broken in latest version

        If pkg_add -r screen fails try the following
        
        $ cd /usr/ports/sysutils/screen
        $ make install clean
        
    $ pkg_add -r sudo

    $ pkg_add -r pcre

    $ cd /root/scripts
    $ ee check-ports.sh

    Write the following

    #!/bin/sh
    #check ports
    /usr/local/sbin/portaudit -Fda

    Save and Quit [ esc a a ]
    -------------------------

    $ chmod +x check-ports.sh

Main
Written and maintained by Joshua D. Abraham jabra at ccs dot neu dot edu

© Copyright 2006 Joshua D. Abraham