Image of grog
Greg's setting up a new dereel
Greg's diary
Greg's home page
HOWTO index
Google
http://dunham.org/grog/wip/stock-vector-a-vector-cartoon-representing-a-work-in-progress-scene-115670665.jpg
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 dereel.lemis.com (192.109.197.135). 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/local
      /home/var/cache,  mail




  Individual ports





  PHP



Update /usr/local/etc/php.ini



--------------------------------------------------
      cd /etc
      mv group group.new
      master.pwd master.pwd.new
      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,

      su
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.
WITHOUT_REPRODUCIBLE_BUILD=dammit





      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
printer: /etc/printcap mkdir /var/spool/output/brother

Migrate to real system:

install nvidia driver
ports: RCS blame darktable handbrake cdrtools

Separate home directory:



=== root@dereel (/dev/pts/4) ~ 3 -> cd /home
You have new mail in /var/mail/grog
=== root@dereel (/dev/pts/4) /home 4 -> ls -l
total 1
drwxrwxr-x  2 root  operator  512 14 Jul 15:47 .snap
lrwxr-xr-x  1 root  wheel      17 15 Jul 16:31 grog -> /eureka/home/grog
lrwxr-xr-x  1 root  wheel      18 15 Jul 16:32 local -> /eureka/home/local
drwxr-xr-x  2 root  wheel     512 16 Jul 15:58 pkglog
drwxr-xr-x  3 root  wheel     512  8 Aug 12:58 Sysconfig
drwxr-xr-x  5 root  wheel     512 15 Jul 16:31 var
=== root@dereel (/dev/pts/4) /home 5 -> mv grog grogeureka
=== root@dereel (/dev/pts/4) /home 6 -> mkdir grog
=== root@dereel (/dev/pts/4) /home 7 -> chown grog:lemis grog
=== root@dereel (/dev/pts/4) /home 8 -> cd grog
=== root@dereel (/dev/pts/4) /home/grog 9 -> ln -s /eureka/home/grog/.fvwm
=== root@dereel (/dev/pts/4) /home/grog 10 -> ln -s /eureka/home/grog/.ssh
=== root@dereel (/dev/pts/4) /home/grog 11 -> l .ssh
total 1
-rw-------  1 grog  lemis       5 24 Mar  2011 askpass
-rw-r--r--  1 grog  lemis     403 19 Nov  2012 authorized_keys
-rw-------  1 grog  lemis      79 22 Oct  2002 config
-rwxr-xr-x  1 grog  lemis      41 28 Feb  2008 echopass
-rw-------  1 grog  lemis   1,766 19 Nov  2012 id_rsa
-rw-r--r--  1 grog  lemis     403 19 Nov  2012 id_rsa.pub
-rw-r--r--  1 grog  lemis  19,102 14 Jul 14:54 known_hosts
-rw-------  1 grog  lemis  19,852  5 Jun  2000 known_hosts.old
drwxr-xr-x  2 grog  lemis     512 19 Nov  2012 old
drwxr-xr-x  2 grog  lemis     512 19 Nov  2012 old2
-r--------  1 grog  lemis      19 19 Nov  2012 passphrase
-rw-------  1 grog  lemis     512 20 Dec  1999 random_seed
-rw-------  1 grog  lemis       8 25 May  2016 vncpasswd-www
=== root@dereel (/dev/pts/4) /home/grog 12 -> rm .ssh
=== root@dereel (/dev/pts/4) /home/grog 13 -> mkdir .ssh
=== root@dereel (/dev/pts/4) /home/grog 14 -> cp -p /eureka/home/grog/.ssh .ssh
cp: /eureka/home/grog/.ssh is a directory (not copied).
=== root@dereel (/dev/pts/4) /home/grog 15 -> cp -p /eureka/home/grog/.ssh/* .ssh
cp: /eureka/home/grog/.ssh/old is a directory (not copied).
cp: /eureka/home/grog/.ssh/old2 is a directory (not copied).
=== root@dereel (/dev/pts/4) /home/grog 16 ->

=== root@dereel (/dev/pts/4) /home/grog 16 -> cp -p /eureka/home/grog/.hugin .
You have new mail in /var/mail/grog
=== root@dereel (/dev/pts/4) /home/grog 17 -> ln -s /eureka/home/grog/.xinitrc
=== root@dereel (/dev/pts/4) /home/grog 18 ->

=== root@dereel (/dev/pts/4) /home/grog 18 -> ln -s /Photos/grog Photos

Hugin comes up with simple interface, etc.

=== grog@dereel (/dev/pts/3) ~/Photos/20200815 14 -> Hugin house-from-entrance.jpeg C/house-from-entrance-?.tiff
/Photos/Tools/Hugin house-from-entrance.jpeg C/house-from-entrance-0.tiff C/house-from-entrance-1.tiff C/house-from-entrance-2.tiff C/house-from-entrance-3.tiff
mv: rename /home/grog/.hugin to /var/tmp/hugout: Permission denied
/Photos/Tools/Hugin: cannot open /var/tmp/hugout: No such file or directory

Can't paste marked text into Emacs with c-y.

bash doesn't respond to Alt-foo

=== grog@dereel (/dev/pts/6) ~ 4 -> ln -s /eureka/home/grog/.emacs
=== grog@dereel (/dev/pts/6) ~ 5 -> ln -s /eureka/home/grog/.bash
.bash_history             .bashrc                   .bashrc-in-progress
.bash_profile             .bashrc-cygwin            .bashrc-prompt-from-hell
=== grog@dereel (/dev/pts/6) ~ 5 -> ln -s /eureka/home/grog/.bash_profile
=== grog@dereel (/dev/pts/6) ~ 6 -> ln -s /eureka/home/grog/.bash_rc
=== grog@dereel (/dev/pts/6) ~ 7 -> exec bash
=== grog@dereel (/dev/pts/6) ~ 1 -> echo $L
$L                   $LESS                $LINES               $LOGNAME
$LC_ALL              $LESSCHARSET         $LJ                  $LS_SAMESORT
$LD_32_LIBRARY_PATH  $LINENO              $LJJ
=== grog@dereel (/dev/pts/6) ~ 1 -> echo $LC_ALL
en_AU.ISO8859-1
=== grog@dereel (/dev/pts/6) ~ 2 -> l
bash: l: command not found
=== grog@dereel (/dev/pts/6) ~ 3 -> . .bashrc
bash: .bashrc: No such file or directory
=== grog@dereel (/dev/pts/6) ~ 4 -> ln -s /eureka/home/grog/.bashrc
=== grog@dereel (/dev/pts/6) ~ 5 -> . .bashrc
bash: /usr/games/fortune: No such file or directory
=== grog@dereel (/dev/pts/5) ~ 6 -> l
total 1
drwxr-xr-x  5213 grog  lemis  109,056 15 Aug 10:42 Photos
=== grog@dereel (/dev/pts/5) ~ 7 ->

=== grog@dereel (/dev/pts/5) ~ 7 -> l -d /var/tmp
drwxr-xr-x  3 root  wheel  512 16 Jul 12:47 /var/tmp

bash: l: command not found
=== grog@dereel (/dev/pts/6) ~ 3 -> . .bashrc
bash: .bashrc: No such file or directory
=== grog@dereel (/dev/pts/6) ~ 4 -> ln -s /eureka/home/grog/.bashrc
=== grog@dereel (/dev/pts/6) ~ 5 -> . .bashrc
bash: /usr/games/fortune: No such file or directory
=== grog@dereel (/dev/pts/5) ~ 6 -> l
total 1
drwxr-xr-x  5213 grog  lemis  109,056 15 Aug 10:42 Photos
=== grog@dereel (/dev/pts/5) ~ 7 -> l -d /var/tmp
drwxr-xr-x  3 root  wheel  512 16 Jul 12:47 /var/tmp
=== grog@dereel (/dev/pts/5) ~ 8 -> touch /var/tmp/foo
touch: /var/tmp/foo: Permission denied
=== grog@dereel (/dev/pts/5) ~ 9 -> touch /var/tmp/foo
touch: /var/tmp/foo: Permission denied
=== grog@dereel (/dev/pts/5) ~ 10 -> l -d /var/tmp
drwxr-xr-t  3 root  wheel  512 16 Jul 12:47 /var/tmp
=== grog@dereel (/dev/pts/5) ~ 11 -> touch /var/tmp/fooxxxxxx
touch: /var/tmp/fooxxxxxx: Permission denied
=== grog@dereel (/dev/pts/5) ~ 12 -> l /var/tmp/fooxxxxxx
ls: /var/tmp/fooxxxxxx: No such file or directory
=== grog@dereel (/dev/pts/5) ~ 13 -> df /var/tmp
Filesystem  1048576-blocks  Used   Avail Capacity  Mounted on
/dev/ada0p5        705,709 5,355 643,896     1%    /home
=== grog@dereel (/dev/pts/5) ~ 14 -> touch /var/tmp/fooxxxxxx
touch: /var/tmp/fooxxxxxx: Permission denied
=== grog@dereel (/dev/pts/5) ~ 15 -> touch /var/tmp/fooxxxxxx
=== grog@dereel (/dev/pts/5) ~ 16 -> l /var/tmp/fooxxxxxx
-rw-r--r--  1 grog  wheel  0 15 Aug 11:57 /var/tmp/fooxxxxxx
=== grog@dereel (/dev/pts/5) ~ 17 -> rm /var/tmp/fooxxxxxx

hugin: much faster, different "look", lower error rates

more subdires: Mail, public_html, emacs, private, Mail

.muttrc, .mail_aliases

/usr/local/lib/.muttrc

recognize mime types (how?)


HTML-Fill mode brown

espeak
****************************************************************************************** Old stuff

Basic setup

Web server

  • Copy web data files:
    cd ~grog
    rsync -lKzzavP www.lemis.com w3:
    rsync -lKzzavP --exclude=big --exclude=small --exclude=tiny www.lemis.com 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>
    <FilesMatch "\.phps$">
        SetHandler application/x-httpd-php-source
    </FilesMatch>

    ******************************************************************************

    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.

    lpr

    /etc/printcap

    Mail

    postfix
    # 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

    Communication between mail and browser

    ftp

    DNS

    Squid

    # 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/.

           Note:
           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:
             http://wiki.squid-cache.org/Features/DiskDaemon
           and alter your kern.ipc defaults in /boot/loader.conf. DiskD will not
           work reliably without this. Last recomendations were:

             kern.ipc.msgmnb=8192
             kern.ipc.msgssz=64
             kern.ipc.msgtql=2048

         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:
             databases/p5-DBD-mysql
             databases/p5-DBD-Pg
             databases/p5-DBD-SQLite

         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.

         Note:
         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.

    bip

    # 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 $