Greg's setting up a new dereel
Greg's diary
Greg's home page
HOWTO index
Work in progress

This page is intended as a series of notes to help me install new local machines. See my diary for more details.

Set up a VM with 4 GB memory, install latest FreeBSD distribution DVD with almost no changes. Networking bridged, em0 (the interface on the host), fixed IP ( Take snapshot “Virgin”.

      mkdir /eureka /eureka/home  /photobackup /videobackup /Photos /dump

/etc/fstab: add
eureka:/videobackup     /videobackup            nfs     rw 0    0
eureka:/photobackup     /photobackup            nfs     rw 0    0
eureka:/                /eureka                 nfs     rw      0 0
eureka:/home            /eureka/home            nfs     rw      0 0
eureka:/Photos          /Photos                 nfs     rw      0 0
eureka:/dump            /dump                   nfs     rw      0 0

      rmdir /usr/src
      ln -s /eureka/home/src /

Decide what to do with /home.

1: Use eureka:/home

      ln -s /eureka/home /
      rmdir /var/cache/pkg
      ln -s /eureka/home/var/cache/pkg/ /var/cache

2: Local home, symlinks to eureka:

      /home/var/cache,  mail

      cd /etc
      mv group
      cp /eureka/etc/group /eureka/etc/master.passwd .

      pkg install bash
      pwd_mkdb -p master.passwd
ln -s ~grog/.bashrc ~
ln -s ~grog/abbreviations ~

Now we can ssh as grog. In one shell,

Create /etc/src.conf:

# Don't drop build date, dammit!
# What a silly name for the knob.
# It's about as "intuitive" as the name of this file.

      cd /usr/src
      Make buildworld kernel

Before installation, merge new users and groups to /etc/master.password and /etc/group

In another window, install basic ports. Others can be added later as needed.

X emacs

Migrate to real system:

install nvidia driver
****************************************************************************************** Old stuff

Basic setup

Web server

  • Copy web data files:
    cd ~grog
    rsync -lKzzavP w3:
    rsync -lKzzavP --exclude=big --exclude=small --exclude=tiny w3:
  • pkg install apache24 mod_php71

    Message from apache24-2.4.41:

    To run apache www server from startup, add apache24_enable="yes"
    in your /etc/rc.conf. Extra options can be found in startup script.

    Your hostname must be resolvable using at least 1 mechanism in
    /etc/nsswitch.conf typically DNS or /etc/hosts or apache might
    have issues starting depending on the modules you are using.


    - apache24 default build changed from static MPM to modular MPM
    - more modules are now enabled per default in the port
    - icons and error pages moved from WWWDIR to DATADIR

       If build with modular MPM and no MPM is activated in
       httpd.conf, then mpm_prefork will be activated as default
       MPM in etc/apache24/modules.d to keep compatibility with
       existing php/perl/python modules!

    Please compare the existing httpd.conf with httpd.conf.sample
    and merge missing modules/instructions into httpd.conf!

    Message from mod_php71-7.1.31:


    Make sure index.php is part of your DirectoryIndex.

    You should add the following to your Apache configuration file:

    <FilesMatch "\.php$">
        SetHandler application/x-httpd-php
    <FilesMatch "\.phps$">
        SetHandler application/x-httpd-php-source


    If you are building PHP-based ports in poudriere(8) or Synth with ZTS enabled,
    add WITH_MPM=event to /etc/make.conf to prevent build failures.

  • Configure web server:
  • rspamd

    Find out about it.




    # pkg_install mutt qpopper
          To enable the qpopper-daemon, add the following line to your /etc/inetd.conf:

       pop3 stream tcp nowait root /usr/local/libexec/qpopper qpopper -s




    # pkg_install squid
    Message from squid-4.7_1:

    o You can find the configuration files for this package in the
           directory /usr/local/etc/squid.

         o The default cache directory is /var/squid/cache/.
           The default log directory is /var/log/squid/.

           You must initialize new cache directories before you can start
           squid.  Do this by running "squid -z" as 'root' or 'squid'.
           If your cache directories are already initialized (e.g. after an
           upgrade of squid) you do not need to initialize them again.

         o When using DiskD storage scheme remember to read documentation:
           and alter your kern.ipc defaults in /boot/loader.conf. DiskD will not
           work reliably without this. Last recomendations were:


         o The default configuration will deny everyone but the local host and
           local networks as defined in RFC 1918 for IPv4 and RFCs 4193 and
           4291 for IPv6 access to the proxy service.  Edit the "http_access
           allow/deny" directives in /usr/local/etc/squid/squid.conf
           to suit your needs.

         o If AUTH_SQL option is set, please, don't forget to install one of
           following perl modules depending on database you like:

         To enable Squid, set squid_enable=yes in either
         /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/squid
         Please see /usr/local/etc/rc.d/squid for further details.

         If you just updated your Squid installation from an earlier version,
         make sure to check your Squid configuration against the 3.4 default
         configuration file /usr/local/etc/squid/squid.conf.sample.

         /usr/local/etc/squid/squid.conf.documented is a fully annotated
         configuration file you can consult for further reference.

         Additionally, you should check your configuration by calling
         'squid -f /path/to/squid.conf -k parse' before starting Squid.


    # pkg_install bip

    Doesn't work: currently broken.

    Greg's home page Greg's diary Greg's photos Copyright

    Valid XHTML 1.0!

    $Id: skel.php,v 1.7 2014/02/16 02:49:28 grog Exp $