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/08 17:15] – [Post Installation File System Modifications] rodolico | unix:freebsd:system_builds:basic_freebsd_installation [2025/01/06 19:15] (current) – rodolico | ||
|---|---|---|---|
| Line 47: | Line 47: | ||
| 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> | ||
| cp /etc/fstab / | cp /etc/fstab / | ||
| - | # create a 4G file to be used for swap space. modify size as necessary | ||
| 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 if something is | ||
| - | # being used, so reboot very soon | ||
| rm -fR /tmp/* | rm -fR /tmp/* | ||
| mount /tmp | mount /tmp | ||
| mount | mount | ||
| - | # Just to be on the safe side, reboot | ||
| - | # might as well plug the rest of the drives in | ||
| - | # if you removed them as we normally do, then | ||
| reboot | reboot | ||
| </ | </ | ||
| Line 74: | Line 76: | ||
| 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, | 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 it's my favorite editor) | * joe (because it's my favorite editor) | ||
| - | * 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 84: | Line 85: | ||
| * pbzip2 and xz (good compression technologies) | * pbzip2 and xz (good compression technologies) | ||
| * smartmontools (monitors your hard drive health) | * smartmontools (monitors your hard drive health) | ||
| + | * postfix (if you need a full MTA) | ||
| I've label the steps as to indicate what the code is setting up so you can easily not use some packages. | 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 119: | Line 123: | ||
| - Set up smartmontools to monitor your drives< | - Set up smartmontools to monitor your drives< | ||
| cp / | cp / | ||
| - | # change the following line to include the drives you want to be monitored | + | echo ' |
| - | echo ' | + | chmod 755 / |
| - | # enable the service | + | |
| echo ' | echo ' | ||
| - | # and start it | ||
| service smartd start | service smartd start | ||
| </ | </ | ||
unix/freebsd/system_builds/basic_freebsd_installation.1573254907.txt.gz · Last modified: 2019/11/08 17:15 by rodolico
