MikeL's FreeBSD new machine HowTo

30-Mar-2014

This is a list of tasks I went through to move my entire world from an old FreeBSD-7 machine to a much newer machine running a new install of FreeBSD release-10.


Merge old stuff by hand. Start an xterm on each machine side-by-side on your screen and transfer trivial changes by hand. For large changed files, on the old machine copy the file to "file.hostname", ftp over the .hostname file to the new machine, then use 'diff -cw'.

Personal home directory: .cshrc
.emacs
bin/
other?

Same as above for /root user directory. Watch out for suidperl scripts and or setuid file permissions.

directories from your user and root accounts where you have made custom scripts, etc.

Merge special case accounts e.g:

Don't forget mikelemp account for kenwiley.


[20210124]
New procedure for Windows firewall blocking external ftp server access:
Start button->Network & Internet
Scroll down and click Windows Firewall link
Click on "Allow an app through firewall".
Click on "Change Settings" button.
Click on "Allow another app..." button near bottom right.
Browse and find "Filezilla server" (probably in 'C:\Program Files (x86)\' dir).
Hit Add button.
Make sure to select Private and/or Public and hit Ok.
Back on Firewall & Network Protection page, scroll down and click Advanced Settings link.
Click Allow
You're now on the "Windows Defender Firewall with Advanced Security on Local Computer" screen. If you don't see this at the top, you're in the wrong place.
Scroll down and click on "Inbound Rules" link
Scroll and find "File Transfer Program". There's 4 of them in a row, make sure all are enabled and open both ways. Also click on Advanced tab and ensure all profiles are selected.
Scroll down and look for "Core Networking Diagnostics - ICDMP EchoRequest (ICMPv4-In). There's 2, enable and open both.
Now hit the back arrow at top left, and take "Outbound Rules" link.
Scroll down to "FTP Server (FTP Traffic-Out). Enable and open these two, plus the following two Secure FTP entries.

[20200424]
Install pingmon. Find it in mikel source dir, follow INSTALL.txt instructions.
Note that on the drvwymon system, you'll want to go into the firewall, advanced, and allow ICMP echo return. You can then include this system in pingmon list for testing.

On Win10:
Start Button->Network & Internet->Windows Firewall->Advanced Settings
Yes (Allow)
Inbound Rules
Scroll down to File and Printer Sharing (Echo Request - ICMPv4-In)
Right-click, take Properties
Advanced tab, select all three options (you'll probably be adding Domain)
Remote users tab, uncheck Exceptions
(This assumes you want access from outside world. If only pinging internal network, skip this last.)

[20200322] Make sure VN libs are working. Copy /usr/local/lib/perl5/site_perl/VN* into place.
Be sure to follow instructions in VNNums.install to set up DB. Go to any webpage that uses VNNums or try running the test script vintners.net/html/cgi-bin/nums.pl and if necessary, edit the code and comment in the DB dump at the end.
Misc. Perl stuff:
cpan install HTTP::Date (needed by my backup script)
cpan install Net::FTP::Throttle (needed by my backup script)
cpan install MP3::Info (needed by kenwiley script)
cpan install Config::Simple (needed by backup script)
cpan install DBD::mysql (needed by PV sched script)
pkg install streamripper (needed by kenwiley script)

[20200319] Note that my old Perl scripts have shebang syntax for old Perl location in /usr/bin. I'm fixing this by just hacking a symbolic link pointing the new Perl location of /usr/local/bin.

Merge crontab files for each account.

Set up backup script and it's config, don't forget to add to crontab.
mdkir /backup
chmod 770 /backup
mkdir any dirs for other machines that will backup onto this machine.

Bring over /boot/loader.conf

sendmail:
On old machine, copy aliases to aliases.oldmachinename
Bring over old machine's .mc file, this should already be named oldmachinename.mc
Bring over all extra files, I needed:
access
aliases.oldmachinename
aliases.customer
aliases.mailman
aliases.mikel
local-host-names
trusted-users
virtusertable
mv oldmachinename.mc newmachine.mc
diff -cw freebsd.mc newmachine.mc, merge any changes.
make newmachine.cf
diff -cw newmachine.cf sendmail.cf, check for anything unexpected.
diff -cw aliases.oldmachinename alias, merge any changes.
make
Edit /etc/rc.conf and add:
sendmail_enable="YES"
Then do: [20200319] (old news - skip this)
/etc/rc.d/sendmail status
/etc/rc.d/sendmail restart
Then do: [20200319] new news - now use 'service'
service sendmail status
service sendmail start
Then:
more /var/log/maillog, look for and fix any problems.

Note that the previous two commands can be covered by the 'sendmail-restart' script.


Copy 'cert' dir to new machine.
Be sure to pay careful attention to dir and file permissions, and check that they match '/etc/group' settings.

Copyright © 1995-2024 Mike Lempriere (running on host bayanus)