{"id":15769,"date":"2021-02-19T07:50:20","date_gmt":"2021-02-19T06:50:20","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/"},"modified":"2021-02-19T07:50:20","modified_gmt":"2021-02-19T06:50:20","slug":"postgresql-on-freebsd-updating-configuration","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/","title":{"rendered":"PostgreSQL on FreeBSD, updating &amp; configuration"},"content":{"rendered":"<p>In the <a href=\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-getting-started\/\" target=\"_blank\" rel=\"noopener\">last post<\/a> we installed FreeBSD, configured the keyboard, time zone and the first network interface, which gets it&#8217;s IP address via DHCP. In this post we&#8217;ll look at how we can configure the second interface, which gets a static IP address in the <a href=\"https:\/\/www.virtualbox.org\/manual\/ch06.html#network_hostonly\" target=\"_blank\" rel=\"noopener\">host only network<\/a>. Once we&#8217;ve done that, we&#8217;ll update the system to the latest packages, have a look at the file system layout and kernel parameters so we can later on proceed with installing PostgreSQL.<\/p>\n<p><!--more--><\/p>\n<p>Currently we only have the NAT interface configured. We could start working with the system in the VirtualBox console:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_53.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_53.png\" alt=\"\" width=\"718\" height=\"480\" class=\"aligncenter size-full wp-image-47665\" \/><\/a><\/p>\n<p>You&#8217;ll quickly notice that this is not much fun as the size of the terminal is fixed, rather small, and copy&amp;paste is not working. Using a remote SSH connection is more convenient and we can already do that by using port forwarding with the NAT interface:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_54.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_54.png\" alt=\"\" width=\"485\" height=\"299\" class=\"aligncenter size-full wp-image-47666\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_55.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_55.jpg\" alt=\"\" width=\"738\" height=\"570\" class=\"aligncenter size-full wp-image-47667\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_56.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_56.jpg\" alt=\"\" width=\"660\" height=\"168\" class=\"aligncenter size-full wp-image-47668\" \/><\/a><\/p>\n<p>Having that ready we can connect with SSH:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\ndwe@ltdwe:~$ ssh -o Port=4444 root@localhost\nThe authenticity of host '[localhost]:4444 ([127.0.0.1]:4444)' can't be established.\nECDSA key fingerprint is SHA256:aq6Eb4lW5rDz+BTR9cLrK6uXiIqhSNuLBhYVH5w+f\/o.\nAre you sure you want to continue connecting (yes\/no\/[fingerprint])? yes\nWarning: Permanently added '[localhost]:4444' (ECDSA) to the list of known hosts.\nPassword for root@freebsd.it.dbi-services.com:\nPassword for root@freebsd.it.dbi-services.com:\n<\/pre>\n<p>Even if the password is correct, we&#8217;ll not be able to connect as root, as logins over ssh with root are not allowed. So, back to the console:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_57.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_57.png\" alt=\"\" width=\"426\" height=\"45\" class=\"aligncenter size-full wp-image-47670\" \/><\/a><br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_58.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_58.png\" alt=\"\" width=\"719\" height=\"476\" class=\"aligncenter size-full wp-image-47671\" \/><\/a><\/p>\n<p>This is of course nothing you should do with serious installations, but for testing it is fine. Restarting services in FreeBSD is done with the <a href=\"https:\/\/docs.freebsd.org\/en_US.ISO8859-1\/books\/handbook\/configtuning-rcd.html\" target=\"_blank\" rel=\"noopener\">&#8220;service&#8221;<\/a> command:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_59.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_59.png\" alt=\"\" width=\"723\" height=\"123\" class=\"aligncenter size-full wp-image-47672\" \/><\/a><\/p>\n<p>From now on the SSH connection will accept root logins:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\ndwe@ltdwe:~$ ssh -o Port=4444 root@localhost\nPassword for root@freebsd.it.dbi-services.com:\nLast login: Thu Feb 18 22:42:21 2021\nFreeBSD 12.2-RELEASE r366954 GENERIC \n\nWelcome to FreeBSD!\n\nRelease Notes, Errata: https:\/\/www.FreeBSD.org\/releases\/\nSecurity Advisories:   https:\/\/www.FreeBSD.org\/security\/\nFreeBSD Handbook:      https:\/\/www.FreeBSD.org\/handbook\/\nFreeBSD FAQ:           https:\/\/www.FreeBSD.org\/faq\/\nQuestions List: https:\/\/lists.FreeBSD.org\/mailman\/listinfo\/freebsd-questions\/\nFreeBSD Forums:        https:\/\/forums.FreeBSD.org\/\n\nDocuments installed with the system are in the \/usr\/local\/share\/doc\/freebsd\/\ndirectory, or can be installed later with:  pkg install en-freebsd-doc\nFor other languages, replace \"en\" with a language code like de or fr.\n\nShow the version of FreeBSD installed:  freebsd-version ; uname -a\nPlease include that output and any error messages when posting questions.\nIntroduction to manual pages:  man man\nFreeBSD directory layout:      man hier\n\nEdit \/etc\/motd to change this login announcement.\nroot@freebsd:~ $ \n<\/pre>\n<p>That SSH is actually started when the system is booting, is controlled by rc.conf:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1; highlight: [5]\">\nroot@freebsd:~ $ cat \/etc\/rc.conf\nhostname=\"freebsd.it.dbi-services.com\"\nkeymap=\"ch.kbd\"\nifconfig_em0=\"DHCP\"\nsshd_enable=\"YES\"\nntpd_enable=\"YES\"\n# Set dumpdev to \"AUTO\" to enable crash dumps, \"NO\" to disable\ndumpdev=\"AUTO\"\nzfs_enable=\"YES\"\n<\/pre>\n<p>Remember, we are not on Linux, there is no systemd, so everything is configured in plain files. Now, that we are logged in, lets bring the system to the latest packages. To do this in FreeBSD, there is the &#8220;freebsd-update&#8221; command. The first step is to fetch the updates (which will give you a list of files that will be updated), the second step is to actually install the updates:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1; highlight: [1,21]\">\nroot@freebsd:~ # freebsd-update fetch\nsrc component not installed, skipped\nLooking up update.FreeBSD.org mirrors... none found.\nFetching public key from update.FreeBSD.org... done.\nFetching metadata signature for 12.2-RELEASE from update.FreeBSD.org... done.\nFetching metadata index... done.\nFetching 2 metadata files... done.\nInspecting system... done.\nPreparing to download files... done.\nFetching 91 patches.....10....20....30....40....50....60....70....80....90 done.\nApplying patches... done.\nThe following files will be updated as part of updating to\n12.2-RELEASE-p3:\n\/bin\/freebsd-version\n\/boot\/kernel\/autofs.ko\n\/boot\/kernel\/kernel\n\/boot\/kernel\/linux.ko\n\/boot\/kernel\/linux64.ko\n\/boot\/kernel\/mqueuefs.ko\n...\nroot@freebsd:~ # freebsd-update install\nsrc component not installed, skipped\nInstalling updates...Scanning \/\/usr\/share\/certs\/blacklisted for certificates...\nScanning \/\/usr\/share\/certs\/trusted for certificates...\n done.\n<\/pre>\n<p>Time to configure our second interface. To get the name of the interfaces there is &#8220;ifconfig&#8221;:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\nroot@freebsd:~ # ifconfig -a\nem0: flags=8843 metric 0 mtu 1500\n        options=81009b\n        ether 08:00:27:c1:d7:d6\n        inet 10.0.2.15 netmask 0xffffff00 broadcast 10.0.2.255\n        media: Ethernet autoselect (1000baseT )\n        status: active\n        nd6 options=29\nem1: flags=8802 metric 0 mtu 1500\n        options=81009b\n        ether 08:00:27:39:4e:9a\n        media: Ethernet autoselect (1000baseT )\n        status: active\n        nd6 options=29\nlo0: flags=8049 metric 0 mtu 16384\n        options=680003\n        inet6 ::1 prefixlen 128\n        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3\n        inet 127.0.0.1 netmask 0xff000000\n        groups: lo\n        nd6 options=21\n<\/pre>\n<p>The first one (em0) is our NAT interface, the second on (em1) is the one attached to the host only network. Configuring network interfaces is also done via \/etc\/rc.conf:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1; highlight: [3,4]\">\nhostname=\"freebsd.it.dbi-services.com\"\nkeymap=\"ch.kbd\"\nifconfig_em0=\"DHCP\"\nifconfig_em1=\"inet 192.168.22.17 netmask 255.255.255.0\"\nsshd_enable=\"YES\"\nntpd_enable=\"YES\"\n# Set dumpdev to \"AUTO\" to enable crash dumps, \"NO\" to disable\ndumpdev=\"AUTO\"\nzfs_enable=\"YES\"\n<\/pre>\n<p>Once you restarted the network, the second interface is ready:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1; highlight: [1,38]\">\nroot@freebsd:~ # service netif restart\nStopping dhclient.\nStopping Network: lo0 em0 em1.\nlo0: flags=8048 metric 0 mtu 16384\n        options=680003\n        groups: lo\n        nd6 options=21\nem0: flags=8c02 metric 0 mtu 1500\n        options=81009b\n        ether 08:00:27:c1:d7:d6\n        media: Ethernet autoselect (1000baseT )\n        status: active\n        nd6 options=29\nem1: flags=8c02 metric 0 mtu 1500\n        options=81009b\n        ether 08:00:27:39:4e:9a\n        media: Ethernet autoselect (1000baseT )\n        status: active\n        nd6 options=29\nStarting Network: lo0 em0 em1.\nlo0: flags=8049 metric 0 mtu 16384\n        options=680003\n        inet6 ::1 prefixlen 128\n        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3\n        inet 127.0.0.1 netmask 0xff000000\n        groups: lo\n        nd6 options=21\nem0: flags=8843 metric 0 mtu 1500\n        options=81009b\n        ether 08:00:27:c1:d7:d6\n        inet 10.0.2.15 netmask 0xffffff00 broadcast 10.0.2.255\n        media: Ethernet autoselect (1000baseT )\n        status: active\n        nd6 options=29\nem1: flags=8843 metric 0 mtu 1500\n        options=81009b\n        ether 08:00:27:39:4e:9a\n        inet 192.168.22.17 netmask 0xffffff00 broadcast 192.168.22.255\n        media: Ethernet autoselect (1000baseT )\n        status: active\n        nd6 options=29\n<\/pre>\n<p>Port forwarding to the NAT interface is not anymore required from now on, as you can directly connect to the second interface:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1; highlight: [1]\">\ndwe@ltdwe:~$ ssh root@192.168.22.17\nThe authenticity of host '192.168.22.17 (192.168.22.17)' can't be established.\nECDSA key fingerprint is SHA256:aq6Eb4lW5rDz+BTR9cLrK6uXiIqhSNuLBhYVH5w+f\/o.\nAre you sure you want to continue connecting (yes\/no\/[fingerprint])? yes\nWarning: Permanently added '192.168.22.17' (ECDSA) to the list of known hosts.\nPassword for root@freebsd.it.dbi-services.com:\nLast login: Thu Feb 18 23:29:46 2021 from 10.0.2.2\nFreeBSD 12.2-RELEASE r366954 GENERIC \n\nWelcome to FreeBSD!\n\nRelease Notes, Errata: https:\/\/www.FreeBSD.org\/releases\/\nSecurity Advisories:   https:\/\/www.FreeBSD.org\/security\/\nFreeBSD Handbook:      https:\/\/www.FreeBSD.org\/handbook\/\nFreeBSD FAQ:           https:\/\/www.FreeBSD.org\/faq\/\nQuestions List: https:\/\/lists.FreeBSD.org\/mailman\/listinfo\/freebsd-questions\/\nFreeBSD Forums:        https:\/\/forums.FreeBSD.org\/\n\nDocuments installed with the system are in the \/usr\/local\/share\/doc\/freebsd\/\ndirectory, or can be installed later with:  pkg install en-freebsd-doc\nFor other languages, replace \"en\" with a language code like de or fr.\n\nShow the version of FreeBSD installed:  freebsd-version ; uname -a\nPlease include that output and any error messages when posting questions.\nIntroduction to manual pages:  man man\nFreeBSD directory layout:      man hier\n\nEdit \/etc\/motd to change this login announcement.\n<\/pre>\n<p>I really like how easy it is to configure the network. One line in the correct file, and you&#8217;re done.<\/p>\n<p>When we installed FreeBSD in the last post, we opted for ZFS as the file system, and this is how it looks like:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\nroot@freebsd:~ $ df -h\nFilesystem            Size    Used   Avail Capacity  Mounted on\nzroot\/ROOT\/default     26G    1.1G     25G     4%    \/\ndevfs                 1.0K    1.0K      0B   100%    \/dev\nzroot\/tmp              25G     96K     25G     0%    \/tmp\nzroot                  25G     96K     25G     0%    \/zroot\nzroot\/usr\/home         25G     96K     25G     0%    \/usr\/home\nzroot\/usr\/src          25G     96K     25G     0%    \/usr\/src\nzroot\/usr\/ports        26G    711M     25G     3%    \/usr\/ports\nzroot\/var\/audit        25G     96K     25G     0%    \/var\/audit\nzroot\/var\/crash        25G     96K     25G     0%    \/var\/crash\nzroot\/var\/log          25G    144K     25G     0%    \/var\/log\nzroot\/var\/mail         25G     96K     25G     0%    \/var\/mail\nzroot\/var\/tmp          25G     96K     25G     0%    \/var\/tmp\n<\/pre>\n<p>The installer created one zpool and several file systems within that pool:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\nroot@freebsd:~ $ zpool list\nNAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT\nzroot  27.5G  1.79G  25.7G        -         -     0%     6%  1.00x  ONLINE  -\nroot@freebsd:~ $ zfs list\nNAME                 USED  AVAIL  REFER  MOUNTPOINT\nzroot               1.79G  24.9G    96K  \/zroot\nzroot\/ROOT          1.09G  24.9G    96K  none\nzroot\/ROOT\/default  1.09G  24.9G  1.09G  \/\nzroot\/tmp             96K  24.9G    96K  \/tmp\nzroot\/usr            711M  24.9G    96K  \/usr\nzroot\/usr\/home        96K  24.9G    96K  \/usr\/home\nzroot\/usr\/ports      711M  24.9G   711M  \/usr\/ports\nzroot\/usr\/src         96K  24.9G    96K  \/usr\/src\nzroot\/var            624K  24.9G    96K  \/var\nzroot\/var\/audit       96K  24.9G    96K  \/var\/audit\nzroot\/var\/crash       96K  24.9G    96K  \/var\/crash\nzroot\/var\/log        144K  24.9G   144K  \/var\/log\nzroot\/var\/mail        96K  24.9G    96K  \/var\/mail\nzroot\/var\/tmp         96K  24.9G    96K  \/var\/tmp\n<\/pre>\n<p>With <a href=\"https:\/\/en.wikipedia.org\/wiki\/ZFS\" target=\"_blank\" rel=\"noopener\">ZFS<\/a> you have all the nice features such as RAID, de-duplication, compression, snapshots and much more. There is a dedicated page in the <a href=\"https:\/\/wiki.freebsd.org\/ZFS\" target=\"_blank\" rel=\"noopener\">FreeBSD wiki<\/a> if you want dig deeper and play around with ZFS.<\/p>\n<p>The default shell on FreeBSD is not bash, but <a href=\"https:\/\/www.tcsh.org\/\" target=\"_blank\" rel=\"noopener\">tcsh<\/a>.<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\nroot@freebsd:~ $ echo $SHELL\n\/bin\/csh\n<\/pre>\n<p>If you are not happy with that, you can install bash using the pkg command. When pkg is used for the first time it needs to bootstrap itself:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1; highlight: [1,3,8]\">\nroot@freebsd:~ # pkg search bash\nThe package management tool is not yet installed on your system.\nDo you want to fetch and install it now? [y\/N]: y\nBootstrapping pkg from pkg+http:\/\/pkg.FreeBSD.org\/FreeBSD:12:amd64\/quarterly, please wait...\nVerifying signature with trusted certificate pkg.freebsd.org.2013102301... done\nInstalling pkg-1.16.1...\nExtracting pkg-1.16.1: 100%\npkg: Repository FreeBSD missing. 'pkg update' required\nbash-5.1.4                     GNU Project's Bourne Again SHell\nbash-completion-2.11,2         Programmable completion library for Bash\nbash-static-5.1.4              GNU Project's Bourne Again SHell\nbashtop-0.9.25_1               Linux\/OSX\/FreeBSD resource monitor\ncheckbashisms-2.19.6           Check for the presence of bashisms\nerlang-mochiweb-basho-2.9.0p2  Erlang library for building lightweight HTTP servers (Basho fork)\nmybashburn-1.0.2_4             Ncurses CD burning bash script\np5-Bash-Completion-0.008_2     Extensible system to provide bash completion\np5-Term-Bash-Completion-Generator-0.02.8_2 Generate bash completion scripts\nswitchBashZsh-1.1              Portable shell setup for Bash\/Zsh across FreeBSD\/Linux\/Cygwin\n<\/pre>\n<p>Because we care about warnings we&#8217;ll update first, and then install bash:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1; highlight: [1,5,23,37]\">\nroot@freebsd:~ # pkg update\nUpdating FreeBSD repository catalogue...\nFreeBSD repository is up to date.\nAll repositories are up to date.\nroot@freebsd:~ # pkg install bash\nUpdating FreeBSD repository catalogue...\nFreeBSD repository is up to date.\nAll repositories are up to date.\nUpdating database digests format: 100%\nThe following 4 package(s) will be affected (of 0 checked):\n\nNew packages to be INSTALLED:\n        bash: 5.1.4\n        gettext-runtime: 0.21\n        indexinfo: 0.3.1\n        readline: 8.0.4\n\nNumber of packages to be installed: 4\n\nThe process will require 11 MiB more space.\n2 MiB to be downloaded.\n\nProceed with this action? [y\/N]: y\n[1\/4] Fetching bash-5.1.4.txz: 100%    1 MiB   1.5MB\/s    00:01    \n[2\/4] Fetching indexinfo-0.3.1.txz: 100%    6 KiB   5.8kB\/s    00:01    \n[3\/4] Fetching readline-8.0.4.txz: 100%  353 KiB 361.2kB\/s    00:01    \n[4\/4] Fetching gettext-runtime-0.21.txz: 100%  165 KiB 168.8kB\/s    00:01    \nChecking integrity... done (0 conflicting)\n[1\/4] Installing indexinfo-0.3.1...\n[1\/4] Extracting indexinfo-0.3.1: 100%\n[2\/4] Installing readline-8.0.4...\n[2\/4] Extracting readline-8.0.4: 100%\n[3\/4] Installing gettext-runtime-0.21...\n[3\/4] Extracting gettext-runtime-0.21: 100%\n[4\/4] Installing bash-5.1.4...\n[4\/4] Extracting bash-5.1.4: 100%\n[root@freebsd ~]# bash --version\nGNU bash, version 5.1.4(0)-release (amd64-portbld-freebsd12.2)\nCopyright (C) 2020 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later \n\nThis is free software; you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n<\/pre>\n<p>Pretty much the same as in Linux, is setting kernel parameters. All the parameters can be either set with &#8220;sysctl&#8221; or directly in sysctl.conf:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1; highlight: [1,12]\">\n[root@freebsd ~]# sysctl -a | head\nkern.ostype: FreeBSD\nkern.osrelease: 12.2-RELEASE\nkern.osrevision: 199506\nkern.version: FreeBSD 12.2-RELEASE r366954 GENERIC\n\nkern.maxvnodes: 112396\nkern.maxproc: 7396\nkern.maxfiles: 64209\nkern.argmax: 524288\nkern.securelevel: -1\n[root@freebsd ~]# cat \/etc\/sysctl.conf | head\n# $FreeBSD: releng\/12.2\/sbin\/sysctl\/sysctl.conf 337624 2018-08-11 13:28:03Z brd $\n#\n#  This file is read when going to multi-user and its contents piped thru\n#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.\n#\n\n# Uncomment this to prevent users from seeing information about processes that\n# are being run under another UID.\n#security.bsd.see_other_uids=0\nvfs.zfs.min_auto_ashift=12\n<\/pre>\n<p>We have configured the network, updated the system and we know how to search for, and install packages, and we know how we can set kernel parameters. Ready for installing PostgreSQL, in the next post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the last post we installed FreeBSD, configured the keyboard, time zone and the first network interface, which gets it&#8217;s IP address via DHCP. In this post we&#8217;ll look at how we can configure the second interface, which gets a static IP address in the host only network. Once we&#8217;ve done that, we&#8217;ll update the [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":15770,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[2256,77],"type_dbi":[],"class_list":["post-15769","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-administration-monitoring","tag-freebsd","tag-postgresql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>PostgreSQL on FreeBSD, updating &amp; configuration - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL on FreeBSD, updating &amp; configuration\" \/>\n<meta property=\"og:description\" content=\"In the last post we installed FreeBSD, configured the keyboard, time zone and the first network interface, which gets it&#8217;s IP address via DHCP. In this post we&#8217;ll look at how we can configure the second interface, which gets a static IP address in the host only network. Once we&#8217;ve done that, we&#8217;ll update the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-19T06:50:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_53.png\" \/>\n\t<meta property=\"og:image:width\" content=\"718\" \/>\n\t<meta property=\"og:image:height\" content=\"480\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Daniel Westermann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@westermanndanie\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daniel Westermann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/\"},\"author\":{\"name\":\"Daniel Westermann\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"headline\":\"PostgreSQL on FreeBSD, updating &amp; configuration\",\"datePublished\":\"2021-02-19T06:50:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/\"},\"wordCount\":599,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_53.png\",\"keywords\":[\"FreeBSD\",\"PostgreSQL\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/\",\"name\":\"PostgreSQL on FreeBSD, updating &amp; configuration - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_53.png\",\"datePublished\":\"2021-02-19T06:50:20+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_53.png\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_53.png\",\"width\":718,\"height\":480},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL on FreeBSD, updating &amp; configuration\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66\",\"name\":\"Daniel Westermann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"caption\":\"Daniel Westermann\"},\"description\":\"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.\",\"sameAs\":[\"https:\/\/x.com\/westermanndanie\"],\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PostgreSQL on FreeBSD, updating &amp; configuration - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/","og_locale":"en_US","og_type":"article","og_title":"PostgreSQL on FreeBSD, updating &amp; configuration","og_description":"In the last post we installed FreeBSD, configured the keyboard, time zone and the first network interface, which gets it&#8217;s IP address via DHCP. In this post we&#8217;ll look at how we can configure the second interface, which gets a static IP address in the host only network. Once we&#8217;ve done that, we&#8217;ll update the [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/","og_site_name":"dbi Blog","article_published_time":"2021-02-19T06:50:20+00:00","og_image":[{"width":718,"height":480,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_53.png","type":"image\/png"}],"author":"Daniel Westermann","twitter_card":"summary_large_image","twitter_creator":"@westermanndanie","twitter_misc":{"Written by":"Daniel Westermann","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/"},"author":{"name":"Daniel Westermann","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"headline":"PostgreSQL on FreeBSD, updating &amp; configuration","datePublished":"2021-02-19T06:50:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/"},"wordCount":599,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_53.png","keywords":["FreeBSD","PostgreSQL"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/","url":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/","name":"PostgreSQL on FreeBSD, updating &amp; configuration - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_53.png","datePublished":"2021-02-19T06:50:20+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_53.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/freebsd_53.png","width":718,"height":480},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-on-freebsd-updating-configuration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PostgreSQL on FreeBSD, updating &amp; configuration"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66","name":"Daniel Westermann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","caption":"Daniel Westermann"},"description":"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.","sameAs":["https:\/\/x.com\/westermanndanie"],"url":"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/15769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=15769"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/15769\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/15770"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=15769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=15769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=15769"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=15769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}