Overview
This is a PostgreSQL jail intended to be run as a single PostgreSQL instance and can be started with pot
.
The jail exposes parameters that can be set via the environment.
It also contains node_exporter
and a local consul
agent instance to be
available that it can connect to (see configuration below). You can e.g.
use the consul pot
flavour
on this site to run consul
.
Setup
This PostgreSQL jail is designed to be accessed by trusted clients inside trusted environments.
This jail must be run with a non-routable IP address, accessible only to the internal network.
Installation
- Create a ZFS data set on the parent system beforehand
zfs create -o mountpoint=/mnt/postgres zroot/postgres
- Create your local jail from the image or the flavour files.
- Clone the local jail
- Mount in the ZFS data set you created
pot mount-in -p <jailname> -m /mnt -d /mnt/postgres
- Copy in your custom
customscript.sh
with additional commands, for example creating database userspot copy-in -p <jailname> -s /path/to/your/customscript.sh -d /root/customscript.sh
- Adjust to your environment:
sudo pot set-env -p <jailname> \ -E DATACENTER=<datacenter name> \ -E CONSULSERVERS="<comma-deliminated list of consul servers>" \ -E GOSSIPKEY=<32 byte Base64 key from consul keygen>] \ -E NODENAME=<name of node> \ -E IP=<IP address> \ -E IP4NETWORK=<10.0.0.1/24> \ -E EXPORTERPASS=<password for the postgres_exporter user> \ [ -E DUMPSCHEDULE="<cronschedule>" ] \ [ -E DUMPPATH=<path for database backups> ] \ [ -E REMOTELOG=<IP of syslog-ng server> ]
The DATACENTER parameter is the name of the datacenter.
The CONSULSERVERS parameter is a comma-deliminated list of IP addresses for the consul server or cluster. Do not include spaces!
e.g. CONSULSERVERS="10.0.0.2"
or CONSULSERVERS="10.0.0.2,10.0.0.3,10.0.0.4,10.0.0.5,10.0.0.6"
The GOSSIPKEY parameter is the gossip encryption key for consul agent.
The NODENAME parameter is the name of the node.
The IP parameter is the IP address of this image.
The IP4NETWORK parameter is the local network/mask to allow access to the PostgreSQL server. Pot jails in this range can access PostgreSQL.
The EXPORTERPASS parameter is a password for the postgres_exporter user for stats collection.
DUMPSCHEDULE is an optional parameter for a cronjob to dump the databases to file. Provide it in the scheduling format of crontab, e.g. “*/5 * * * *”. (include quotes)
DUMPPATH is an optional parameter for the path to store database backups. For example /mnt/pgbak
.
REMOTELOG is an optional parameter for a remote syslog service, such as via the loki
or beast-of-argh
images on potluck site.
Usage
customscript.sh
The is a sample customscript.sh
file customscript.sh.sample
. You can modify this to add users or perform additional steps, then copy it in before starting the image.
This file is automatically run if found in the jail’s /root/customscript.sh
.
Getting Started
- Image Readme
- How To Use The Ready-Made Image
- Alternatively: Create a Jail With This Flavour Yourself
- Version History
- Manual Image Download Links
- Jenkins Pot Creation Logs
How To Use The Ready-Made Image
FreeBSD 14.1:
pot import -p postgres-single-amd64-14_1 -t 0.12.3 -U https://potluck.honeyguide.net/postgres-single
With Signify Verification:
fetch https://potluck.honeyguide.net/potluck.pub; pot import -p postgres-single-amd64-14_1 -t 0.12.3 -C potluck.pub -U https://potluck.honeyguide.net/postgres-single
If you don’t want to use the default pot
bridged network configuration but instead need an individual network setup (e.g. assign a host IP address), after importing it you can simply clone the jail like that (em0 is the host network adapter in this example):
pot clone -P postgres-single-amd64-14_1 -p my-cloned-jail -N alias -i "em0|10.10.10.10"
Note: Some images might require specific network configuration, double check the Overview-chapter at the top.
Alternatively: Create a Jail With This Flavour Yourself
1. Create Flavour Files
Save all files and directories from https://github.com/hny-gd/potluck/tree/master/postgres-single to /usr/local/etc/pot/flavours/
2. Create Jail From Flavour
Run
pot create -b <FreeBSD Version> -p <jailname> -t single -N public-bridge -f fbsd-update
with your FreeBSD version (e.g. 14.1) and the name your jail should get.
Note: Some images might require specific network configuration, double check the Overview-chapter at the top.
Version History
0.12
- Version bump for new base image
- Enable milliseconds in syslog-ng for all log timestamps
- Update syslog-ng config to use modern config options
0.11
- Version bump for new base image 14.1
- Extra steps to trim image size
0.10
- Version bump for new base image
0.9
- Version bump for new base image
0.8
- Version bump for new base image
0.7
- Version bump for new base image
0.6
- Version bump for new base image
0.5
- Version bump for new base image
- Fix node_exporter zfs issue
- Update postgresql_exporter to 0.15.0
- Add postgresql-contrib to support useful plugins like pg_stat_statements
- Increase postgresql max_connections to 200
0.4
- Version bump for new base image
- FBSD14 base image
0.3
- Version bump for new base image
0.2
- Version bump for new base image
- Add item to checklist for new versions postgresql
0.1
- Version bump for new base image
- Update to postgresql15
- Add backup script
0.0
- Initial postgres-single image
- Fix postgres setup
- Remove postgres_exporter legacy fix
- Change creation postgres_exporter user in database
- Make sure we’re not in /root when running sudo commands as postgres user
- Tabs and spaces fixes
- Further adjustments to postgres_exporter user setup
- Set a password for the postgres_exporter user
- Add logic to check if postgresql users exist before adding
- Adjust postgres_exporter password variable
- Bugfixing postgres_exporter, changing order of scripts
- Set path in postgres-post-init because sudo wasn’t being found
These images were built on Wed Nov 6 18:21:45 UTC 2024
Manual Image Download Links
postgres-single-amd64-14_1_0.12.3.xz (
)
postgres-single-amd64-14_1_0.12.3.xz.skein (
)
postgres-single-amd64-14_1_0.12.3.xz.skein.sig (
)
postgres-single-amd64-14_1_0.12.3.xz.meta (
)
Jenkins Pot Creation Logs
postgres-single-amd64-14_1_0.12.3:
postgres-single/postgres-single:
copy-in -s /usr/local/etc/pot/flavours/postgres-single.d/local -d /root/.pot_local
postgres-single/postgres-single.sh:
#!/bin/sh
# Based on POTLUCK TEMPLATE v3.0
# Altered by Michael Gmelin
#
# EDIT THE FOLLOWING FOR NEW FLAVOUR:
# 1. RUNS_IN_NOMAD - true or false
# 2. If RUNS_IN_NOMAD is false, can delete the <flavour>+4 file, else
# make sure pot create command doesn't include it
# 3. Create a matching <flavour> file with this <flavour>.sh file that
# contains the copy-in commands for the config files from <flavour>.d/
# Remember that the package directories don't exist yet, so likely copy
# to /root
# 4. Adjust package installation between BEGIN & END PACKAGE SETUP
# 5. Adjust jail configuration script generation between BEGIN & END COOK
# Configure the config files that have been copied in where necessary
# Set this to true if this jail flavour is to be created as a nomad
# (i.e. blocking) jail.
# You can then query it in the cook script generation below and the script
# is installed appropriately at the end of this script
RUNS_IN_NOMAD=false
# set the cook log path/filename
COOKLOG=/var/log/cook.log
# check if cooklog exists, create it if not
if [ ! -e $COOKLOG ]
then
echo "Creating $COOKLOG" | tee -a $COOKLOG
else
echo "WARNING $COOKLOG already exists" | tee -a $COOKLOG
fi
date >> $COOKLOG
# -------------------- COMMON ---------------
STEPCOUNT=0
step() {
STEPCOUNT=$(("$STEPCOUNT" + 1))
STEP="$*"
echo "Step $STEPCOUNT: $STEP" | tee -a $COOKLOG
}
exit_ok() {
trap - EXIT
exit 0
}
FAILED=" failed"
exit_error() {
STEP="$*"
FAILED=""
exit 1
}
set -e
trap 'echo ERROR: $STEP$FAILED | (>&2 tee -a $COOKLOG)' EXIT
# -------------- BEGIN PACKAGE SETUP -------------
step "Bootstrap package repo"
mkdir -p /usr/local/etc/pkg/repos
# only modify repo if not already done in base image
# shellcheck disable=SC2016
test -e /usr/local/etc/pkg/repos/FreeBSD.conf || \
echo 'FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly" }' \
>/usr/local/etc/pkg/repos/FreeBSD.conf
ASSUME_ALWAYS_YES=yes pkg bootstrap
step "Touch /etc/rc.conf"
touch /etc/rc.conf
# this is important, otherwise running /etc/rc from cook will
# overwrite the IP address set in tinirc
step "Remove ifconfig_epair0b from config"
# shellcheck disable=SC2015
sysrc -cq ifconfig_epair0b && sysrc -x ifconfig_epair0b || true
step "Disable sendmail"
service sendmail onedisable
step "Create /usr/local/etc/rc.d"
mkdir -p /usr/local/etc/rc.d
step "Clean freebsd-update"
rm -rf /var/db/freebsd-update
mkdir -p /var/db/freebsd-update
# we need consul for consul agent
step "Install package consul"
pkg install -y consul
step "Install package openssl"
pkg install -y openssl
step "Install package sudo"
pkg install -y sudo
# necessary if installing curl now
step "Install package ca_root_nss"
pkg install -y ca_root_nss
step "Install package curl"
pkg install -y curl
step "Install package jq"
pkg install -y jq
step "Install package jo"
pkg install -y jo
step "Install package nano"
pkg install -y nano
step "Install package bash"
pkg install -y bash
step "Install package rsync"
pkg install -y rsync
step "Install package node_exporter"
pkg install -y node_exporter
step "Install package postgresql15-client"
pkg install -y postgresql15-client
step "Install package postgresql15-server"
pkg install -y postgresql15-server
step "Install package postgresql15-contrib"
pkg install -y postgresql15-contrib
step "Install package git"
pkg install -y git
step "Install package go"
pkg install -y go
step "Install package gmake"
pkg install -y gmake
step "Install package autoconf"
pkg install -y autoconf
step "Install package syslog-ng"
pkg install -y syslog-ng
step "Clean package installation"
pkg clean -ay
# -------------- END PACKAGE SETUP -------------
# ----------- BEGIN POSTGRES EXPORTER-----------
#
# duplicated from postgresql-patroni, updated to latest version
cd /tmp
step "Download postgres_exporter from github"
/usr/local/bin/git clone --depth 1 -b v0.15.0 \
https://github.com/prometheus-community/postgres_exporter.git
# make sure we're at the correct commit
cd /tmp/postgres_exporter
#/usr/local/bin/git checkout 8c3604b85e38ae7141e84ecdc318b6015a196c97
/usr/local/bin/git checkout 68c176b8833b7580bf847cecf60f8e0ad5923f9a
# build
/usr/local/bin/gmake build
cd /tmp
step "Install postgres_exporter"
# not needed any more, fixed already
#sed -i '' 's|-web.listen-address|--web.listen-address|g' \
# /tmp/postgres_exporter/postgres_exporter.rc
# shellcheck disable=SC2016
sed -i '' 's|-p ${pidfile}|-f -p ${pidfile} -T ${name}|g' \
/tmp/postgres_exporter/postgres_exporter.rc
cp -f /tmp/postgres_exporter/postgres_exporter.rc \
/usr/local/etc/rc.d/postgres_exporter
chmod +x /usr/local/etc/rc.d/postgres_exporter
cp -f /tmp/postgres_exporter/postgres_exporter \
/usr/local/bin/postgres_exporter
chmod +x /usr/local/bin/postgres_exporter
step "Clean postgres_exporter build"
rm -rf /tmp/postgres_exporter
#
# Now generate the run command script "cook"
# It configures the system on the first run by creating the config file(s)
# On subsequent runs, it only starts sleeps (if nomad-jail) or simply exits
#
# this runs when image boots
# ----------------- BEGIN COOK ------------------
step "Clean cook artifacts"
rm -rf /usr/local/bin/cook /usr/local/share/cook
step "Install pot local"
tar -C /root/.pot_local -cf - . | tar -C /usr/local -xf -
rm -rf /root/.pot_local
step "Set file ownership on cook scripts"
chown -R root:wheel /usr/local/bin/cook /usr/local/share/cook
chmod 755 /usr/local/share/cook/bin/*
# ----------------- END COOK ------------------
# ---------- NO NEED TO EDIT BELOW ------------
step "Make cook script executable"
if [ -e /usr/local/bin/cook ]
then
echo "setting executable bit on /usr/local/bin/cook" | tee -a $COOKLOG
chmod u+x /usr/local/bin/cook
else
exit_error "there is no /usr/local/bin/cook to make executable"
fi
#
# There are two ways of running a pot jail: "Normal", non-blocking mode and
# "Nomad", i.e. blocking mode (the pot start command does not return until
# the jail is stopped).
# For the normal mode, we create a /usr/local/etc/rc.d script that starts
# the "cook" script generated above each time, for the "Nomad" mode, the cook
# script is started by pot (configuration through flavour file), therefore
# we do not need to do anything here.
#
# Create rc.d script for "normal" mode:
step "Create rc.d script to start cook"
echo "creating rc.d script to start cook" | tee -a $COOKLOG
# shellcheck disable=SC2016
echo '#!/bin/sh
#
# PROVIDE: cook
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
. /etc/rc.subr
name="cook"
rcvar="cook_enable"
load_rc_config $name
: ${cook_enable:="NO"}
: ${cook_env:=""}
command="/usr/local/bin/cook"
command_args=""
run_rc_command "$1"
' > /usr/local/etc/rc.d/cook
step "Make rc.d script to start cook executable"
if [ -e /usr/local/etc/rc.d/cook ]
then
echo "Setting executable bit on cook rc file" | tee -a $COOKLOG
chmod u+x /usr/local/etc/rc.d/cook
else
exit_error "/usr/local/etc/rc.d/cook does not exist"
fi
if [ "$RUNS_IN_NOMAD" != "true" ]
then
step "Enable cook service"
# This is a non-nomad (non-blocking) jail, so we need to make sure the script
# gets started when the jail is started:
# Otherwise, /usr/local/bin/cook will be set as start script by the pot
# flavour
echo "enabling cook" | tee -a $COOKLOG
service cook enable
fi
# -------------------- DONE ---------------
exit_ok
postgres-single/postgres-single+1:
postgres-single/postgres-single+1.sh:
postgres-single/postgres-single+2:
postgres-single/postgres-single+2.sh:
postgres-single/postgres-single+3:
postgres-single/postgres-single+3.sh:
postgres-single/postgres-single+4:
postgres-single/postgres-single+4.sh:
=====> Create conf dir (/mnt/srv/pot/jails/postgres-single-amd64-14_1/conf)
=====> Cloning freebsd-potluck-amd64-14_1_0_0_31 with snap
=====> clone zroot/srv/pot/jails/freebsd-potluck-amd64-14_1_0_0_31/m@1730306249 into zroot/srv/pot/jails/postgres-single-amd64-14_1/m
=====> Flavour: fbsd-update
=====> Starting postgres-single-amd64-14_1 pot for the initial bootstrap
=====> mount /mnt/srv/pot/jails/postgres-single-amd64-14_1/m/tmp
defaultrouter: 10.192.0.1 -> 10.192.0.1
===> Starting the pot postgres-single-amd64-14_1
=====> Pot postgres-single-amd64-14_1 jail params are: allow.set_hostname=false allow.raw_sockets allow.socket_af allow.chflags exec.clean mount.devfs enforce_statfs=2 sysvshm=new sysvsem=new sysvmsg=new children.max=0 devfs_ruleset=4 stop.timeout=10 name=postgres-single-amd64-14_1 host.hostname=postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net osrelease=14.1-RELEASE-p6 path=/mnt/srv/pot/jails/postgres-single-amd64-14_1/m persist vnet vnet.interface=epair0b
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg /usr/local/lib/compat/pkg
32-bit compatibility ldconfig path: /usr/lib32 /usr/lib32
Starting Network: lo0 epair0b.
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair0b: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:41:7c:9c:d5:0b
inet 10.192.0.3 netmask 0xffc00000 broadcast 10.255.255.255
groups: epair
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
add host 127.0.0.1: gateway lo0 fib 0: route already in table
add net default: gateway 10.192.0.1
add host ::1: gateway lo0 fib 0: route already in table
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Clearing /tmp (X related).
Updating /var/run/os-release done.
Creating and/or trimming log files.
Updating motd:.
Starting syslogd.
Starting sendmail_submit.
Starting cron.
Wed Nov 6 18:13:07 UTC 2024
/usr/local/etc/pot/flavours/fbsd-update.sh -> /mnt/srv/pot/jails/postgres-single-amd64-14_1/m/tmp/fbsd-update.sh
=====> Executing fbsd-update script on postgres-single-amd64-14_1
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching public key from update2.freebsd.org... done.
Fetching metadata signature for 14.1-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata files... done.
Inspecting system... done.
Preparing to download files... done.
No updates needed to update system to 14.1-RELEASE-p6.
No updates are available to install.
=====> Stop the pot postgres-single-amd64-14_1
=====> Remove p4672bb1b2dad4 epair network interfaces
=====> unmount /mnt/srv/pot/jails/postgres-single-amd64-14_1/m/tmp
=====> unmount /mnt/srv/pot/jails/postgres-single-amd64-14_1/m/dev
=====> Flavour: postgres-single
=====> Executing postgres-single pot commands on postgres-single-amd64-14_1
=====> mount /mnt/srv/pot/jails/postgres-single-amd64-14_1/m/tmp
=====> Source /usr/local/etc/pot/flavours/postgres-single.d/local copied in the pot postgres-single-amd64-14_1
=====> unmount /mnt/srv/pot/jails/postgres-single-amd64-14_1/m/tmp
=====> /mnt/srv/pot/jails/postgres-single-amd64-14_1/m/dev is already unmounted
=====> Starting postgres-single-amd64-14_1 pot for the initial bootstrap
=====> mount /mnt/srv/pot/jails/postgres-single-amd64-14_1/m/tmp
defaultrouter: 10.192.0.1 -> 10.192.0.1
===> Starting the pot postgres-single-amd64-14_1
=====> Pot postgres-single-amd64-14_1 jail params are: allow.set_hostname=false allow.raw_sockets allow.socket_af allow.chflags exec.clean mount.devfs enforce_statfs=2 sysvshm=new sysvsem=new sysvmsg=new children.max=0 devfs_ruleset=4 stop.timeout=10 name=postgres-single-amd64-14_1 host.hostname=postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net osrelease=14.1-RELEASE-p6 path=/mnt/srv/pot/jails/postgres-single-amd64-14_1/m persist vnet vnet.interface=epair0b
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg /usr/local/lib/compat/pkg
32-bit compatibility ldconfig path: /usr/lib32 /usr/lib32
Starting Network: lo0 epair0b.
lo0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair0b: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:f7:a7:c8:b7:0b
inet 10.192.0.3 netmask 0xffc00000 broadcast 10.255.255.255
groups: epair
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
add host 127.0.0.1: gateway lo0 fib 0: route already in table
add net default: gateway 10.192.0.1
add host ::1: gateway lo0 fib 0: route already in table
add net fe80::: gateway ::1
add net ff02::: gateway ::1
add net ::ffff:0.0.0.0: gateway ::1
add net ::0.0.0.0: gateway ::1
Clearing /tmp (X related).
Updating /var/run/os-release done.
Creating and/or trimming log files.
Updating motd:.
Starting syslogd.
Starting sendmail_submit.
Starting cron.
Wed Nov 6 18:13:41 UTC 2024
/usr/local/etc/pot/flavours/postgres-single.sh -> /mnt/srv/pot/jails/postgres-single-amd64-14_1/m/tmp/postgres-single.sh
=====> Executing postgres-single script on postgres-single-amd64-14_1
WARNING /var/log/cook.log already exists
Step 1: Bootstrap package repo
pkg already bootstrapped at /usr/local/sbin/pkg
Step 2: Touch /etc/rc.conf
Step 3: Remove ifconfig_epair0b from config
Step 4: Disable sendmail
sendmail disabled in /etc/rc.conf
sendmail_submit disabled in /etc/rc.conf
sendmail_msp_queue disabled in /etc/rc.conf
Step 5: Create /usr/local/etc/rc.d
Step 6: Clean freebsd-update
Step 7: Install package consul
Updating FreeBSD repository catalogue...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] Fetching data.pkg: .......... done
Processing entries: .......... done
FreeBSD repository update completed. 35518 packages processed.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
consul: 1.19.2
Number of packages to be installed: 1
The process will require 124 MiB more space.
24 MiB to be downloaded.
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Fetching consul-1.19.2.pkg: .......... done
Checking integrity... done (0 conflicting)
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Installing consul-1.19.2...
===> Creating groups
Creating group 'consul' with gid '469'
===> Creating users
Creating user 'consul' with uid '469'
===> Creating homedir(s)
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Extracting consul-1.19.2: ..... done
Step 8: Install package openssl
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 9: Install package sudo
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 10: Install package ca_root_nss
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 11: Install package curl
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 12: Install package jq
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 13: Install package jo
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 14: Install package nano
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 15: Install package bash
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 16: Install package rsync
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
Step 17: Install package node_exporter
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
node_exporter: 1.8.2
Number of packages to be installed: 1
The process will require 11 MiB more space.
4 MiB to be downloaded.
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Fetching node_exporter-1.8.2.pkg: .......... done
Checking integrity... done (0 conflicting)
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Installing node_exporter-1.8.2...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Extracting node_exporter-1.8.2: .......... done
=====
Message from node_exporter-1.8.2:
--
If upgrading from a version of node_exporter <0.15.0 you'll need to update any
custom command line flags that you may have set as it now requires a
double-dash (--flag) instead of a single dash (-flag).
The collector flags in 0.15.0 have now been replaced with individual boolean
flags and the -collector.procfs` and -collector.sysfs` flags have been renamed
to --path.procfs and --path.sysfs respectively.
Step 18: Install package postgresql15-client
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
postgresql15-client: 15.8
Number of packages to be installed: 1
The process will require 14 MiB more space.
3 MiB to be downloaded.
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Fetching postgresql15-client-15.8.pkg: .......... done
Checking integrity... done (0 conflicting)
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Installing postgresql15-client-15.8...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Extracting postgresql15-client-15.8: .......... done
=====
Message from postgresql15-client-15.8:
--
The PostgreSQL port has a collection of "side orders":
postgresql-docs
For all of the html documentation
p5-Pg
A perl5 API for client access to PostgreSQL databases.
postgresql-tcltk
If you want tcl/tk client support.
postgresql-jdbc
For Java JDBC support.
postgresql-odbc
For client access from unix applications using ODBC as access
method. Not needed to access unix PostgreSQL servers from Win32
using ODBC. See below.
ruby-postgres, py-psycopg2
For client access to PostgreSQL databases using the ruby & python
languages.
postgresql-plperl, postgresql-pltcl & postgresql-plruby
For using perl5, tcl & ruby as procedural languages.
postgresql-contrib
Lots of contributed utilities, postgresql functions and
datatypes. There you find pg_standby, pgcrypto and many other cool
things.
etc...
Step 19: Install package postgresql15-server
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 9 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
icu: 74.2_1,1
libedit: 3.1.20240808,1
libffi: 3.4.6
llvm15: 15.0.7_10
lua53: 5.3.6_1
mpdecimal: 4.0.0
perl5: 5.36.3_2
postgresql15-server: 15.8
python311: 3.11.10
Number of packages to be installed: 9
The process will require 1 GiB more space.
223 MiB to be downloaded.
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/9] Fetching postgresql15-server-15.8.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/9] Fetching mpdecimal-4.0.0.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/9] Fetching lua53-5.3.6_1.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/9] Fetching libedit-3.1.20240808,1.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/9] Fetching icu-74.2_1,1.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/9] Fetching llvm15-15.0.7_10.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [7/9] Fetching perl5-5.36.3_2.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [8/9] Fetching libffi-3.4.6.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [9/9] Fetching python311-3.11.10.pkg: .......... done
Checking integrity... done (0 conflicting)
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/9] Installing mpdecimal-4.0.0...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/9] Extracting mpdecimal-4.0.0: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/9] Installing libedit-3.1.20240808,1...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/9] Extracting libedit-3.1.20240808,1: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/9] Installing libffi-3.4.6...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/9] Extracting libffi-3.4.6: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/9] Installing lua53-5.3.6_1...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/9] Extracting lua53-5.3.6_1: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/9] Installing perl5-5.36.3_2...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/9] Extracting perl5-5.36.3_2: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/9] Installing python311-3.11.10...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/9] Extracting python311-3.11.10: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [7/9] Installing icu-74.2_1,1...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [7/9] Extracting icu-74.2_1,1: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [8/9] Installing llvm15-15.0.7_10...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [8/9] Extracting llvm15-15.0.7_10: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [9/9] Installing postgresql15-server-15.8...
===> Creating groups
Creating group 'postgres' with gid '770'
===> Creating users
Creating user 'postgres' with uid '770'
===> Creating homedir(s)
=========== BACKUP YOUR DATA! =============
As always, backup your data before
upgrading. If the upgrade leads to a higher
major revision (e.g. 9.6 -> 10), a dump
and restore of all databases is
required. This is *NOT* done by the port!
See https://www.postgresql.org/docs/current/upgrading.html
===========================================
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [9/9] Extracting postgresql15-server-15.8: .......... done
=====
Message from python311-3.11.10:
--
Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:
py311-gdbm databases/py-gdbm@py311
py311-sqlite3 databases/py-sqlite3@py311
py311-tkinter x11-toolkits/py-tkinter@py311
=====
Message from postgresql15-server-15.8:
--
For procedural languages and postgresql functions, please note that
you might have to update them when updating the server.
If you have many tables and many clients running, consider raising
kern.maxfiles using sysctl(8), or reconfigure your kernel
appropriately.
The port is set up to use autovacuum for new databases, but you might
also want to vacuum and perhaps backup your database regularly. There
is a periodic script, /usr/local/etc/periodic/daily/502.pgsql, that
you may find useful. You can use it to backup and perform vacuum on all
databases nightly. Per default, it performs `vacuum analyze'. See the
script for instructions. For autovacuum settings, please review
~postgres/data/postgresql.conf.
If you plan to access your PostgreSQL server using ODBC, please
consider running the SQL script /usr/local/share/postgresql/odbc.sql
to get the functions required for ODBC compliance.
Please note that if you use the rc script,
/usr/local/etc/rc.d/postgresql, to initialize the database, unicode
(UTF-8) will be used to store character data by default. Set
postgresql_initdb_flags or use login.conf settings described below to
alter this behaviour. See the start rc script for more info.
To set limits, environment stuff like locale and collation and other
things, you can set up a class in /etc/login.conf before initializing
the database. Add something similar to this to /etc/login.conf:
---
postgres:\
:lang=en_US.UTF-8:\
:setenv=LC_COLLATE=C:\
:tc=default:
---
and run `cap_mkdb /etc/login.conf'.
Then add 'postgresql_login_class="postgres"' to /etc/rc.conf, or
set it as the postgres user's login class in /etc/passwd.
======================================================================
To use PostgreSQL, enable it in rc.conf using
sysrc postgresql_enable=yes
To initialize the database, run
service postgresql initdb
You can then start PostgreSQL by running:
service postgresql start
For postmaster settings, see ~postgres/data/postgresql.conf
NB. FreeBSD's PostgreSQL port logs to syslog by default
See ~postgres/data/postgresql.conf for more info
NB. If you're not using a checksumming filesystem like ZFS, you might
wish to enable data checksumming. It can be enabled during
the initdb phase, by adding the "--data-checksums" flag to
the postgresql_initdb_flags rcvar. Otherwise you can enable it later by
using pg_checksums. Check the initdb(1) manpage for more info
and make sure you understand the performance implications.
======================================================================
SECURITY ADVICE
If upgrading from a version 15.x < 15.7:
A security vulnerability was found in the system views pg_stats_ext
and pg_stats_ext_exprs, potentially allowing authenticated database
users to see data they shouldn't. If this is of concern in your
installation, run the SQL script /usr/local/share/postgresql/fix-CVE-2024-4317.sql
for each of your databases. For details, see
https://www.postgresql.org/support/security/CVE-2024-4317/
Step 20: Install package postgresql15-contrib
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
libxml2: 2.11.9
postgresql15-contrib: 15.8
Number of packages to be installed: 2
The process will require 7 MiB more space.
1 MiB to be downloaded.
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/2] Fetching libxml2-2.11.9.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/2] Fetching postgresql15-contrib-15.8.pkg: .......... done
Checking integrity... done (0 conflicting)
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/2] Installing libxml2-2.11.9...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/2] Extracting libxml2-2.11.9: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/2] Installing postgresql15-contrib-15.8...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/2] Extracting postgresql15-contrib-15.8: .......... done
=====
Message from postgresql15-contrib-15.8:
--
The PostgreSQL contrib utilities have been installed. Please see
/usr/local/share/doc/postgresql/README-contrib
for more information.
Step 21: Install package git
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 22 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
expat: 2.6.3
git: 2.46.2
p5-Authen-SASL: 2.17
p5-CGI: 4.66
p5-Clone: 0.47
p5-Digest-HMAC: 1.04
p5-Encode-Locale: 1.05
p5-Error: 0.17029
p5-GSSAPI: 0.28_2
p5-HTML-Parser: 3.83
p5-HTML-Tagset: 3.24
p5-HTTP-Date: 6.06
p5-HTTP-Message: 6.46
p5-IO-HTML: 1.004
p5-IO-Socket-IP: 0.42
p5-IO-Socket-SSL: 2.089
p5-LWP-MediaTypes: 6.04
p5-Mozilla-CA: 20240924
p5-Net-SSLeay: 1.94
p5-TimeDate: 2.33,1
p5-URI: 5.29
pcre2: 10.43
Number of packages to be installed: 22
The process will require 47 MiB more space.
9 MiB to be downloaded.
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/22] Fetching p5-Net-SSLeay-1.94.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/22] Fetching p5-IO-Socket-SSL-2.089.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/22] Fetching p5-HTTP-Date-6.06.pkg: . done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/22] Fetching p5-GSSAPI-0.28_2.pkg: ....... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/22] Fetching p5-IO-Socket-IP-0.42.pkg: ...... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/22] Fetching p5-URI-5.29.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [7/22] Fetching p5-CGI-4.66.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [8/22] Fetching p5-Encode-Locale-1.05.pkg: .. done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [9/22] Fetching p5-HTML-Parser-3.83.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [10/22] Fetching p5-Mozilla-CA-20240924.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [11/22] Fetching p5-LWP-MediaTypes-6.04.pkg: ..... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [12/22] Fetching pcre2-10.43.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [13/22] Fetching p5-TimeDate-2.33,1.pkg: ...... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [14/22] Fetching p5-IO-HTML-1.004.pkg: ... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [15/22] Fetching p5-Clone-0.47.pkg: ... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [16/22] Fetching p5-Digest-HMAC-1.04.pkg: . done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [17/22] Fetching p5-Error-0.17029.pkg: ...... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [18/22] Fetching p5-HTML-Tagset-3.24.pkg: .. done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [19/22] Fetching expat-2.6.3.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [20/22] Fetching p5-HTTP-Message-6.46.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [21/22] Fetching git-2.46.2.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [22/22] Fetching p5-Authen-SASL-2.17.pkg: ........ done
Checking integrity... done (0 conflicting)
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/22] Installing p5-TimeDate-2.33,1...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/22] Extracting p5-TimeDate-2.33,1: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/22] Installing p5-HTTP-Date-6.06...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/22] Extracting p5-HTTP-Date-6.06: ....... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/22] Installing p5-URI-5.29...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/22] Extracting p5-URI-5.29: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/22] Installing p5-Encode-Locale-1.05...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/22] Extracting p5-Encode-Locale-1.05: ....... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/22] Installing p5-LWP-MediaTypes-6.04...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/22] Extracting p5-LWP-MediaTypes-6.04: ........ done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/22] Installing p5-IO-HTML-1.004...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/22] Extracting p5-IO-HTML-1.004: ....... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [7/22] Installing p5-Clone-0.47...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [7/22] Extracting p5-Clone-0.47: ......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [8/22] Installing p5-HTML-Tagset-3.24...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [8/22] Extracting p5-HTML-Tagset-3.24: ....... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [9/22] Installing p5-HTTP-Message-6.46...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [9/22] Extracting p5-HTTP-Message-6.46: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [10/22] Installing p5-Net-SSLeay-1.94...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [10/22] Extracting p5-Net-SSLeay-1.94: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [11/22] Installing p5-GSSAPI-0.28_2...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [11/22] Extracting p5-GSSAPI-0.28_2: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [12/22] Installing p5-IO-Socket-IP-0.42...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [12/22] Extracting p5-IO-Socket-IP-0.42: ....... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [13/22] Installing p5-HTML-Parser-3.83...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [13/22] Extracting p5-HTML-Parser-3.83: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [14/22] Installing p5-Mozilla-CA-20240924...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [14/22] Extracting p5-Mozilla-CA-20240924: ....... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [15/22] Installing p5-Digest-HMAC-1.04...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [15/22] Extracting p5-Digest-HMAC-1.04: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [16/22] Installing p5-IO-Socket-SSL-2.089...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [16/22] Extracting p5-IO-Socket-SSL-2.089: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [17/22] Installing p5-CGI-4.66...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [17/22] Extracting p5-CGI-4.66: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [18/22] Installing pcre2-10.43...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [18/22] Extracting pcre2-10.43: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [19/22] Installing p5-Error-0.17029...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [19/22] Extracting p5-Error-0.17029: ......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [20/22] Installing expat-2.6.3...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [20/22] Extracting expat-2.6.3: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [21/22] Installing p5-Authen-SASL-2.17...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [21/22] Extracting p5-Authen-SASL-2.17: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [22/22] Installing git-2.46.2...
===> Creating groups
Creating group 'git_daemon' with gid '964'
===> Creating users
Creating user 'git_daemon' with uid '964'
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [22/22] Extracting git-2.46.2: .......... done
=====
Message from git-2.46.2:
--
If you installed the GITWEB option please follow these instructions:
In the directory /usr/local/share/examples/git/gitweb you can find all files to
make gitweb work as a public repository on the web.
All you have to do to make gitweb work is:
1) Please be sure you're able to execute CGI scripts in
/usr/local/share/examples/git/gitweb.
2) Set the GITWEB_CONFIG variable in your webserver's config to
/usr/local/etc/git/gitweb.conf. This variable is passed to gitweb.cgi.
3) Restart server.
If you installed the CONTRIB option please note that the scripts are
installed in /usr/local/share/git-core/contrib. Some of them require
other ports to be installed (perl, python, etc), which you may need to
install manually.
Step 22: Install package go
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
go: 1.21_5,2
go121: 1.21.13_1
Number of packages to be installed: 2
The process will require 206 MiB more space.
42 MiB to be downloaded.
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/2] Fetching go-1.21_5,2.pkg: . done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/2] Fetching go121-1.21.13_1.pkg: .......... done
Checking integrity... done (0 conflicting)
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/2] Installing go121-1.21.13_1...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/2] Extracting go121-1.21.13_1: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/2] Installing go-1.21_5,2...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/2] Extracting go-1.21_5,2: .. done
Step 23: Install package gmake
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
gmake: 4.4.1
Number of packages to be installed: 1
The process will require 2 MiB more space.
486 KiB to be downloaded.
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Fetching gmake-4.4.1.pkg: .......... done
Checking integrity... done (0 conflicting)
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Installing gmake-4.4.1...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/1] Extracting gmake-4.4.1: .......... done
Step 24: Install package autoconf
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 3 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
autoconf: 2.72
autoconf-switch: 20220527
m4: 1.4.19_1,1
Number of packages to be installed: 3
The process will require 4 MiB more space.
850 KiB to be downloaded.
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/3] Fetching m4-1.4.19_1,1.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/3] Fetching autoconf-switch-20220527.pkg: . done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/3] Fetching autoconf-2.72.pkg: .......... done
Checking integrity... done (0 conflicting)
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/3] Installing m4-1.4.19_1,1...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/3] Extracting m4-1.4.19_1,1: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/3] Installing autoconf-switch-20220527...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/3] Extracting autoconf-switch-20220527: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/3] Installing autoconf-2.72...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/3] Extracting autoconf-2.72: .......... done
Step 25: Install package syslog-ng
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 6 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
e2fsprogs-libuuid: 1.47.1
glib: 2.80.5,2
ivykis: 0.43.2
json-c: 0.18
py311-packaging: 24.1
syslog-ng: 4.8.0_2
Number of packages to be installed: 6
The process will require 32 MiB more space.
6 MiB to be downloaded.
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/6] Fetching ivykis-0.43.2.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/6] Fetching json-c-0.18.pkg: ......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/6] Fetching e2fsprogs-libuuid-1.47.1.pkg: ....... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/6] Fetching py311-packaging-24.1.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/6] Fetching glib-2.80.5,2.pkg: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/6] Fetching syslog-ng-4.8.0_2.pkg: .......... done
Checking integrity... done (0 conflicting)
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/6] Installing py311-packaging-24.1...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [1/6] Extracting py311-packaging-24.1: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/6] Installing ivykis-0.43.2...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [2/6] Extracting ivykis-0.43.2: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/6] Installing json-c-0.18...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [3/6] Extracting json-c-0.18: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/6] Installing e2fsprogs-libuuid-1.47.1...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [4/6] Extracting e2fsprogs-libuuid-1.47.1: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/6] Installing glib-2.80.5,2...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [5/6] Extracting glib-2.80.5,2: .......... done
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/6] Installing syslog-ng-4.8.0_2...
[postgres-single-amd64-14_1.vsf00002.cpt.za.honeyguide.net] [6/6] Extracting syslog-ng-4.8.0_2: .......... done
==> Running trigger: gio-modules.ucl
Generating GIO modules cache
==> Running trigger: glib-schemas.ucl
Compiling glib schemas
No schema files found: doing nothing.
=====
Message from syslog-ng-4.8.0_2:
--
syslog-ng is now installed! To replace FreeBSD's standard syslogd
(/usr/sbin/syslogd), complete these steps:
1. Create a configuration file named /usr/local/etc/syslog-ng.conf
(a sample named syslog-ng.conf.sample has been included in
/usr/local/etc). Note that this is a change in 2.0.2
version, previous ones put the config file in
/usr/local/etc/syslog-ng/syslog-ng.conf, so if this is an update
move that file in the right place
2. Configure syslog-ng to start automatically by adding the following
to /etc/rc.conf:
syslog_ng_enable="YES"
3. Prevent the standard FreeBSD syslogd from starting automatically by
adding a line to the end of your /etc/rc.conf file that reads:
syslogd_enable="NO"
4. Shut down the standard FreeBSD syslogd:
kill `cat /var/run/syslog.pid`
5. Start syslog-ng:
/usr/local/etc/rc.d/syslog-ng start
Step 26: Clean package installation
The following package files will be deleted:
/var/cache/pkg/postgresql15-contrib-15.8~3951e203b1.pkg
/var/cache/pkg/perl5-5.36.3_2~43d0635243.pkg
/var/cache/pkg/p5-Encode-Locale-1.05.pkg
/var/cache/pkg/p5-Mozilla-CA-20240924~40cbcfafef.pkg
/var/cache/pkg/e2fsprogs-libuuid-1.47.1~362f74ac69.pkg
/var/cache/pkg/llvm15-15.0.7_10.pkg
/var/cache/pkg/p5-Clone-0.47~f797e6f09a.pkg
/var/cache/pkg/postgresql15-server-15.8~a31b70ead9.pkg
/var/cache/pkg/libedit-3.1.20240808,1.pkg
/var/cache/pkg/gmake-4.4.1~cb13088eb2.pkg
/var/cache/pkg/p5-IO-Socket-SSL-2.089.pkg
/var/cache/pkg/p5-URI-5.29~6eb123a53e.pkg
/var/cache/pkg/consul-1.19.2.pkg
/var/cache/pkg/p5-Digest-HMAC-1.04~45485334d1.pkg
/var/cache/pkg/p5-HTTP-Date-6.06.pkg
/var/cache/pkg/p5-GSSAPI-0.28_2~8e031004bd.pkg
/var/cache/pkg/py311-packaging-24.1.pkg
/var/cache/pkg/python311-3.11.10~286ca605ff.pkg
/var/cache/pkg/mpdecimal-4.0.0~355dbb0218.pkg
/var/cache/pkg/syslog-ng-4.8.0_2~cf5f9ee289.pkg
/var/cache/pkg/lua53-5.3.6_1.pkg
/var/cache/pkg/p5-Encode-Locale-1.05~e24c77aa28.pkg
/var/cache/pkg/autoconf-switch-20220527.pkg
/var/cache/pkg/libxml2-2.11.9~128b31ea34.pkg
/var/cache/pkg/libxml2-2.11.9.pkg
/var/cache/pkg/m4-1.4.19_1,1.pkg
/var/cache/pkg/postgresql15-server-15.8.pkg
/var/cache/pkg/p5-IO-Socket-IP-0.42~4cd448dcfe.pkg
/var/cache/pkg/p5-TimeDate-2.33,1~3d6754b570.pkg
/var/cache/pkg/perl5-5.36.3_2.pkg
/var/cache/pkg/pcre2-10.43.pkg
/var/cache/pkg/p5-HTTP-Date-6.06~1955c3a50e.pkg
/var/cache/pkg/expat-2.6.3.pkg
/var/cache/pkg/p5-HTML-Tagset-3.24~f94b5838a6.pkg
/var/cache/pkg/p5-CGI-4.66~1bb30e60cf.pkg
/var/cache/pkg/m4-1.4.19_1,1~cd28beab1a.pkg
/var/cache/pkg/json-c-0.18.pkg
/var/cache/pkg/glib-2.80.5,2.pkg
/var/cache/pkg/node_exporter-1.8.2.pkg
/var/cache/pkg/p5-Net-SSLeay-1.94~e3e13f37f2.pkg
/var/cache/pkg/p5-Digest-HMAC-1.04.pkg
/var/cache/pkg/autoconf-2.72~8eb8727df5.pkg
/var/cache/pkg/postgresql15-client-15.8.pkg
/var/cache/pkg/p5-HTML-Tagset-3.24.pkg
/var/cache/pkg/llvm15-15.0.7_10~a934cd5b99.pkg
/var/cache/pkg/syslog-ng-4.8.0_2.pkg
/var/cache/pkg/p5-URI-5.29.pkg
/var/cache/pkg/json-c-0.18~4c2b04b9f9.pkg
/var/cache/pkg/p5-Clone-0.47.pkg
/var/cache/pkg/p5-LWP-MediaTypes-6.04~1bb1b30f28.pkg
/var/cache/pkg/p5-GSSAPI-0.28_2.pkg
/var/cache/pkg/p5-CGI-4.66.pkg
/var/cache/pkg/expat-2.6.3~3f4ec0c272.pkg
/var/cache/pkg/postgresql15-client-15.8~d7ef79a379.pkg
/var/cache/pkg/autoconf-switch-20220527~337da522e1.pkg
/var/cache/pkg/p5-LWP-MediaTypes-6.04.pkg
/var/cache/pkg/autoconf-2.72.pkg
/var/cache/pkg/p5-Mozilla-CA-20240924.pkg
/var/cache/pkg/p5-IO-HTML-1.004~59e4c4e9db.pkg
/var/cache/pkg/gmake-4.4.1.pkg
/var/cache/pkg/p5-HTML-Parser-3.83.pkg
/var/cache/pkg/go-1.21_5,2.pkg
/var/cache/pkg/e2fsprogs-libuuid-1.47.1.pkg
/var/cache/pkg/p5-HTML-Parser-3.83~219e67fbbc.pkg
/var/cache/pkg/pcre2-10.43~d476f63222.pkg
/var/cache/pkg/p5-Error-0.17029.pkg
/var/cache/pkg/python311-3.11.10.pkg
/var/cache/pkg/lua53-5.3.6_1~4fb3255299.pkg
/var/cache/pkg/icu-74.2_1,1.pkg
/var/cache/pkg/p5-IO-Socket-SSL-2.089~6a5ad1a615.pkg
/var/cache/pkg/p5-HTTP-Message-6.46~860729a263.pkg
/var/cache/pkg/ivykis-0.43.2.pkg
/var/cache/pkg/p5-IO-Socket-IP-0.42.pkg
/var/cache/pkg/git-2.46.2.pkg
/var/cache/pkg/go-1.21_5,2~fad524963a.pkg
/var/cache/pkg/glib-2.80.5,2~909ca79520.pkg
/var/cache/pkg/ivykis-0.43.2~07934ae53e.pkg
/var/cache/pkg/p5-Authen-SASL-2.17.pkg
/var/cache/pkg/p5-Authen-SASL-2.17~3c90eaf737.pkg
/var/cache/pkg/p5-Error-0.17029~9d53ef9039.pkg
/var/cache/pkg/node_exporter-1.8.2~d3c8df78fe.pkg
/var/cache/pkg/libffi-3.4.6~e038c4b1cf.pkg
/var/cache/pkg/mpdecimal-4.0.0.pkg
/var/cache/pkg/p5-HTTP-Message-6.46.pkg
/var/cache/pkg/go121-1.21.13_1.pkg
/var/cache/pkg/icu-74.2_1,1~23bba2980f.pkg
/var/cache/pkg/go121-1.21.13_1~c8e3d4d201.pkg
/var/cache/pkg/py311-packaging-24.1~b3b408ec53.pkg
/var/cache/pkg/p5-IO-HTML-1.004.pkg
/var/cache/pkg/p5-Net-SSLeay-1.94.pkg
/var/cache/pkg/postgresql15-contrib-15.8.pkg
/var/cache/pkg/git-2.46.2~8e135a20d3.pkg
/var/cache/pkg/libffi-3.4.6.pkg
/var/cache/pkg/consul-1.19.2~ffcc2d4893.pkg
/var/cache/pkg/p5-TimeDate-2.33,1.pkg
/var/cache/pkg/libedit-3.1.20240808,1~f5ee367ad6.pkg
The cleanup will free 314 MiB
Deleting files: .......... done
Step 27: Download postgres_exporter from github
Cloning into 'postgres_exporter'...
Note: switching to '68c176b8833b7580bf847cecf60f8e0ad5923f9a'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 68c176b Release v0.15.0 (#944)
curl -s -L https://github.com/prometheus/promu/releases/download/v0.15.0/promu-0.15.0.freebsd-amd64.tar.gz | tar -xvzf - -C /tmp/tmp.3yzhyCe5dF
x promu-0.15.0.freebsd-amd64/
x promu-0.15.0.freebsd-amd64/LICENSE
x promu-0.15.0.freebsd-amd64/NOTICE
x promu-0.15.0.freebsd-amd64/promu
mkdir -p /root/go/bin
cp /tmp/tmp.3yzhyCe5dF/promu-0.15.0.freebsd-amd64/promu /root/go/bin/promu
rm -r /tmp/tmp.3yzhyCe5dF
>> building binaries
/root/go/bin/promu build --prefix /tmp/postgres_exporter
> postgres_exporter
go: downloading github.com/alecthomas/kingpin/v2 v2.3.2
go: downloading github.com/blang/semver/v4 v4.0.0
go: downloading github.com/go-kit/log v0.2.1
go: downloading github.com/lib/pq v1.10.9
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/prometheus/common v0.44.0
go: downloading github.com/prometheus/exporter-toolkit v0.10.0
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/go-logfmt/logfmt v0.5.1
go: downloading github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
go: downloading github.com/xhit/go-str2duration/v2 v2.1.0
go: downloading github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.2.0
go: downloading github.com/prometheus/procfs v0.11.1
go: downloading google.golang.org/protobuf v1.31.0
go: downloading github.com/coreos/go-systemd/v22 v22.5.0
go: downloading golang.org/x/crypto v0.14.0
go: downloading golang.org/x/sync v0.3.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.4
go: downloading golang.org/x/sys v0.13.0
go: downloading github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f
go: downloading golang.org/x/net v0.17.0
go: downloading golang.org/x/oauth2 v0.8.0
go: downloading github.com/golang/protobuf v1.5.3
go: downloading github.com/jpillora/backoff v1.0.0
go: downloading golang.org/x/text v0.13.0
Step 28: Install postgres_exporter
Step 29: Clean postgres_exporter build
Step 30: Clean cook artifacts
Step 31: Install pot local
Step 32: Set file ownership on cook scripts
Step 33: Make cook script executable
setting executable bit on /usr/local/bin/cook
Step 34: Create rc.d script to start cook
creating rc.d script to start cook
Step 35: Make rc.d script to start cook executable
Setting executable bit on cook rc file
Step 36: Enable cook service
enabling cook
cook enabled in /etc/rc.conf
=====> Stop the pot postgres-single-amd64-14_1
=====> Remove p4672bb1d4dad4 epair network interfaces
=====> unmount /mnt/srv/pot/jails/postgres-single-amd64-14_1/m/tmp
=====> unmount /mnt/srv/pot/jails/postgres-single-amd64-14_1/m/dev
===> exporting postgres-single-amd64-14_1 @ 1730917018 to /tmp/postgres-single-amd64-14_1_0.12.3.xz