unix:freebsd:system_builds:basic_freebsd_installation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
unix:freebsd:system_builds:basic_freebsd_installation [2019/11/07 02:16] – rodolico | unix:freebsd:system_builds:basic_freebsd_installation [2025/01/06 19:15] (current) – rodolico | ||
---|---|---|---|
Line 42: | Line 42: | ||
where // | where // | ||
- | ===== Post Installation | + | ===== Post Installation |
Note that /tmp is missing and there is no swap space. The first thing I want to do is set /tmp and /var/tmp to use the same ramdisk (aka tmpfs). Assuming I have sufficient RAM, I can allocate some space for tmp, which makes things faster and cleaner. | Note that /tmp is missing and there is no swap space. The first thing I want to do is set /tmp and /var/tmp to use the same ramdisk (aka tmpfs). Assuming I have sufficient RAM, I can allocate some space for tmp, which makes things faster and cleaner. | ||
Additionally, | Additionally, | ||
+ | |||
+ | - Make a backup copy of /etc/fstab | ||
+ | - create a 4G file to be used for swap space. modify size as necessary | ||
+ | - Create the entry in fstab for the swap space | ||
+ | - turn on swap | ||
+ | - create a tmpfs entry in fstab for /tmp | ||
+ | - move /var/tmp to point to /tmp | ||
+ | - activate /tmp. This could cause instability if something is being used, so reboot very soon | ||
+ | - display mounts (prove we did what we expected to) | ||
+ | - reboot to be on safe side | ||
<code bash> | <code bash> | ||
- | # create a 4G file to be used for swap space. modify size as necessary | + | cp /etc/fstab /etc/fstab.bak |
dd if=/ | dd if=/ | ||
- | # Create the entry in fstab | ||
echo ' | echo ' | ||
- | # create | + | swapon -a |
echo ' | echo ' | ||
- | # move /var/tmp to point to /tmp | ||
rm -fR /var/tmp | rm -fR /var/tmp | ||
ln -s /tmp /var/tmp | ln -s /tmp /var/tmp | ||
- | # activate /tmp. This could cause instability | ||
rm -fR /tmp/* | rm -fR /tmp/* | ||
mount /tmp | mount /tmp | ||
- | # Just to be on the safe side, reboot | + | mount |
- | # might as well plug the rest of the drives in | + | |
- | # if you removed them as we normally do, then | + | |
reboot | reboot | ||
</ | </ | ||
Line 69: | Line 74: | ||
===== Install some basic packages ===== | ===== Install some basic packages ===== | ||
- | I generally like some things that are not installed by default for FreeBSD (or Debian | + | I generally like some things that are not installed by default for FreeBSD (or Linux, or Microsoft Windows, or Apple OSX, for that matter). For instance, I accept the larger size of bash for the extra functionality, |
- | * joe (because | + | * joe (because |
- | * postfix (because I hate sendmail) | + | |
* bash (a lot more robust than sh) | * bash (a lot more robust than sh) | ||
* perl5 (I write a lot of perl scripts) | * perl5 (I write a lot of perl scripts) | ||
Line 80: | Line 84: | ||
* ipmitool (if this is a server with ipmi enabled functions) | * ipmitool (if this is a server with ipmi enabled functions) | ||
* pbzip2 and xz (good compression technologies) | * pbzip2 and xz (good compression technologies) | ||
+ | * smartmontools (monitors your hard drive health) | ||
+ | * postfix (if you need a full MTA) | ||
- | I'll label the steps as " | + | I've label the steps as to indicate what the code is setting up so you can easily not use some packages. |
- | - Install the packages | + | - Install the packages< |
- | pkg install joe perl5 pv pbzip2 | + | pkg install joe perl5 pv pbzip2 sudo screen webmin ipmitool bash smartmontools |
</ | </ | ||
- | - Set up postfix and disable sendmail< | + | |
+ | - dma - small smtp server for send only. Standard install | ||
+ | - edit / | ||
+ | - Create / | ||
+ | - postfix - full e-mail system | ||
+ | | ||
+ | service sendmail stop | ||
sysrc postfix_enable=" | sysrc postfix_enable=" | ||
sysrc sendmail_enable=" | sysrc sendmail_enable=" | ||
mv / | mv / | ||
install -m 0644 / | install -m 0644 / | ||
- | # clean up some leftover sendmail stuff | ||
echo ' | echo ' | ||
echo ' | echo ' | ||
echo ' | echo ' | ||
echo ' | echo ' | ||
- | # add postfix user to mail group so it has access to sasl | ||
pw group mod mail -m postfix | pw group mod mail -m postfix | ||
- | # start postfix mail server | ||
service postfix start | service postfix start | ||
</ | </ | ||
- | - Set up bash< | + | - Set up bash (optional)<code bash> |
cp /etc/fstab / | cp /etc/fstab / | ||
echo '# enable bash' >> /etc/fstab | echo '# enable bash' >> /etc/fstab | ||
echo ' | echo ' | ||
- | # you an now set the shell for any user with | ||
chsh -s bash username | chsh -s bash username | ||
</ | </ | ||
Line 113: | Line 121: | ||
- Set up ipmitool< | - Set up ipmitool< | ||
echo ' | echo ' | ||
+ | - Set up smartmontools to monitor your drives< | ||
+ | cp / | ||
+ | echo ' | ||
+ | chmod 755 / | ||
+ | echo ' | ||
+ | service smartd start | ||
+ | </ | ||
===== References ===== | ===== References ===== |
unix/freebsd/system_builds/basic_freebsd_installation.1573114593.txt.gz · Last modified: 2019/11/07 02:16 by rodolico